59 #ifndef ACG_TRIANGLENODE_HH
60 #define ACG_TRIANGLENODE_HH
64 #include "BaseNode.hh"
71 namespace SceneGraph {
81 typedef std::vector<ACG::Vec3f> PointVector;
84 std::string _name=
"<TriangleNode>" );
92 void boundingBox(
Vec3d& _bbMin,
Vec3d& _bbMax);
100 point_.push_back( _p0 );
101 point_.push_back( _p1 );
102 point_.push_back( _p2 );
105 if ( n.norm() > 0.00001 )
108 n =
Vec3f( 0, 0, 0 );
109 normal_.push_back( n );
118 size_t n_triangles()
const {
return point_.size() / 3; }
120 void triangle(
int _i,
125 _p0 = point_[ 3 * _i + 0 ];
126 _p1 = point_[ 3 * _i + 1 ];
127 _p2 = point_[ 3 * _i + 2 ];
132 enum FaceMode { FACE_NORMALS, FACE_COLORS, PER_VERTEX };
134 void draw_vertices();
136 void draw_wireframe();
148 #endif // ACG_TRIMESHNODE_HH defined
Namespace providing different geometric functions concerning angles.
PickTarget
What target to use for picking.
VectorT< float, 3 > Vec3f