NDEVR
API Documentation
VertexColorIterator.h
1#pragma once
2#include <NDEVR/Model.h>
3#include <NDEVR/Geometry.h>
4#include <NDEVR/Material.h>
5#include <NDEVR/DesignParameter.h>
6#include <NDEVR/RGBColor.h>
7namespace NDEVR
8{
13 class NDEVR_DESIGN_API VertexColorIterator
14 {
15 public:
23 VertexColorIterator(const Model& model, const Geometry& geo, const Material& material, const UVType& uv_type = UVType::e_KD);
24
31
37 BitFlag flag(uint04 index) const
38 {
39 BitFlag flag(0);
40 if(m_flag_column == nullptr)
41 return flag;
42 flag = m_flag_column->get<uint01>(m_vertex_offset + index);
43 return flag;
44 }
45
50 uint04 size() const
51 {
52 return m_vertex_count;
53 }
54 private:
55 Matrix<fltp08> m_transform;
56 const TableColumn* m_data_column;
57 const TableColumn* m_flag_column;
58 const Material::UVMode m_uv_mode;
59 const uint04 m_vertex_offset;
60 const uint04 m_vertex_count;
61 RGBColor m_constant_color;
62 DesignParameter m_parameter;
63 Material m_material;
64 fltp08 m_min_value;
65 fltp08 m_mid_value;
66 fltp08 m_max_value;
67 Buffer<RGBColor> m_palette_colors;
68 };
69}
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
Definition BitFlag.hpp:55
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A definition of data that is logically stored in the Model hierarchy.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:143
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:153
UVMode
Defines UV mapping modes that control how texture colors are determined for surfaces.
Definition Material.h:185
Templated logic for doing matrix multiplication.
Definition Matrix.hpp:182
A core class that represents a node on model hierarchy.
Definition Model.h:292
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:57
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
Definition TableColumn.h:86
uint04 size() const
Returns the number of vertices this iterator covers.
RGBColor operator[](uint04 index) const
Computes the color for a vertex at the given index.
BitFlag flag(uint04 index) const
Retrieves the bit flag associated with a vertex at the given index.
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.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
UVType
Channels that describe how an object should interact with light.
@ e_KD
Diffuse texture/color channel.