25 #ifndef WDATASETPOINTS_H
26 #define WDATASETPOINTS_H
35 #include "../common/WBoundingBox.h"
48 typedef std::shared_ptr< WDataSetPoints >
SPtr;
53 typedef std::shared_ptr< const WDataSetPoints >
ConstSPtr;
63 typedef std::shared_ptr< std::vector< float > >
ColorArray;
120 virtual const std::string
getName()
const;
188 WColor
getColor(
const size_t pointIdx )
const;
252 void init(
bool calcBB =
false );
Dataset to store a bunch of points without order or topology.
virtual const std::string getName() const
Gets the name of this prototype.
std::shared_ptr< WDataSetPoints > SPtr
Pointer to dataset.
VertexArray getVertices() const
Getter for the point vertices.
bool isValidPointIdx(const size_t pointIdx) const
Is this a valid point index?
WColor getColor(const size_t pointIdx) const
The color of a given point.
ColorArray getColors() const
Getter for the point colors.
WBoundingBox m_bb
Axis aligned bounding box for all point-vertices of this dataset.
ColorArray m_colors
An array of the colors per vertex.
std::any m_data
An optional vector for data per vertex.
size_t size() const
Get number of points in this data set.
static std::shared_ptr< WPrototyped > m_prototype
The prototype as singleton.
VertexArray m_vertices
Point vector for all points.
ColorType m_colorType
Which colortype do we use in m_colors.
virtual const std::string getDescription() const
Gets the description for this prototype.
ColorType
The type of colors we have for each point.
virtual bool isTexture() const
Determines whether this dataset can be used as a texture.
void init(bool calcBB=false)
Initialize arrays and bbox if needed.
std::shared_ptr< std::vector< float > > ColorArray
Colors for each vertex in VertexArray.
WPosition getPosition(const size_t pointIdx) const
Query coordinates of a given point.
ColorType getColorType() const
Check the type of color.
std::shared_ptr< std::vector< float > > VertexArray
List of vertex coordinates in term of components of vertices.
std::shared_ptr< const WDataSetPoints > ConstSPtr
Pointer to const dataset.
WPosition operator[](const size_t pointIdx) const
Query coordinates of a given point.
static std::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
std::any getData() const
Getter for the data set.
virtual ~WDataSetPoints()
Destructor.
WBoundingBox getBoundingBox() const
Get the bounding box.
WDataSetPoints()
Constructs a new set of points.
Base class for all data set types.
This only is a 3d double vector.