NDEVR
API Documentation
VertexLookup

A class to easily iterate each vertex of a Geometry. More...

Inheritance diagram for VertexLookup:
[legend]
Collaboration diagram for VertexLookup:
[legend]

Public Member Functions

 VertexLookup ()
 Default constructor creating an empty lookup.
 VertexLookup (const StringView &vertex_property, Geometry geo)
 Constructs a lookup for a named custom vertex property.
 VertexLookup (VertexProperty vertex_property, Geometry geo)
 Constructs a lookup for a standard vertex property.
BitFlag flag (uint04 index) const
 Retrieves the vertex flags at the given index.
template<class t_type>
t_type get (uint04 index) const
 Retrieves a vertex value at the given index.
void setFlag (uint04 index, const BitFlag &value)
 Sets the flag value for a vertex, creating the flag column if necessary.
template<class t_type>
void setVertex (uint04 index, const t_type &value)
 Sets a vertex value at the given index.
uint04 size () const
 Returns the number of vertices available for iteration.
void swap (uint04 a, uint04 b)
 Swaps two vertex entries in the column.

Public Attributes

TableColumnm_column
 Pointer to the vertex data column.
TableColumnm_flag_column
 Pointer to the vertex flag column (may be nullptr).
Geometry m_geo
 The geometry being iterated.
uint04 m_vertex_count
 The number of vertices in this geometry.
uint04 m_vertex_offset
 The offset of this geometry's vertices in the shared table.
VertexProperty m_vertex_property
 The vertex property being accessed.

Detailed Description

A class to easily iterate each vertex of a Geometry.


Definition at line 2454 of file Geometry.h.

Constructor & Destructor Documentation

◆ VertexLookup() [1/2]

VertexLookup::VertexLookup ( VertexProperty vertex_property,
Geometry geo )
inline

Constructs a lookup for a standard vertex property.

Parameters
[in]vertex_propertyThe vertex property to iterate.
[in]geoThe geometry to iterate over.

Definition at line 2470 of file Geometry.h.

References m_column, m_flag_column, m_geo, m_vertex_count, m_vertex_offset, and m_vertex_property.

◆ VertexLookup() [2/2]

VertexLookup::VertexLookup ( const StringView & vertex_property,
Geometry geo )
inline

Constructs a lookup for a named custom vertex property.

Parameters
[in]vertex_propertyThe property name.
[in]geoThe geometry to iterate over.

Definition at line 2483 of file Geometry.h.

References m_column, m_flag_column, m_geo, m_vertex_count, m_vertex_offset, and m_vertex_property.

Member Function Documentation

◆ flag()

BitFlag VertexLookup::flag ( uint04 index) const
inline

Retrieves the vertex flags at the given index.

Parameters
[in]indexThe vertex index.
Returns
The BitFlag value (0 if no flag column exists).

Definition at line 2507 of file Geometry.h.

References flag(), m_flag_column, and m_vertex_offset.

Referenced by flag().

◆ get()

template<class t_type>
t_type VertexLookup::get ( uint04 index) const
inline

Retrieves a vertex value at the given index.

Parameters
[in]indexThe vertex index.
Returns
The vertex value.

Definition at line 2497 of file Geometry.h.

References m_column, and m_vertex_offset.

Referenced by VertexIterator< t_type >::operator[]().

◆ setFlag()

void VertexLookup::setFlag ( uint04 index,
const BitFlag & value )
inline

Sets the flag value for a vertex, creating the flag column if necessary.

Parameters
[in]indexThe vertex index.
[in]valueThe BitFlag value to set.

Definition at line 2535 of file Geometry.h.

References BitFlag, m_flag_column, m_geo, and m_vertex_offset.

Referenced by GridMesh< t_dims >::setupVertexTable().

◆ setVertex()

template<class t_type>
void VertexLookup::setVertex ( uint04 index,
const t_type & value )
inline

Sets a vertex value at the given index.

Parameters
[in]indexThe vertex index.
[in]valueThe value to set.

Definition at line 2527 of file Geometry.h.

References m_column, and m_vertex_offset.

Referenced by GridMesh< t_dims >::setupVertexTable().

◆ size()

uint04 VertexLookup::size ( ) const
inline

Returns the number of vertices available for iteration.

Returns
The vertex count.

Definition at line 2549 of file Geometry.h.

References m_vertex_count.

◆ swap()

void VertexLookup::swap ( uint04 a,
uint04 b )
inline

Swaps two vertex entries in the column.

Parameters
[in]aThe first vertex index.
[in]bThe second vertex index.

Definition at line 2518 of file Geometry.h.

References m_column, and m_vertex_offset.


The documentation for this class was generated from the following file: