59 #ifndef ACG_TRIANGLENODE_HH 60 #define ACG_TRIANGLENODE_HH 64 #include "BaseNode.hh" 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
PickTarget
What target to use for picking.
VectorT< float, 3 > Vec3f
Namespace providing different geometric functions concerning angles.
auto normalize() -> decltype(*this/=std::declval< VectorT< S, DIM >>().norm())
auto norm() const -> decltype(std::sqrt(std::declval< VectorT< S, DIM >>().sqrnorm()))
compute euclidean norm