VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
makVrv::DtOsgWindowPolygonInstance Class Reference

vrvGraphics implementation of a 2D polygon More...

Inheritance diagram for makVrv::DtOsgWindowPolygonInstance:
Inheritance graph
[legend]

Public Member Functions

 DtOsgWindowPolygonInstance (DtDe &de)
 CTOR.
virtual ~DtOsgWindowPolygonInstance ()
 DTOR.
virtual void setVisible (bool isVisible)
 Set the polygon visible or invisible.
virtual void setFillPattern (unsigned int fillPattern)
 Set the polygon's fill pattern.
virtual void setScale (double scale)
 Set the polygon's scale.
virtual void setRotation (double rotation)
 Set the polygon's rotation in radians clockwise.
virtual void setNumVertices (unsigned int numVertices)
 Set the number of vertices in the polygon.
virtual void setVertex (int i, double x, double y)
 Set one of the polygon's vertices.
virtual void setColor (float r, float g, float b, float a)
 Set the polygon's color.
virtual void setFill (bool fill)
 Set the polygon filled or outlined.
virtual const VertexListvertices () const
 Get the polygon's vertices.
virtual bool visible () const
 Get the polygon's visibility status.
- Public Member Functions inherited from makVrv::DtWindowPolygonInstance
virtual ~DtWindowPolygonInstance ()
 DTOR.
- Public Member Functions inherited from makVrv::DtSetVisibilityInterface
virtual ~DtSetVisibilityInterface ()

Protected Member Functions

virtual void updateVertices ()
 Update the graphic polygon's vertices according to the current state.
void createPolygon ()
 Create myPolygon according to current state Called from the constructor, so this can't be virtual.

Static Protected Member Functions

static osg::Vec2 rotate (const osg::Vec2 &v, double rad)
 Utility function to rotate a vec2.
static osg::Vec2 translate (const osg::Vec2 &v, const osg::Vec2 &translation)
 Utility function to translate a vec2.
static osg::Vec2 scale (const osg::Vec2 &v, double s)
 Utility function to scale a vec2.

Protected Attributes

DtDemyDe
DtPolygonmyPolygon
VertexList myVertices
double myRotation
double myScale
unsigned int myFillPattern
float myColorR
float myColorG
float myColorB
float myColorA
bool myFill

Additional Inherited Members

- Public Types inherited from makVrv::DtWindowPolygonInstance
typedef std::vector< VertexVertexList

Detailed Description

vrvGraphics implementation of a 2D polygon

Constructor & Destructor Documentation

makVrv::DtOsgWindowPolygonInstance::DtOsgWindowPolygonInstance ( DtDe de)

CTOR.

virtual makVrv::DtOsgWindowPolygonInstance::~DtOsgWindowPolygonInstance ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtOsgWindowPolygonInstance::setVisible ( bool  isVisible)
virtual

Set the polygon visible or invisible.

Implements makVrv::DtSetVisibilityInterface.

virtual void makVrv::DtOsgWindowPolygonInstance::setFillPattern ( unsigned int  fillPattern)
virtual

Set the polygon's fill pattern.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setScale ( double  scale)
virtual

Set the polygon's scale.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setRotation ( double  rotation)
virtual

Set the polygon's rotation in radians clockwise.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setNumVertices ( unsigned int  numVertices)
virtual

Set the number of vertices in the polygon.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setVertex ( int  i,
double  x,
double  y 
)
virtual

Set one of the polygon's vertices.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the polygon's color.

Implements makVrv::DtWindowPolygonInstance.

virtual void makVrv::DtOsgWindowPolygonInstance::setFill ( bool  fill)
virtual

Set the polygon filled or outlined.

Implements makVrv::DtWindowPolygonInstance.

virtual const VertexList& makVrv::DtOsgWindowPolygonInstance::vertices ( ) const
virtual

Get the polygon's vertices.

Implements makVrv::DtWindowPolygonInstance.

virtual bool makVrv::DtOsgWindowPolygonInstance::visible ( ) const
virtual

Get the polygon's visibility status.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::rotate ( const osg::Vec2 &  v,
double  rad 
)
staticprotected

Utility function to rotate a vec2.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::translate ( const osg::Vec2 &  v,
const osg::Vec2 &  translation 
)
staticprotected

Utility function to translate a vec2.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::scale ( const osg::Vec2 &  v,
double  s 
)
staticprotected

Utility function to scale a vec2.

virtual void makVrv::DtOsgWindowPolygonInstance::updateVertices ( )
protectedvirtual

Update the graphic polygon's vertices according to the current state.

void makVrv::DtOsgWindowPolygonInstance::createPolygon ( )
protected

Create myPolygon according to current state Called from the constructor, so this can't be virtual.

Member Data Documentation

DtDe& makVrv::DtOsgWindowPolygonInstance::myDe
protected
DtPolygon* makVrv::DtOsgWindowPolygonInstance::myPolygon
protected
VertexList makVrv::DtOsgWindowPolygonInstance::myVertices
protected
double makVrv::DtOsgWindowPolygonInstance::myRotation
protected
double makVrv::DtOsgWindowPolygonInstance::myScale
protected
unsigned int makVrv::DtOsgWindowPolygonInstance::myFillPattern
protected
float makVrv::DtOsgWindowPolygonInstance::myColorR
protected
float makVrv::DtOsgWindowPolygonInstance::myColorG
protected
float makVrv::DtOsgWindowPolygonInstance::myColorB
protected
float makVrv::DtOsgWindowPolygonInstance::myColorA
protected
bool makVrv::DtOsgWindowPolygonInstance::myFill
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)