cherish
LineSegment.h
1 #ifndef LINESEGMENT_H
2 #define LINESEGMENT_H
3 
4 #include "Settings.h"
5 #include "Entity2D.h"
6 #include "ShaderedEntity2D.h"
7 #include "libSGControls/ProgramLineSegment.h"
8 
9 #include "osg/Geometry"
10 #include "osgDB/ObjectWrapper"
11 
12 namespace entity {
13 
18 {
19 public:
21  LineSegment();
22 
24  LineSegment(const LineSegment& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
25 
26  META_Node(entity, LineSegment)
27 
28  virtual bool redefineToShape(osg::MatrixTransform *t = 0);
29 
30  virtual void appendPoint(float u, float v);
31 
32  void editLastPoint(float u, float v);
33 
34  osg::Node* getMeshRepresentation() const;
35 
36 protected:
37  virtual bool redefineToShader(osg::MatrixTransform *t);
38 
39 public:
40  virtual cher::ENTITY_TYPE getEntityType() const;
41  virtual ProgramLineSegment* getProgram() const;
42 
43 }; // class LineSegment
44 
45 } // namespace entity
46 
47 
48 
49 #endif // LINESEGMENT_H
Geometry class that represents a line segment in 3D space.
Definition: LineSegment.h:17
Scene graph entities.
Definition: AddEntityCommand.h:17
virtual bool redefineToShader(osg::MatrixTransform *t)
Definition: LineSegment.cpp:82
Definition: ProgramLineSegment.h:12
virtual void appendPoint(const float u, const float v, osg::Vec4f color)
Definition: ShaderedEntity2D.cpp:78
LineSegment()
Definition: LineSegment.cpp:14
Settings is a configuration variables file for Cherish: enums, consts, defaults. Contains settings su...
Abstract class for all the shaderized entities, i.e., strokes, polygons and line segments.
Definition: ShaderedEntity2D.h:18
virtual bool redefineToShape(osg::MatrixTransform *t=0)=0