![]() |
NDEVR
API Documentation
|
A class to easily iterate each line segment over a Geometry of lines. More...
Public Member Functions | |
| LineIterator () | |
| Default constructor creating an empty iterator. | |
| LineIterator (const LineIterator< t_dims, t_type > &iter) | |
| Copy constructor. | |
| LineIterator (PrimitiveProperty primitive_property, VertexProperty vertex_property, Geometry geo) | |
| Constructs a line iterator from a geometry's primitive and vertex properties. | |
| template<class t_line_type> | |
| LineSegment< t_dims, t_line_type > | get (uint04 index) const |
| Retrieves the line segment at the given index. | |
| LineSegment< t_dims, t_type > | operator[] (uint04 index) const |
| Array-style access to a line segment. | |
| uint04 | size () const |
| Returns the number of line primitives available. | |
| Vector< 2, uint04 > | vertexIndex (uint04 index) const |
| Returns the local vertex indices (offset-adjusted) for a line primitive. | |
Protected Member Functions | |
| bool | isHidden (uint04 index) const |
| Checks whether a vertex is hidden via its flag. | |
| Vector< 2, uint04 > | rawIndex (uint04 index) const |
| Returns raw (non-offset-adjusted) vertex indices for a line primitive. | |
Protected Attributes | |
| TableColumn * | m_flag_column |
| Pointer to the vertex flag column (may be nullptr). | |
| uint04 | m_primitive_count |
| The number of line 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. | |
| VertexProperty | m_vertex_property |
| The vertex property being accessed. | |
A class to easily iterate each line segment over a Geometry of lines.
Definition at line 2598 of file Geometry.h.
|
inline |
Constructs a line iterator from a geometry's primitive and vertex properties.
| [in] | primitive_property | The primitive property containing line indices. |
| [in] | vertex_property | The vertex property containing position data. |
| [in] | geo | The geometry to iterate over. |
Definition at line 2614 of file Geometry.h.
References e_lines, e_polyline, m_flag_column, m_primitive_count, m_primitive_def, m_vertex_column, m_vertex_offset, Geometry::mode(), Geometry::optimizedPrimitiveDef(), and Geometry::vertexCount().
|
inline |
Copy constructor.
| [in] | iter | The iterator to copy from. |
Definition at line 2647 of file Geometry.h.
References LineIterator(), m_flag_column, m_primitive_count, m_primitive_def, m_vertex_column, m_vertex_offset, and m_vertex_property.
|
inline |
Retrieves the line segment at the given index.
| [in] | index | The line primitive index. |
Definition at line 2677 of file Geometry.h.
References isHidden(), IsInvalid(), m_vertex_column, and rawIndex().
Referenced by operator[]().
|
inlineprotected |
Checks whether a vertex is hidden via its flag.
| [in] | index | The raw vertex index (including offset). |
Definition at line 2717 of file Geometry.h.
References cast(), e_is_hidden, and m_flag_column.
Referenced by get().
|
inline |
Array-style access to a line segment.
| [in] | index | The line primitive index. |
Definition at line 2692 of file Geometry.h.
References get().
|
inlineprotected |
Returns raw (non-offset-adjusted) vertex indices for a line primitive.
| [in] | index | The line primitive index. |
Definition at line 2707 of file Geometry.h.
References m_primitive_def, m_vertex_offset, and Geometry::OptimizedGetPrimitiveVec().
Referenced by get(), and vertexIndex().
|
inline |
Returns the number of line primitives available.
Definition at line 2699 of file Geometry.h.
References m_primitive_count.
|
inline |
Returns the local vertex indices (offset-adjusted) for a line primitive.
| [in] | index | The line primitive index. |
Definition at line 2661 of file Geometry.h.
References IsInvalid(), m_vertex_offset, and rawIndex().