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