VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes
makVrv::DtLineSegment Class Reference

A class which represents a single line segment. More...

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

Public Member Functions

 DtLineSegment (DtOverlayRenderer &renderer)
 Create a a line segment.
 DtLineSegment (DtLineRenderer &renderer)
 Create a a line segment.
virtual ~DtLineSegment ()
 Line segment destructor.
void setGroup (float group)
 Set the group of the line segment.
int group () const
 Get the group.
void set2DPositions (float x1, float y1, float x2, float y2)
 Set the vertex positions.
void set2DPosition (unsigned int index0or1, float x, float y)
 Set the first vertex position.
void get2DPosition (unsigned int index0or1, float &x, float &y) const
void setColors (float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2)
 Set the vertex colors.
void set3DPosition (int index0or1, float dx, float dy, float z, float w)
 Set the 3D location of the line.
void get3DPosition (int index0or1, float &dx, float &dy, float &z, float &w) const
virtual void set3DDirection (unsigned int index0or1, float x, float y, float z)
 Set the normalized direction of the line in world space.
virtual void get3DDirection (unsigned int index0or1, float &x, float &y, float &z) const
 Get the normalized direction of the vertex.
virtual void setDirection2DLength (unsigned int index0or1, float length)
 Set the length of the line in 2D space.
virtual float direction2DLength (unsigned int index0or1) const
 Get the length of the line in 2D space.
void setColor (unsigned int index0or1, float r, float g, float b, float a)
void getColor (unsigned int index0or1, float &r, float &g, float &b, float &a) const
void setColor1 (float r1, float g1, float b1, float a1)
void setColor2 (float r2, float g2, float b2, float a2)
void setColor (float r, float g, float b, float a)
void setWidth (float w)
 Set a line width, from 0.0 to 64.0); Default line width is 1.0.
float width () const
 Get the line width.
void setStippleParameters (unsigned int scale, unsigned short pattern)
 Set the line Stipple parameters.
void getStippleParameters (unsigned int &scale, unsigned short &pattern) const
 Get the line stipple parameters Uses the two arguments as return values.
- Public Member Functions inherited from makVrv::DtLineSegmentInterface
 DtLineSegmentInterface ()
 CTOR.
virtual ~DtLineSegmentInterface ()
 Line segment destructor.

Static Public Attributes

static const unsigned short NoStipple = 0xFFFF
static const unsigned short NoLine = 0x0

Protected Member Functions

 DtLineSegment ()

Private Member Functions

 DtLineSegment (const DtLineSegment &)
DtLineSegmentoperator= (const DtLineSegment &)

Private Attributes

DtLineSegmentProxymyProxy

Detailed Description

A class which represents a single line segment.

Constructor & Destructor Documentation

makVrv::DtLineSegment::DtLineSegment ( DtOverlayRenderer renderer)

Create a a line segment.

makVrv::DtLineSegment::DtLineSegment ( DtLineRenderer renderer)

Create a a line segment.

virtual makVrv::DtLineSegment::~DtLineSegment ( )
virtual

Line segment destructor.

makVrv::DtLineSegment::DtLineSegment ( const DtLineSegment )
private
makVrv::DtLineSegment::DtLineSegment ( )
inlineprotected

Member Function Documentation

void makVrv::DtLineSegment::setGroup ( float  group)
virtual

Set the group of the line segment.

Setting the group to zero causes the line to be hidden. Setting the group to negative numbers causes the line to be drawn relative to North. 1

Implements makVrv::DtLineSegmentInterface.

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

Get the group.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::set2DPositions ( float  x1,
float  y1,
float  x2,
float  y2 
)
virtual

Set the vertex positions.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::set2DPosition ( unsigned int  index0or1,
float  x,
float  y 
)
virtual

Set the first vertex position.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::get2DPosition ( unsigned int  index0or1,
float &  x,
float &  y 
) const
virtual
void makVrv::DtLineSegment::setColors ( float  r1,
float  g1,
float  b1,
float  a1,
float  r2,
float  g2,
float  b2,
float  a2 
)
virtual

Set the vertex colors.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::set3DPosition ( int  index0or1,
float  dx,
float  dy,
float  z,
float  w 
)
virtual

Set the 3D location of the line.

This will set the 3D location for each end of the line.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::get3DPosition ( int  index0or1,
float &  dx,
float &  dy,
float &  z,
float &  w 
) const
virtual
virtual void makVrv::DtLineSegment::set3DDirection ( unsigned int  index0or1,
float  x,
float  y,
float  z 
)
virtual

Set the normalized direction of the line in world space.

Implements makVrv::DtLineSegmentInterface.

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

Get the normalized direction of the vertex.

Implements makVrv::DtLineSegmentInterface.

virtual void makVrv::DtLineSegment::setDirection2DLength ( unsigned int  index0or1,
float  length 
)
virtual

Set the length of the line in 2D space.

Implements makVrv::DtLineSegmentInterface.

virtual float makVrv::DtLineSegment::direction2DLength ( unsigned int  index0or1) const
virtual

Get the length of the line in 2D space.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::setColor ( unsigned int  index0or1,
float  r,
float  g,
float  b,
float  a 
)
virtual
void makVrv::DtLineSegment::getColor ( unsigned int  index0or1,
float &  r,
float &  g,
float &  b,
float &  a 
) const
virtual
void makVrv::DtLineSegment::setColor1 ( float  r1,
float  g1,
float  b1,
float  a1 
)
void makVrv::DtLineSegment::setColor2 ( float  r2,
float  g2,
float  b2,
float  a2 
)
void makVrv::DtLineSegment::setColor ( float  r,
float  g,
float  b,
float  a 
)
inline

Reimplemented from makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::setWidth ( float  w)
virtual

Set a line width, from 0.0 to 64.0); Default line width is 1.0.

Implements makVrv::DtLineSegmentInterface.

float makVrv::DtLineSegment::width ( ) const
virtual

Get the line width.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::setStippleParameters ( unsigned int  scale,
unsigned short  pattern 
)
virtual

Set the line Stipple parameters.

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.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtLineSegment::getStippleParameters ( unsigned int &  scale,
unsigned short &  pattern 
) const
virtual

Get the line stipple parameters Uses the two arguments as return values.

Implements makVrv::DtLineSegmentInterface.

DtLineSegment& makVrv::DtLineSegment::operator= ( const DtLineSegment )
private

Member Data Documentation

const unsigned short makVrv::DtLineSegment::NoStipple = 0xFFFF
static
const unsigned short makVrv::DtLineSegment::NoLine = 0x0
static
DtLineSegmentProxy* makVrv::DtLineSegment::myProxy
private

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)