VR-Forces 4.0.4 Class Documentation
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...

List of all members.

Public Member Functions

 DtLineSegment (DtOverlayRenderer &renderer)
 Create a a line segment.
 DtLineSegment (DtLineRenderer &renderer)
 Create a a line segment.
 ~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 setFirstPosition (float x, float y)
 Set the first vertex position.
void setSecondPosition (float x, float y)
 Set the second vertex position.
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.

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

Create a a line segment.

Create a a line segment.

Line segment destructor.

makVrv::DtLineSegment::DtLineSegment ( ) [inline, protected]

Member Function Documentation

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

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

Get the group.

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

Set the vertex positions.

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

Set the first vertex position.

void makVrv::DtLineSegment::get2DPosition ( unsigned int  index0or1,
float &  x,
float &  y 
) const
void makVrv::DtLineSegment::setFirstPosition ( float  x,
float  y 
)

Set the first vertex position.

void makVrv::DtLineSegment::setSecondPosition ( float  x,
float  y 
)

Set the second vertex position.

void makVrv::DtLineSegment::setColors ( float  r1,
float  g1,
float  b1,
float  a1,
float  r2,
float  g2,
float  b2,
float  a2 
)

Set the vertex colors.

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

Set the 3D location of the line.

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

void makVrv::DtLineSegment::get3DPosition ( int  index0or1,
float &  dx,
float &  dy,
float &  z,
float &  w 
) const
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.

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

Get the normalized direction of the vertex.

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

Set the length of the line in 2D space.

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

Get the length of the line in 2D space.

void makVrv::DtLineSegment::setColor ( unsigned int  index0or1,
float  r,
float  g,
float  b,
float  a 
)
void makVrv::DtLineSegment::getColor ( unsigned int  index0or1,
float &  r,
float &  g,
float &  b,
float &  a 
) const
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]

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

Get the line width.

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

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.

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

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

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]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)