VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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.

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

Public Member Functions

 DtOutlinedPolygon (DtOverlayRenderer &renderer, DtWidgetPicker &picker)
 
virtual ~DtOutlinedPolygon ()
 
virtual void setEventsEnabled (bool enabled, unsigned long long userData=0)
 
bool eventsEnabled () const
 
virtual void setVertexCount (unsigned int vertexCount)
 
virtual unsigned int vertexCount () const
 
virtual void set2DPositions (const std::vector< float > &vertices)
 
virtual void set2DPosition (unsigned int vertexIndex, float x1, float y1)
 
virtual void get2DPosition (unsigned int vertexIndex, float &x, float &y) const
 
virtual void set3DPosition (unsigned int vertexIndex, float x, float y, float z, float w)
 
virtual void get3DPosition (unsigned int vertexIndex, float &x, float &y, float &z, float &w) const
 
virtual void set3DDirectionAndLength (unsigned int index, float x, float y, float z, float l)
 
virtual void setVertexColor (unsigned int index, float r, float g, float b, float a)
 
virtual void getVertexColor (unsigned int index, float &r, float &g, float &b, float &a)
 
virtual void setColor (float r, float g, float b, float a)
 
virtual void getColor (float &r, float &g, float &b, float &a) const
 
void setStippleParameters (unsigned int scale, unsigned short pattern)
 
virtual void setStipple (unsigned int stipplePattern)
 
virtual void setOutlineWidth (float)
 
virtual void setEventOutlineWidth (float)
 
virtual int group () const
 
virtual void setGroup (int)
 
virtual DtLineSegmentInterfacecreateAndInitNewSegment ()
 
- 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 ()
 

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
 

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 Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)