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

A convex polygon drawn using lines. More...

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

Public Member Functions

 DtSegmentedLine (DtOverlayRenderer &renderer, DtWidgetPicker &picker)
 CTOR.
virtual ~DtSegmentedLine ()
 Constructor removed in favor of more generic constructor to take Overlay Renderer 09/04/2012.
virtual void setEventsEnabled (bool enabled, unsigned long long userData=0)
 Set whether the sprite has widget events.
virtual 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 unsigned int segmentCount () const
 Number of segments available.
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 set3DDirection (unsigned int vertexIndex, float x, float y, float z)
 Set the normalized direction of the line in world space.
virtual void get3DDirection (unsigned int vertexIndex, float &x, float &y, float &z) const
 Get the normalized direction of the vertex.
virtual void setDirection2DLength (unsigned int vertexIndex, float length)
 Set the length of the line in 2D space.
virtual float direction2DLength (unsigned int vertexIndex) const
 Get the length of the line in 2D space.
virtual void setSegmentColor (unsigned int segment, float r, float g, float b, float a)
 Set the color of the segment (non-blending)
virtual void setPointColor (unsigned int point, float r, float g, float b, float a)
 Set the color of the point (bleding)
virtual void setStipplePattern (unsigned int segment, unsigned int pattern)
 Set the stipple pattern.
virtual void setWidth (unsigned int segment, float w)
 Set the line width.
virtual void setEventWidth (float)
 Sets the width of the event outline segments.
virtual DtLineSegmentInterfacecreateAndInitNewSegment ()
 Creates and initializes a new segment.
virtual void setGroup (int)
 The higher the z order the "closer" to the eyepoint this element will be drawn.

Protected Types

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

Protected Member Functions

virtual void removeLineSegmentsUntilEndFrom (int segmentCount)
 Removed segments from the line starting at segmentCount until the end is reached.
virtual void setLineSegment (int, DtLineSegmentInterface *)
 Sets the segment into the array. If array is smaller, increases size.
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 int myVertexCount
unsigned long long myUserData
float myEventWidth
bool myPickerDestroyed
bool myPickerConnected
int myGroup

Detailed Description

A convex polygon drawn using lines.

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::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 Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)