VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtWindowLine Class Reference

A model-like object that draws a 2D line. More...

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

Public Member Functions

 DtWindowLine (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtWindowLine ()
 DTOR. More...
 
virtual void setVertex (unsigned int vertex, double x, double y)
 Set (or add) the specified vertex at <x,y> More...
 
virtual void removeVertex (unsigned int vertex)
 Remove the specified vertex. More...
 
virtual void setStartVertex (double x, double y)
 Set the start vertex of the line in screen coordinates from 0...1 Here for backward compatibility. More...
 
virtual void setEndVertex (double x, double y)
 Set the end vertex of the line in screen coordinates from 0...1 Here for backward compatibility. More...
 
virtual void setVisible (bool isVisible)
 Set the line visible or invisible. More...
 
virtual void setWidth (unsigned int width)
 Set the entire line width. More...
 
virtual void setColor (float r, float g, float b, float a)
 Set the color of the line. More...
 
virtual void setStipplePattern (unsigned int pattern)
 Set a stipple pattern for the line. More...
 
virtual void setStyleSegments (const std::vector< double > &segmentPercentages)
 Set the percentage lengths of the segments; creates and removes segments as necessary. More...
 
virtual void setSegmentColor (unsigned int index, float r, float g, float b, float a)
 Set the color of a segment. More...
 
virtual void setSegmentLightningStyle (unsigned int index, bool enableLightningStyle)
 Set a segment's lightning style (whether or not it looks like a lighting bolt) More...
 
virtual void setSegmentStartArrow (unsigned int index, bool enableStartArrow)
 Turn on or off a segment's start arrow. More...
 
virtual void setSegmentEndArrow (unsigned int index, bool enableEndArrow)
 Turn on or off a segment's end arrow. More...
 
virtual void setSegmentStipplePattern (unsigned int index, unsigned int stipplePattern)
 Set the stipple pattern for a segment according to the OpenGL line stipple feature. More...
 
virtual void setSegmentStipplePattern (unsigned int index, unsigned int stippleScale, unsigned int stipplePattern)
 Set the stipple pattern for a segment according to the OpenGL line stipple feature. More...
 
virtual void setSegmentWidth (unsigned int index, unsigned int width)
 Set the width of a segment in pixels. More...
 
virtual void setSegmentStartColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the firt vertex in a segment. More...
 
virtual void setSegmentEndColor (unsigned int segmentIndex, float r, float g, float b, float a)
 Set the color of the end vertex in a segment. More...
 
virtual void setGroup (int groupId)
 Set this object's group ID for z order. More...
 
virtual void setChannelOverlay (std::string displayName, std::string windowName, std::string channelName)
 By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword. More...
 
- Public Member Functions inherited from makVrv::DtWindowObject
 DtWindowObject (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtWindowObject ()
 DTOR. More...
 
virtual bool visible ()
 
virtual DtUniqueID uniqueId ()
 Returns the unique ID of this object. More...
 
DtWindowObjectgetParent ()
 Get the parent windowObject. More...
 
virtual ChildList childList ()
 Returns the child list. More...
 
virtual void addChild (DtUniqueID id)
 Add a child to this objects child list. More...
 
virtual void removeChild (DtUniqueID id)
 Remove a child from this objects child list. More...
 
virtual void getColor (float &r, float &g, float &b, float &a)
 
virtual void slot_postTick ()
 Slot for DtDe::signal_postTick, using when this object is flashing/blinking. More...
 
virtual Transform windowTransform ()
 Get the window transform that is the total transform of this object and all it's parents. More...
 
virtual DtClipBox clipBox ()
 Get this object's clip box specifications. More...
 
virtual void setParentId (DtUniqueID parentId)
 Get / Set Parent IDs. More...
 
virtual DtUniqueID getParentId ()
 
virtual void setPosition (double x, double y)
 Set / Get the window position of this object. More...
 
virtual void getPosition (double &x, double &y)
 
virtual void setScale (double scale)
 Set / Get the scale of the x y components. More...
 
virtual void setScale (double x, double y)
 
virtual void getScale (double &x, double &y)
 
virtual void setRotation (double rotation)
 Set / Get the rotation of the window object around it's set position, (0.0,0.0) if none is set. More...
 
virtual void getRotation (double &rotation)
 
virtual void setInheritColor (bool inheritColor)
 Set / Get whether this object inherits it's color from it's parent. More...
 
virtual bool inheritColor ()
 
virtual int group ()
 
virtual void setFlashing (bool flashing, double interval)
 Set / Get this object to flash on and off at the given interval. More...
 
virtual void getFlashing (bool &flashing, double &interval)
 
virtual void getChannelOverlay (std::string &displayName, std::string &windowName, std::string &channelName)
 

Protected Member Functions

virtual void update ()
 Called on signal_postUpdate; time to update render data. More...
 
virtual void needsUpdate ()
 Called by all mutators to set up a postUpdate signal if not already connected. More...
 

Protected Attributes

DtWindowLineInstancemyInstance
 
bool myConnectedToPostUpdate
 
- Protected Attributes inherited from makVrv::DtWindowObject
DtDemyDe
 
DtUniqueID myUniqueId
 
DtUniqueID myParentId
 
ChildList myChildIdList
 
DtVector2d myPosition
 
DtVector2d myScale
 
DtVector2d myWindowScale
 
double myRotation
 
double myFlashInterval
 
double myLastFlashTime
 
double myLastSimTime
 
bool myVisible
 
bool myLastVisibilityFlash
 
bool myInheritColor
 
bool myFlashing
 
float myColorR
 
float myColorG
 
float myColorB
 
float myColorA
 
Transform myWindowTransform
 
DtClipBox myClipBox
 
int myGroup
 
std::string myDisplayName
 
std::string myWindowName
 
std::string myChannelName
 

Additional Inherited Members

- Public Types inherited from makVrv::DtWindowObject
typedef std::list< DtUniqueIDChildList
 typedef list for holding the IDs of the children of this class More...
 
typedef DtVector2< doubleDtVector2d
 typedef 2D Vector More...
 
typedef DtMatrix3< doubleTransform
 typedef 3x3 Matrix for holding this object's transform More...
 

Detailed Description

A model-like object that draws a 2D line.

A 2D line that can be represented in one of two ways: either it has a start position and end position, divided into segments, or it is multiple (> 2) vertices, each pair of which define a segment. Each segment consists of a percentage (first case only), color, style, arrow style, stipple pattern, and thickness. This line class inherits from DtWindowObject() which means it can be included in a parent/child relationship with other window objects, including surfaces, polygons, text, and ellipses. Vertices for this line are relative to a fixed position, this is the position set in the base class. Rotations are also relative to this position. If a position is not set, the default position is (0.0,0.0). If this object is a child of a surface, and that surface has a clip box set, this objects vertices will automatically be clipped in it's update method. If this object is a child of another object, the position set is relative to the parent. createInstance() must be called first for the other methods in this class to work.

Constructor & Destructor Documentation

makVrv::DtWindowLine::DtWindowLine ( DtDe de,
DtUniqueID  id 
)

CTOR.

virtual makVrv::DtWindowLine::~DtWindowLine ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtWindowLine::setVertex ( unsigned int  vertex,
double  x,
double  y 
)
virtual

Set (or add) the specified vertex at <x,y>

virtual void makVrv::DtWindowLine::removeVertex ( unsigned int  vertex)
virtual

Remove the specified vertex.

virtual void makVrv::DtWindowLine::setStartVertex ( double  x,
double  y 
)
virtual

Set the start vertex of the line in screen coordinates from 0...1 Here for backward compatibility.

Same as setVertex(0, x, y)

virtual void makVrv::DtWindowLine::setEndVertex ( double  x,
double  y 
)
virtual

Set the end vertex of the line in screen coordinates from 0...1 Here for backward compatibility.

Same as setVertex(1, x, y)

virtual void makVrv::DtWindowLine::setVisible ( bool  isVisible)
virtual

Set the line visible or invisible.

Reimplemented from makVrv::DtWindowObject.

virtual void makVrv::DtWindowLine::setWidth ( unsigned int  width)
virtual

Set the entire line width.

virtual void makVrv::DtWindowLine::setColor ( float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the line.

Reimplemented from makVrv::DtWindowObject.

virtual void makVrv::DtWindowLine::setStipplePattern ( unsigned int  pattern)
virtual

Set a stipple pattern for the line.

Note that repeatFactor will not be used for overlay forms of the lines

virtual void makVrv::DtWindowLine::setStyleSegments ( const std::vector< double > &  segmentPercentages)
virtual

Set the percentage lengths of the segments; creates and removes segments as necessary.

virtual void makVrv::DtWindowLine::setSegmentColor ( unsigned int  index,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of a segment.

virtual void makVrv::DtWindowLine::setSegmentLightningStyle ( unsigned int  index,
bool  enableLightningStyle 
)
virtual

Set a segment's lightning style (whether or not it looks like a lighting bolt)

virtual void makVrv::DtWindowLine::setSegmentStartArrow ( unsigned int  index,
bool  enableStartArrow 
)
virtual

Turn on or off a segment's start arrow.

virtual void makVrv::DtWindowLine::setSegmentEndArrow ( unsigned int  index,
bool  enableEndArrow 
)
virtual

Turn on or off a segment's end arrow.

virtual void makVrv::DtWindowLine::setSegmentStipplePattern ( unsigned int  index,
unsigned int  stipplePattern 
)
virtual

Set the stipple pattern for a segment according to the OpenGL line stipple feature.

virtual void makVrv::DtWindowLine::setSegmentStipplePattern ( unsigned int  index,
unsigned int  stippleScale,
unsigned int  stipplePattern 
)
virtual

Set the stipple pattern for a segment according to the OpenGL line stipple feature.

virtual void makVrv::DtWindowLine::setSegmentWidth ( unsigned int  index,
unsigned int  width 
)
virtual

Set the width of a segment in pixels.

virtual void makVrv::DtWindowLine::setSegmentStartColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the firt vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::DtWindowLine::setSegmentEndColor ( unsigned int  segmentIndex,
float  r,
float  g,
float  b,
float  a 
)
virtual

Set the color of the end vertex in a segment.

This can be used for color blending between vertices.

virtual void makVrv::DtWindowLine::setGroup ( int  groupId)
virtual

Set this object's group ID for z order.

The higher the Z order the "closer" the element will be drawn to the eye point

Reimplemented from makVrv::DtWindowObject.

virtual void makVrv::DtWindowLine::setChannelOverlay ( std::string  displayName,
std::string  windowName,
std::string  channelName 
)
virtual

By default window objects are placed on the RemoteDisplayWorldOverlay, which is rendered on all channels that have the "showRemoteGraphics" channel keyword.

If a user wishes to draw a specific window object on a specific channel, use this method. This does not work for remote displays.

Reimplemented from makVrv::DtWindowObject.

virtual void makVrv::DtWindowLine::update ( )
protectedvirtual

Called on signal_postUpdate; time to update render data.

virtual void makVrv::DtWindowLine::needsUpdate ( )
protectedvirtual

Called by all mutators to set up a postUpdate signal if not already connected.

Reimplemented from makVrv::DtWindowObject.

Member Data Documentation

DtWindowLineInstance* makVrv::DtWindowLine::myInstance
protected
bool makVrv::DtWindowLine::myConnectedToPostUpdate
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)