54 #ifndef ACG_POINTNODE_HH 55 #define ACG_POINTNODE_HH 60 #include "BaseNode.hh" 61 #include "DrawModes.hh" 62 #include <ACG/GL/VertexDeclaration.hh> 87 typedef std::vector<ACG::Vec3d> PointVector;
88 typedef PointVector::iterator PointIter;
89 typedef PointVector::const_iterator ConstPointIter;
90 typedef std::vector<ACG::Vec4f> ColorVector;
91 typedef ColorVector::iterator ColorIter;
92 typedef ColorVector::const_iterator ConstColorIter;
97 const std::string & _name=
"<PointNode>" )
111 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
120 void reserve(
unsigned int _np,
unsigned int _nn,
unsigned int _nc) {
121 points_.reserve(_np); normals_.reserve(_nn); colors_.reserve(_nc);
141 void clear() { clear_points(); clear_normals(); clear_colors(); }
144 PointVector&
points() {
return points_; }
148 ColorVector&
colors() {
return colors_; }
153 PointVector points_, normals_;
164 #endif // ACG_POINTNODE_HH defined void add_point(const ACG::Vec3d &_p)
add point
Namespace providing different geometric functions concerning angles.
Class to define the vertex input layout.
void clear()
clear points and normals and colors
size_t n_points() const
how many points?
void clear_normals()
clear normals
ColorVector & colors()
get color container
void add_normal(const ACG::Vec3d &_n)
add normal
void clear_points()
clear points
PointVector & normals()
get normal container
void add_color(const ACG::Vec4f &_c)
add color
PointVector & points()
get point container
void clear_colors()
clear colors
void reserve(unsigned int _np, unsigned int _nn, unsigned int _nc)
reserve mem for _np points and _nn normals
PointNode(BaseNode *_parent=0, const std::string &_name="<PointNode>")
default constructor