62 #include "TriangleNode.hh" 75 TriangleNode::TriangleNode(
BaseNode* _parent,
85 TriangleNode::~TriangleNode()
96 Vec3f bbMin(FLT_MAX,FLT_MAX,FLT_MAX);
97 Vec3f bbMax(-FLT_MAX,-FLT_MAX,-FLT_MAX);
99 PointVector::const_iterator p_it = point_.begin(),
100 p_end = point_.end();
102 for ( ; p_it != p_end; ++p_it )
146 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
148 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
153 _drawMode & DrawModes::HIDDENLINE )
188 TriangleNode::draw_faces()
190 glBegin(GL_TRIANGLES);
195 for ( ; i < point_.size(); i += 3, j += 1 )
212 TriangleNode::draw_wireframe()
214 glBegin(GL_TRIANGLES);
215 for (
unsigned int i = 0; i < point_.size(); ++i )
DrawMode HIDDENLINE
draw hidden line (2 rendering passes needed)
DrawMode SOLID_FLAT_SHADED
draw flat shaded faces (requires face normals)
DrawMode WIREFRAME
draw wireframe
void boundingBox(Vec3d &_bbMin, Vec3d &_bbMax)
void glNormal(const Vec3f &_n)
Wrapper: glNormal for Vec3f.
void glVertex(const Vec2i &_v)
Wrapper: glVertex for Vec2i.
PickTarget
What target to use for picking.
vector_type & maximize(const vector_type &_rhs)
maximize values: same as *this = max(*this, _rhs), but faster
static void enable(GLenum _cap)
replaces glEnable, but supports locking
DrawMode SOLID_FACES_COLORED
draw colored, but not lighted faces using face colors
DrawModes::DrawMode availableDrawModes() const
bool pick_set_maximum(unsigned int _idx)
Set the maximal number of primitives/components of your object.
static void depthRange(GLclampd _zNear, GLclampd _zFar)
replaces glDepthRange, supports locking
static void disable(GLenum _cap)
replaces glDisable, but supports locking
Namespace providing different geometric functions concerning angles.
void pick_set_name(unsigned int _idx)
sets the current name/color (like glLoadName(_idx))
DrawMode NONE
not a valid draw mode
vector_type & minimize(const vector_type &_rhs)
minimize values: same as *this = min(*this, _rhs), but faster
VectorT< double, 3 > Vec3d
static void shadeModel(GLenum _mode)
replaces glShadeModel, supports locking