template <typename PositionT, typename AttrT1 = nullptr_t, typename AttrT2 = nullptr_t, typename AttrT3 = nullptr_t>
struct IndexedTriangleMesh
Defined at line 24 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
Simple representation of an indexed triangle mesh, used during geometric
algorithms before uploading the mesh to the GPU. By separating positions
from other attributes, it makes it easy to perform geometric operations such
as splitting an edge where it intersects a plane then using the same
interpolation parameter used to generate the new position to also interpolate
the other attribute values.
Public Members
BoundingBox bounding_box
vector indices
std::vector<PositionType> positions
std::vector<AttributeType1> attributes1
std::vector<AttributeType2> attributes2
std::vector<AttributeType3> attributes3
Public Methods
void clear ()
Defined at line 40 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
uint32_t index_count ()
Defined at line 48 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
uint32_t vertex_count ()
Defined at line 49 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
uint32_t triangle_count ()
Defined at line 50 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
void resize_indices (uint32_t num_indices)
Defined at line 52 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
void resize_vertices (uint32_t num_vertices)
Defined at line 57 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_index_bytes ()
Return the total number of bytes used by vertex indices.
Defined at line 71 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t sizeof_attribute1 ()
Defined at line 73 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t sizeof_attribute2 ()
Defined at line 77 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t sizeof_attribute3 ()
Defined at line 81 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_position_bytes ()
Return the total number of bytes used by vertex position data.
Defined at line 86 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_attribute1_bytes ()
Return the total number of bytes used by non-position vertex attributes.
Defined at line 89 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_attribute2_bytes ()
Defined at line 90 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_attribute3_bytes ()
Defined at line 91 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
size_t total_bytes ()
Return the total number of bytes used by indices, positions, and other
attributes.
Defined at line 95 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
bool IsValid ()
Return true if the mesh passes basic sanity checks, and false otherwise.
Defined at line 101 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h
bool operator== (const IndexedTriangleMesh<PositionT, AttrT1> & other)
Return true if meshes are identical. Will return false in all other cases,
including e.g. when the meshes are the same but all triangle indices are
rotated clockwise.
Defined at line 149 of file ../../src/ui/lib/escher/mesh/indexed_triangle_mesh.h