API Documentation
Loading...
Searching...
No Matches
VertexColorIterator.h
Go to the documentation of this file.
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{
9 /**--------------------------------------------------------------------------------------------------
10 \brief Allows for the calculation of colors for any vertex given a Material and Geometry.
11 **/
13 {
14 public:
15 VertexColorIterator(const Model& model, const Geometry& geo, const Material& material, const UVType& uv_type = UVType::e_KD);
17 BitFlag flag(uint04 index) const
18 {
19 const BitFlag flag = m_flag_column.get<uint01>(m_vertex_offset + index);
20 return flag;
21 }
22 uint04 size() const
23 {
24 return m_vertex_count;
25 }
26 private:
27 Matrix<fltp08> m_transform;
28 const TableColumn* m_data_column;
29 const TableColumn& m_flag_column;
30 const Material::UVMode m_uv_mode;
31 const VertexProperty m_vertex_property;
32 const uint04 m_vertex_offset;
33 const uint04 m_vertex_count;
34 RGBColor m_constant_color;
35 DesignParameter m_parameter;
36 Material m_material;
37 fltp08 m_min_value;
38 fltp08 m_mid_value;
39 fltp08 m_max_value;
40 Buffer<RGBColor> m_palette_colors;
41 };
42}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
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. The basic array unit of the library.
Definition Buffer.hpp:56
A definition of data that is logically stored in the Model heirarchy. Data could be a property of a M...
Definition DesignParameter.h:46
A core class within the model heirarchy containing vertex-based data (Usually 3D data) within a set c...
Definition Geometry.h:64
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:51
UVMode
Definition Material.h:74
Definition Matrix.hpp:176
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
Definition TableColumn.h:76
Allows for the calculation of colors for any vertex given a Material and Geometry.
Definition VertexColorIterator.h:13
VertexColorIterator(const Model &model, const Geometry &geo, const Material &material, const UVType &uv_type=UVType::e_KD)
uint04 size() const
Definition VertexColorIterator.h:22
RGBColor operator[](uint04 index) const
BitFlag flag(uint04 index) const
Definition VertexColorIterator.h:17
Definition ACIColor.h:37
VertexProperty
Definition DesignObjectBase.h:52
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149
UVType
Channels that describe how an object should interact with light.
Definition DesignObjectBase.h:133