VR-Forces 5.0.2 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::DtSegmentedLine Class Reference

A convex polygon drawn using lines.

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

Public Member Functions

 DtSegmentedLine (DtOverlayRenderer &renderer, DtWidgetPicker &picker)
 
virtual ~DtSegmentedLine ()
 
virtual void setEventsEnabled (bool enabled, unsigned long long userData=0)
 
virtual bool eventsEnabled () const
 
virtual void setVertexCount (unsigned int vertexCount)
 
virtual unsigned int vertexCount () const
 
virtual unsigned int segmentCount () const
 
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 set3DDirection (unsigned int vertexIndex, float x, float y, float z)
 
virtual void get3DDirection (unsigned int vertexIndex, float &x, float &y, float &z) const
 
virtual void setDirection2DLength (unsigned int vertexIndex, float length)
 
virtual float direction2DLength (unsigned int vertexIndex) const
 
virtual void setSegmentColor (unsigned int segment, float r, float g, float b, float a)
 
virtual void setPointColor (unsigned int point, float r, float g, float b, float a)
 
virtual void setStipplePattern (unsigned int segment, unsigned int pattern)
 
virtual void setStipplePattern (unsigned int segment, unsigned int scale, unsigned int pattern)
 
virtual void setWidth (unsigned int segment, float w)
 
virtual void setEventWidth (float)
 
virtual DtLineSegmentInterfacecreateAndInitNewSegment ()
 
virtual void setGroup (int)
 

Protected Types

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

Protected Member Functions

virtual void removeLineSegmentsUntilEndFrom (int segmentCount)
 
virtual void setLineSegment (int, DtLineSegmentInterface *)
 
virtual void slot_pickerDestroyed ()
 

Protected Attributes

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

Member Typedef Documentation

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtSegmentedLine::~DtSegmentedLine ( )
virtual

Constructor removed in favor of more generic constructor to take Overlay Renderer 09/04/2012. The line renderer is still used, however the new constructor allows for subclasses to use different renderer types DtSegmentedLine(DtLineRenderer& renderer,DtWidgetPicker& picker);.

DTOR

Member Function Documentation

virtual void makVrv::DtSegmentedLine::setEventsEnabled ( bool  enabled,
unsigned long long  userData = 0 
)
virtual

Set whether the sprite has widget events. Disabling events disconnects all of the DtSegmentedLine signals The user data is set when enabling the events, to change only the user data make multiple calls with enabled=true.

virtual bool makVrv::DtSegmentedLine::eventsEnabled ( ) const
virtual

Get whether events are already enabled.

virtual void makVrv::DtSegmentedLine::setVertexCount ( unsigned int  vertexCount)
virtual

Set the number of vertices, set the number of vertices before setting their parameters (position, color etc). The number of segments will be one less than the number of vertices set, with the count being at least 1 if the vertex count is > 0.

virtual unsigned int makVrv::DtSegmentedLine::vertexCount ( ) const
virtual

Get the vertex count. This count will always be one more than the number of segments available. Use segment count to get the number of segments.

virtual unsigned int makVrv::DtSegmentedLine::segmentCount ( ) const
virtual

Number of segments available.

virtual void makVrv::DtSegmentedLine::set2DPosition ( unsigned int  vertexIndex,
float  x1,
float  y1 
)
virtual

Set the vertex positions.

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

Get the vertex position.

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

Set one vertex position. NOTE it is much more efficient to update all vertices using setPositions If several change.

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

Get the vertex position.

virtual void makVrv::DtSegmentedLine::set3DDirection ( unsigned int  vertexIndex,
float  x,
float  y,
float  z 
)
virtual

Set the normalized direction of the line in world space.

virtual void makVrv::DtSegmentedLine::get3DDirection ( unsigned int  vertexIndex,
float &  x,
float &  y,
float &  z 
) const
virtual

Get the normalized direction of the vertex.

virtual void makVrv::DtSegmentedLine::setDirection2DLength ( unsigned int  vertexIndex,
float  length 
)
virtual

Set the length of the line in 2D space.

virtual float makVrv::DtSegmentedLine::direction2DLength ( unsigned int  vertexIndex) const
virtual

Get the length of the line in 2D space.

virtual void makVrv::DtSegmentedLine::setSegmentColor ( unsigned int  segment,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the segment (non-blending)

virtual void makVrv::DtSegmentedLine::setPointColor ( unsigned int  point,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the point (bleding)

virtual void makVrv::DtSegmentedLine::setStipplePattern ( unsigned int  segment,
unsigned int  pattern 
)
virtual

Set the stipple pattern.

virtual void makVrv::DtSegmentedLine::setStipplePattern ( unsigned int  segment,
unsigned int  scale,
unsigned int  pattern 
)
virtual
virtual void makVrv::DtSegmentedLine::setWidth ( unsigned int  segment,
float  w 
)
virtual

Set the line width.

virtual void makVrv::DtSegmentedLine::setEventWidth ( 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 DtLineSegmentInterface* makVrv::DtSegmentedLine::createAndInitNewSegment ( )
virtual

Creates and initializes a new segment.

Reimplemented in makVrv::DtTexturedLine.

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

The higher the z order the "closer" to the eyepoint this element will be drawn. Use this variable to stack overlay objects in the particular order you want them displayed.

Reimplemented in makVrv::DtTexturedLine.

virtual void makVrv::DtSegmentedLine::removeLineSegmentsUntilEndFrom ( int  segmentCount)
protectedvirtual

Removed segments from the line starting at segmentCount until the end is reached.

Reimplemented in makVrv::DtTexturedLine.

virtual void makVrv::DtSegmentedLine::setLineSegment ( int  ,
DtLineSegmentInterface  
)
protectedvirtual

Sets the segment into the array. If array is smaller, increases size.

Reimplemented in makVrv::DtTexturedLine.

virtual void makVrv::DtSegmentedLine::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::DtSegmentedLine::myRenderer
protected
DtWidgetPicker& makVrv::DtSegmentedLine::myPicker
protected
LineSegmentList makVrv::DtSegmentedLine::myLineSegments
protected
PickableSegmentList makVrv::DtSegmentedLine::myPickableSegments
protected
bool makVrv::DtSegmentedLine::myEventsEnabled
protected
unsigned int makVrv::DtSegmentedLine::myVertexCount
protected
unsigned long long makVrv::DtSegmentedLine::myUserData
protected
float makVrv::DtSegmentedLine::myEventWidth
protected
bool makVrv::DtSegmentedLine::myPickerDestroyed
protected
bool makVrv::DtSegmentedLine::myPickerConnected
protected
int makVrv::DtSegmentedLine::myGroup
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)