60 #ifndef ACG_POINTNODE_HH 61 #define ACG_POINTNODE_HH 66 #include "BaseNode.hh" 67 #include "DrawModes.hh" 68 #include <ACG/GL/VertexDeclaration.hh> 93 typedef std::vector<ACG::Vec3d> PointVector;
94 typedef PointVector::iterator PointIter;
95 typedef PointVector::const_iterator ConstPointIter;
96 typedef std::vector<ACG::Vec4f> ColorVector;
97 typedef ColorVector::iterator ColorIter;
98 typedef ColorVector::const_iterator ConstColorIter;
103 std::string _name=
"<PointNode>" )
117 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
126 void reserve(
unsigned int _np,
unsigned int _nn,
unsigned int _nc) {
127 points_.reserve(_np); normals_.reserve(_nn); colors_.reserve(_nc);
147 void clear() { clear_points(); clear_normals(); clear_colors(); }
150 PointVector&
points() {
return points_; }
154 ColorVector&
colors() {
return colors_; }
159 PointVector points_, normals_;
170 #endif // ACG_POINTNODE_HH defined
PointVector & points()
get point container
void clear_colors()
clear colors
size_t n_points() const
how many points?
void clear()
clear points and normals and colors
Class to define the vertex input layout.
void clear_points()
clear points
void add_normal(const ACG::Vec3d &_n)
add normal
void add_point(const ACG::Vec3d &_p)
add point
void reserve(unsigned int _np, unsigned int _nn, unsigned int _nc)
reserve mem for _np points and _nn normals
PointVector & normals()
get normal container
ColorVector & colors()
get color container
Namespace providing different geometric functions concerning angles.
PointNode(BaseNode *_parent=0, std::string _name="<PointNode>")
default constructor
void clear_normals()
clear normals
void add_color(const ACG::Vec4f &_c)
add color