VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Types | Protected Attributes
makVrv::DtOutlinedPolygon Class Reference

A convex polygon drawn using lines. More...

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

List of all members.

Public Member Functions

 DtOutlinedPolygon (DtOverlayRenderer &renderer, DtWidgetPicker &picker)
 CTOR.
 DtOutlinedPolygon (DtLineRenderer &renderer, DtWidgetPicker &picker)
 CTOR.
virtual ~DtOutlinedPolygon ()
 DTOR.
virtual void setEventsEnabled (bool enabled, unsigned long long userData=0)
 Set whether the sprite has widget events.
bool eventsEnabled () const
 Get whether events are already enabled.
virtual void setVertexCount (unsigned int vertexCount)
 Set the number of vertices, set the number of vertices before setting their parameters (position, color etc).
virtual unsigned int vertexCount () const
 Get the vertex count.
virtual void set2DPositions (const std::vector< float > &vertices)
 Set the number of vertices and their positions.
virtual void set2DPosition (unsigned int vertexIndex, float x1, float y1)
 Set the vertex positions.
virtual void get2DPosition (unsigned int vertexIndex, float &x, float &y) const
 Get the vertex position.
virtual void set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w)
 Set one vertex position.
virtual void get3DPosition (unsigned int vertexIndex, float &x, float &y, float &z, float &w) const
 Get the vertex position.
virtual void set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l)
 Sets an optional 3D direction with a 2D length value for a vertex.
virtual void setVertexColor (unsigned int index, float r, float g, float b, float a)
 Set the color of a specific vertex.
virtual void getVertexColor (unsigned int index, float &r, float &g, float &b, float &a)
 Get the color of a specific vertex.
virtual void setColor (float r, float g, float b, float a)
 Set entire poly-line color.
virtual void getColor (float &r, float &g, float &b, float &a) const
 Get the poly-line color.
void setStippleParameters (unsigned int scale, unsigned short pattern)
 Set the entire poly-line stipple.
virtual void setStipple (unsigned int stipplePattern)
 Set the stipple pattern.
virtual void setOutlineWidth (float)
 Sets the width of the line segments that comprise the polygon.
virtual void setEventOutlineWidth (float)
 Sets the width of the event outline segments.

Protected Types

typedef std::vector
< DtLineSegment * > 
LineSegmentList
typedef std::vector
< DtPickableLine * > 
PickableSegmentList

Protected Attributes

DtLineRenderermyRenderer
DtWidgetPickermyPicker
LineSegmentList myLineSegments
PickableSegmentList myPickableSegments
bool myEventsEnabled
unsigned long long myUserData
float myWidth
float myEventWidth

Detailed Description

A convex polygon drawn using lines.


Member Typedef Documentation

typedef std::vector<DtLineSegment*> makVrv::DtOutlinedPolygon::LineSegmentList [protected]

Constructor & Destructor Documentation

CTOR.

CTOR.

DTOR.


Member Function Documentation

virtual void makVrv::DtOutlinedPolygon::setEventsEnabled ( bool  enabled,
unsigned long long  userData = 0 
) [virtual]

Set whether the sprite has widget events.

Disabling events disconnects all of the DtOutlinedPolygon signals The user data is set when enabling the events, to change only the user data make multiple calls with enabled=true

Implements makVrv::DtPolygon.

Get whether events are already enabled.

virtual void makVrv::DtOutlinedPolygon::setVertexCount ( unsigned int  vertexCount) [virtual]

Set the number of vertices, set the number of vertices before setting their parameters (position, color etc).

Implements makVrv::DtPolygon.

virtual unsigned int makVrv::DtOutlinedPolygon::vertexCount ( ) const [virtual]

Get the vertex count.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::set2DPositions ( const std::vector< float > &  vertices) [virtual]

Set the number of vertices and their positions.

vertices must be x,y,z encoded triplets.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::set2DPosition ( unsigned int  vertexIndex,
float  x1,
float  y1 
) [virtual]

Set the vertex positions.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::get2DPosition ( unsigned int  vertexIndex,
float &  x,
float &  y 
) const [virtual]

Get the vertex position.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::set3DPosition ( unsigned int  vertexIndex,
float  x,
float  y,
float  z,
float  w 
) [virtual]

Set one vertex position.

Warning:
It is much more efficient to update all vertices using setPositions if several change.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::get3DPosition ( unsigned int  vertexIndex,
float &  x,
float &  y,
float &  z,
float &  w 
) const [virtual]

Get the vertex position.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::set3DDirectionAndLength ( unsigned int  index,
float  x,
float  y,
float  z,
float  l 
) [virtual]

Sets an optional 3D direction with a 2D length value for a vertex.

Parameters:
indexthe index of the vertex to get the position of
xx component of the position
yy component of the position
zz component of the position
ll length of the vector offset in 2D.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::setVertexColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
) [virtual]

Set the color of a specific vertex.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::getVertexColor ( unsigned int  index,
float &  r,
float &  g,
float &  b,
float &  a 
) [virtual]

Get the color of a specific vertex.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::setColor ( float  r,
float  g,
float  b,
float  a 
) [virtual]

Set entire poly-line color.

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const [virtual]

Get the poly-line color.

Implements makVrv::DtPolygon.

void makVrv::DtOutlinedPolygon::setStippleParameters ( unsigned int  scale,
unsigned short  pattern 
)

Set the entire poly-line stipple.

Scale is from 1-256. Pattern is 16 bit mask. Warning Stippled lines are rendered significantly slower than non-Stippled lines. Setting the pattern to NoStipple causes the line not to be stippled anymore.

virtual void makVrv::DtOutlinedPolygon::setStipple ( unsigned int  stipplePattern) [virtual]

Set the stipple pattern.

This pattern is used as a bitmask against the pixels of the polygon The default value is 0xFFFFFFFF, which is equivalent to no stippling

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::setOutlineWidth ( float  ) [virtual]

Sets the width of the line segments that comprise the polygon.

virtual void makVrv::DtOutlinedPolygon::setEventOutlineWidth ( float  ) [virtual]

Sets the width of the event outline segments.

To use the outline width as the event width set the event outline width to -1.0f;


Member Data Documentation

unsigned long long makVrv::DtOutlinedPolygon::myUserData [protected]

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)