VR-Forces 4.0.4 Class Documentation
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]

List of all members.

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.

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

Detailed Description

vrvGraphics implementation of a 2D polygon


Constructor & Destructor Documentation

CTOR.

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.

Get the polygon's visibility status.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::rotate ( const osg::Vec2 &  v,
double  rad 
) [static, protected]

Utility function to rotate a vec2.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::translate ( const osg::Vec2 &  v,
const osg::Vec2 &  translation 
) [static, protected]

Utility function to translate a vec2.

static osg::Vec2 makVrv::DtOsgWindowPolygonInstance::scale ( const osg::Vec2 &  v,
double  s 
) [static, protected]

Utility function to scale a vec2.

virtual void makVrv::DtOsgWindowPolygonInstance::updateVertices ( ) [protected, virtual]

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

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


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)