![]() |
NDEVR
API Documentation
|
A class to easily iterate each triangle over a Geometry of triangles or meshes. More...
Public Member Functions | |
| TriangleIterator () | |
| Default constructor creating an empty iterator. | |
| TriangleIterator (PrimitiveProperty primitive_property, const StringView &vertex_property, Geometry mesh) | |
| Constructs a triangle iterator using a named custom vertex property. | |
| TriangleIterator (PrimitiveProperty primitive_property, VertexProperty vertex_property, Geometry mesh) | |
| Constructs a triangle iterator from a geometry's primitive and vertex properties. | |
| Vector< 3, BitFlag > | flag (uint04 index) const |
| Retrieves the vertex flags for all three vertices of a triangle. | |
| template<class t_tri_type> | |
| Triangle< t_dims, t_tri_type > | get (uint04 index) const |
| Retrieves the triangle at the given index. | |
| Triangle< t_dims, t_type > | operator[] (uint04 index) const |
| Array-style access to a triangle. | |
| uint04 | size () const |
| Returns the number of triangle primitives available. | |
| Vector< 3, uint04 > | vertexIndex (uint04 index) const |
| Returns the local vertex indices (offset-adjusted) for a triangle. | |
Protected Member Functions | |
| Vector< 3, uint04 > | rawIndex (uint04 index) const |
| Returns raw (non-offset-adjusted) vertex indices for a triangle primitive. | |
Protected Attributes | |
| TableColumn * | m_flag_column |
| Pointer to the vertex flag column (may be nullptr). | |
| uint04 | m_primitive_count |
| The number of triangle primitives. | |
| Geometry::OptimizedPrimitiveDef | m_primitive_def |
| Pre-computed primitive definition for fast access. | |
| TableColumn * | m_vertex_column |
| Pointer to the vertex data column. | |
| uint04 | m_vertex_offset |
| The vertex offset in the shared table. | |
A class to easily iterate each triangle over a Geometry of triangles or meshes.
Definition at line 2736 of file Geometry.h.
|
inline |
Constructs a triangle iterator from a geometry's primitive and vertex properties.
| [in] | primitive_property | The primitive property containing triangle indices. |
| [in] | vertex_property | The vertex property containing position data. |
| [in] | mesh | The geometry to iterate over. |
Definition at line 2749 of file Geometry.h.
References e_triangle_strip, m_flag_column, m_primitive_count, m_primitive_def, m_vertex_column, and m_vertex_offset.
|
inline |
Constructs a triangle iterator using a named custom vertex property.
| [in] | primitive_property | The primitive property containing triangle indices. |
| [in] | vertex_property | The name of the vertex property column. |
| [in] | mesh | The geometry to iterate over. |
Definition at line 2763 of file Geometry.h.
References e_triangle_strip, m_flag_column, m_primitive_count, m_primitive_def, m_vertex_column, and m_vertex_offset.
|
inline |
Retrieves the vertex flags for all three vertices of a triangle.
| [in] | index | The triangle primitive index. |
Definition at line 2815 of file Geometry.h.
References BitFlag, flag(), m_flag_column, and rawIndex().
Referenced by flag().
|
inline |
Retrieves the triangle at the given index.
| [in] | index | The triangle primitive index. |
Definition at line 2777 of file Geometry.h.
References IsInvalid(), m_vertex_column, and rawIndex().
Referenced by operator[]().
|
inline |
Array-style access to a triangle.
| [in] | index | The triangle primitive index. |
Definition at line 2794 of file Geometry.h.
References get().
|
inlineprotected |
Returns raw (non-offset-adjusted) vertex indices for a triangle primitive.
| [in] | index | The triangle primitive index. |
Definition at line 2835 of file Geometry.h.
References m_primitive_def, and Geometry::OptimizedGetPrimitiveVec().
Referenced by flag(), get(), and vertexIndex().
|
inline |
Returns the number of triangle primitives available.
Definition at line 2827 of file Geometry.h.
References m_primitive_count.
|
inline |
Returns the local vertex indices (offset-adjusted) for a triangle.
| [in] | index | The triangle primitive index. |
Definition at line 2802 of file Geometry.h.
References IsValid(), m_vertex_offset, and rawIndex().