60 #ifndef ACG_POINTNODE_HH
61 #define ACG_POINTNODE_HH
66 #include "BaseNode.hh"
67 #include "DrawModes.hh"
68 #include <ACG/GL/VertexDeclaration.hh>
74 namespace SceneGraph {
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
size_t n_points() const
how many points?
Namespace providing different geometric functions concerning angles.
void add_color(const ACG::Vec4f &_c)
add color
void clear()
clear points and normals and colors
PointNode(BaseNode *_parent=0, std::string _name="<PointNode>")
default constructor
void clear_points()
clear points
void reserve(unsigned int _np, unsigned int _nn, unsigned int _nc)
reserve mem for _np points and _nn normals
ColorVector & colors()
get color container
void add_normal(const ACG::Vec3d &_n)
add normal
Class to define the vertex input layout.
void clear_colors()
clear colors
void clear_normals()
clear normals
PointVector & normals()
get normal container
PointVector & points()
get point container
void add_point(const ACG::Vec3d &_p)
add point