ACG::SceneGraph::LineNode Class Reference

#include <ACG/Scenegraph/LineNode.hh>

Inheritance diagram for ACG::SceneGraph::LineNode:
Inheritance graph
[legend]
Collaboration diagram for ACG::SceneGraph::LineNode:
Collaboration graph
[legend]

List of all members.

Public Types

enum  LineMode { LineSegmentsMode, PolygonMode }
 

Line mode: draw line segments (every 2 points) or ONE polyline.


typedef std::vector< Vec3f > PointVector
typedef PointVector::iterator PointIter
typedef PointVector::const_iterator ConstPointIter
typedef std::vector< ACG::Vec3uc > ColorVector
typedef ColorVector::iterator ColorIter
typedef ColorVector::const_iterator ConstColorIter
typedef Vec3f value_type
typedef Vec3f & reference
typedef const Vec3f & const_reference

Public Member Functions

 LineNode (LineMode _mode, BaseNode *_parent=0, std::string _name="<LineNode>")
 default constructor
 ~LineNode ()
 destructor
void set_line_mode (LineMode _mode)
 set line mode (see LineNode::LineMode)
 ACG_CLASSNAME (LineNode)
 static name of this class
unsigned int availableDrawModes () const
 return available draw modes
void boundingBox (Vec3f &_bbMin, Vec3f &_bbMax)
 update bounding box
void draw (GLState &_state, unsigned int _drawMode)
 draw lines and normals
void reserve_lines (unsigned int _n)
 reserve mem for _n lines
void reserve_points (unsigned int _n)
 reserve mem for _n points
void clear ()
 clear points/lines and colors
void clear_points ()
 clear points/lines
void clear_colors ()
 clear colors
void add_point (const Vec3f &_v)
 add point (for LineMode == PolygonMode)
void add_line (const Vec3f &_v0, const Vec3f &_v1)
 add line (for LineMode == LineSegmentsMode)
void add_color (const ACG::Vec3uc &_c)
 add color (only for LineMode == LineSegmentsMode)
unsigned int n_points () const
 number of points
const PointVector & points () const
 return reference to point vector
ColorVector & colors ()
 get color container
void push_back (const Vec3f &_v)
 STL conformance.

Protected Attributes

PointVector points_
ColorVector colors_
LineMode line_mode_

Detailed Description

LineNode renders a set of line segments or polylines.

LineNode renders a set of line segments or one connected polyline, depending on the LineMode, that can be set using the set_line_mode(LineMode) method.

Definition at line 81 of file LineNode.hh.


The documentation for this class was generated from the following files:

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .