cherish
Public Member Functions | Protected Member Functions | List of all members
entity::LineSegment Class Reference

Geometry class that represents a line segment in 3D space. More...

#include <LineSegment.h>

Inheritance diagram for entity::LineSegment:
entity::ShaderedEntity2D entity::Entity2D

Public Member Functions

 LineSegment ()
 
 LineSegment (const LineSegment &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
void editLastPoint (float u, float v)
 
osg::Node * getMeshRepresentation () const
 
virtual cher::ENTITY_TYPE getEntityType () const
 
virtual ProgramLineSegmentgetProgram () const
 
- Public Member Functions inherited from entity::ShaderedEntity2D
 ShaderedEntity2D (unsigned int drawing, osg::Geometry::AttributeBinding binding, const std::string &name, const osg::Vec4f &color)
 
 ShaderedEntity2D (const entity::ShaderedEntity2D &copy, const osg::CopyOp &copyop)
 
virtual void initializeProgram (ProgramEntity2D *p, unsigned int mode=GL_LINE_STRIP)
 
virtual bool copyFrom (const entity::ShaderedEntity2D *copy)
 
virtual void appendPoint (const float u, const float v, osg::Vec4f color)
 
virtual osg::Vec2f getPoint (unsigned int i) const
 
virtual osg::Vec3f getPoint3 (unsigned int i) const
 
virtual bool redefineToShape (osg::MatrixTransform *t=0)=0
 
int getNumPoints () const
 
virtual void moveDelta (double du, double dv)
 
virtual void scale (double scaleX, double scaleY, osg::Vec3f center)
 
virtual void scale (double scale, osg::Vec3f center)
 
virtual void rotate (double theta, osg::Vec3f center)
 
void setLines (osg::DrawArrays *lines)
 
const osg::DrawArrays * getLines () const
 
void setColor (const osg::Vec4f &color)
 
const osg::Vec4f & getColor () const
 
void setSelected (float alpha)
 
void setUnselected (float alpha)
 
void setIsShadered (bool shadered)
 
bool getIsShadered () const
 
virtual void setProgram (ProgramEntity2D *p)
 
- Public Member Functions inherited from entity::Entity2D
 Entity2D (const Entity2D &copy, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 

Protected Member Functions

virtual bool redefineToShader (osg::MatrixTransform *t)
 

Additional Inherited Members

- Protected Attributes inherited from entity::ShaderedEntity2D
osg::ref_ptr< osg::DrawArrays > m_lines
 
osg::observer_ptr< ProgramEntity2Dm_program
 
bool m_isShadered
 
osg::Vec4f m_colorNormal
 
osg::Vec4f m_colorSelected
 

Detailed Description

Geometry class that represents a line segment in 3D space.

Constructor & Destructor Documentation

§ LineSegment() [1/2]

entity::LineSegment::LineSegment ( )

Constructor creates empty line segment.

§ LineSegment() [2/2]

entity::LineSegment::LineSegment ( const LineSegment copy,
const osg::CopyOp &  copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor, only used for serialization.

Member Function Documentation

§ redefineToShader()

bool entity::LineSegment::redefineToShader ( osg::MatrixTransform *  t)
protectedvirtual

A method to tune the look of the entity with shader effects.

Implements entity::ShaderedEntity2D.


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