NDEVR
API Documentation
VertexColorIterator

Allows for the calculation of colors for any vertex given a Material and Geometry. More...

Public Member Functions

 VertexColorIterator (const Model &model, const Geometry &geo, const Material &material, const UVType &uv_type=UVType::e_KD)
 Constructs a VertexColorIterator from a Model, Geometry, and Material.
BitFlag flag (uint04 index) const
 Retrieves the bit flag associated with a vertex at the given index.
RGBColor operator[] (uint04 index) const
 Computes the color for a vertex at the given index.
uint04 size () const
 Returns the number of vertices this iterator covers.

Detailed Description

Allows for the calculation of colors for any vertex given a Material and Geometry.


Definition at line 13 of file VertexColorIterator.h.

Constructor & Destructor Documentation

◆ VertexColorIterator()

VertexColorIterator::VertexColorIterator ( const Model & model,
const Geometry & geo,
const Material & material,
const UVType & uv_type = UVType::e_KD )

Constructs a VertexColorIterator from a Model, Geometry, and Material.


Parameters
[in]modelThe model providing context for color computation.
[in]geoThe geometry whose vertices will be colored.
[in]materialThe material used to determine vertex colors.
[in]uv_typeThe UV type channel to use for color lookup. Defaults to UVType::e_KD.

References e_KD.

Member Function Documentation

◆ flag()

BitFlag VertexColorIterator::flag ( uint04 index) const
inline

Retrieves the bit flag associated with a vertex at the given index.


Parameters
[in]indexThe vertex index within the geometry.
Returns
The BitFlag for the specified vertex, or a default BitFlag if no flag column exists.

Definition at line 37 of file VertexColorIterator.h.

References flag().

Referenced by flag().

◆ operator[]()

RGBColor VertexColorIterator::operator[] ( uint04 index) const

Computes the color for a vertex at the given index.


Parameters
[in]indexThe vertex index within the geometry.
Returns
The computed RGBColor for the specified vertex.

◆ size()

uint04 VertexColorIterator::size ( ) const
inline

Returns the number of vertices this iterator covers.


Returns
The vertex count.

Definition at line 50 of file VertexColorIterator.h.


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