

Public Types | |
| typedef std::vector< ACG::Vec3f > | PointVector |
Public Member Functions | |
| TriangleNode (BaseNode *_parent=0, std::string _name="<TriangleNode>") | |
| ACG_CLASSNAME (TriangleNode) | |
| unsigned int | availableDrawModes () const |
| void | boundingBox (Vec3f &_bbMin, Vec3f &_bbMax) |
| void | draw (GLState &_state, unsigned int _drawMode) |
| void | pick (GLState &_state, PickTarget _target) |
| void | add_triangle (const ACG::Vec3f &_p0, const ACG::Vec3f &_p1, const ACG::Vec3f &_p2) |
| void | clear () |
| int | n_triangles () const |
| void | triangle (int _i, ACG::Vec3f &_p0, ACG::Vec3f &_p1, ACG::Vec3f &_p2) const |
Protected Types | |
| enum | FaceMode { FACE_NORMALS, FACE_COLORS, PER_VERTEX } |
Protected Member Functions | |
| void | draw_vertices () |
| void | draw_faces () |
| void | draw_wireframe () |
Protected Attributes | |
| PointVector | point_ |
| PointVector | normal_ |
Definition at line 69 of file TriangleNode.hh.
| unsigned int ACG::SceneGraph::TriangleNode::availableDrawModes | ( | ) | const [virtual] |
Return a list of available draw modes for this node: should be OR'ed from the items of the enum DrawModeIDs.
Reimplemented from ACG::SceneGraph::BaseNode.
Definition at line 106 of file TriangleNode.cc.
References ACG::SceneGraph::DrawModes::HIDDENLINE, ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED, and ACG::SceneGraph::DrawModes::WIREFRAME.
| void ACG::SceneGraph::TriangleNode::boundingBox | ( | Vec3f & | , | |
| Vec3f & | ||||
| ) | [virtual] |
Compute the bounding box of this node and update the values _bbMin and _bbMax accordingly. Do not initialize _bbMin and _bbMax since they may already store values of previous nodes' bounding box computation.
Reimplemented from ACG::SceneGraph::BaseNode.
Definition at line 88 of file TriangleNode.cc.
| void ACG::SceneGraph::TriangleNode::draw | ( | GLState & | , | |
| unsigned int | ||||
| ) | [virtual] |
Draw this node using the draw modes _drawMode
Reimplemented from ACG::SceneGraph::BaseNode.
Definition at line 124 of file TriangleNode.cc.
References ACG::SceneGraph::BaseNode::depthFunc(), ACG::SceneGraph::DrawModes::HIDDENLINE, ACG::SceneGraph::DrawModes::SOLID_FACES_COLORED, ACG::SceneGraph::DrawModes::SOLID_FLAT_SHADED, and ACG::SceneGraph::DrawModes::WIREFRAME.
| void ACG::SceneGraph::TriangleNode::pick | ( | GLState & | , | |
| PickTarget | ||||
| ) | [virtual] |
Draw the node using the GL picking name stack. The node's ID will already be on the name stack, so only names identifing e.g. faces should be used ( by glLoadName() ).
Reimplemented from ACG::SceneGraph::BaseNode.
Definition at line 212 of file TriangleNode.cc.
References ACG::GLState::pick_set_maximum(), and ACG::GLState::pick_set_name().