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 Types | Protected Member Functions | Protected Attributes
makVrv::DtOutlinedPolygon Class Reference

A convex polygon drawn using lines. More...

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

Public Member Functions

 DtOutlinedPolygon (DtOverlayRenderer &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.
virtual int group () const
 Returns the group that the polygon is on (for Z-Ordering)
virtual void setGroup (int)
 Sets the group for Z-ordering.
virtual DtLineSegmentInterfacecreateAndInitNewSegment ()
 Creates and initializes a new segment.
- Public Member Functions inherited from makVrv::DtPolygon
virtual ~DtPolygon ()

Protected Types

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

Protected Member Functions

virtual void slot_pickerDestroyed ()
 Called when the widget picker is destroyed, clears out pickable segment list and sets a flag to no longer use the picker.

Protected Attributes

DtOverlayRenderermyRenderer
DtWidgetPickermyPicker
LineSegmentList myLineSegments
PickableSegmentList myPickableSegments
bool myEventsEnabled
unsigned long long myUserData
unsigned short myStipplePattern
float myWidth
float myEventWidth
int myGroup
bool myPickerDestroyed
bool myPickerConnected

Detailed Description

A convex polygon drawn using lines.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtOutlinedPolygon::DtOutlinedPolygon ( DtOverlayRenderer renderer,
DtWidgetPicker picker 
)

CTOR.

virtual makVrv::DtOutlinedPolygon::~DtOutlinedPolygon ( )
virtual

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.

bool makVrv::DtOutlinedPolygon::eventsEnabled ( ) const

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;

virtual int makVrv::DtOutlinedPolygon::group ( ) const
virtual

Returns the group that the polygon is on (for Z-Ordering)

Implements makVrv::DtPolygon.

virtual void makVrv::DtOutlinedPolygon::setGroup ( int  )
virtual

Sets the group for Z-ordering.

Implements makVrv::DtPolygon.

virtual DtLineSegmentInterface* makVrv::DtOutlinedPolygon::createAndInitNewSegment ( )
virtual

Creates and initializes a new segment.

Reimplemented in makVrv::DtTexturedOutlinedPolygon.

virtual void makVrv::DtOutlinedPolygon::slot_pickerDestroyed ( )
protectedvirtual

Called when the widget picker is destroyed, clears out pickable segment list and sets a flag to no longer use the picker.

Member Data Documentation

DtOverlayRenderer& makVrv::DtOutlinedPolygon::myRenderer
protected
DtWidgetPicker& makVrv::DtOutlinedPolygon::myPicker
protected
LineSegmentList makVrv::DtOutlinedPolygon::myLineSegments
protected
PickableSegmentList makVrv::DtOutlinedPolygon::myPickableSegments
protected
bool makVrv::DtOutlinedPolygon::myEventsEnabled
protected
unsigned long long makVrv::DtOutlinedPolygon::myUserData
protected
unsigned short makVrv::DtOutlinedPolygon::myStipplePattern
protected
float makVrv::DtOutlinedPolygon::myWidth
protected
float makVrv::DtOutlinedPolygon::myEventWidth
protected
int makVrv::DtOutlinedPolygon::myGroup
protected
bool makVrv::DtOutlinedPolygon::myPickerDestroyed
protected
bool makVrv::DtOutlinedPolygon::myPickerConnected
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)