VR-Forces 4.8 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 | Private Member Functions
makVrv::DtTexturedLineSegment Class Reference

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

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

Public Member Functions

 DtTexturedLineSegment (DtOverlayRenderer &renderer)
 Create a a line segment. More...
 
 DtTexturedLineSegment (DtQuadRenderer &renderer)
 Create a a line segment. More...
 
virtual ~DtTexturedLineSegment ()
 Line segment destructor. More...
 
void setGroup (float group)
 Set the group of the line segment. More...
 
int group () const
 Get the group. More...
 
void set2DPosition (unsigned int index0or1, float x, float y)
 Set the first vertex position. More...
 
void get2DPosition (unsigned int index0or1, float &x, float &y) const
 
void set3DPosition (int index0or1, float dx, float dy, float z, float w)
 Set the 3D location of the line. More...
 
void get3DPosition (int index0or1, float &dx, float &dy, float &z, float &w) const
 
void setColor (float r, float g, float b, float a)
 
void getColor (float &r, float &g, float &b, float &a) const
 
void setWidth (float w)
 Set a line width, from 0.0 to 64.0); Default line width is 1.0. More...
 
float width () const
 Get the line width. More...
 
virtual void setTextureParameters (DtOverlayResourceProvider::NativeResourceHandle texture, float myTextureWidth, float left=0.0f, float right=1.0f, float bottom=0.0f, float top=1.0f)
 Sets the parameters for the textured line. More...
 
virtual void setZoomFactor (float z)
 Sets the factor by which to adjust distance. More...
 
virtual void set2DPositions (float x1, float y1, float x2, float y2)
 Sets the 2D position of the line segment. More...
 
virtual void setColor (unsigned int index0or1, float r, float g, float b, float a)
 
virtual void getColor (unsigned int index0or1, float &r, float &g, float &b, float &a) const
 
virtual void setColors (float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2)
 Set the vertex colors. More...
 
virtual void setRotationOffset (float)
 Sets the offset to the rotation to apply to the segmented line. Use for observer rotation. More...
 
- Public Member Functions inherited from makVrv::DtLineSegmentInterface
 DtLineSegmentInterface ()
 CTOR. More...
 
virtual ~DtLineSegmentInterface ()
 Line segment destructor. More...
 
void setColor (float r, float g, float b, float a)
 

Protected Member Functions

virtual void set3DDirection (unsigned int index0or1, float x, float y, float z)
 Unimplemented. More...
 
virtual void get3DDirection (unsigned int index0or1, float &x, float &y, float &z) const
 Get the normalized direction of the vertex. Unimplemented for this line. More...
 
virtual void setDirection2DLength (unsigned int index0or1, float length)
 Set the length of the line in 2D space. Unimplemented for this line. More...
 
virtual float direction2DLength (unsigned int index0or1) const
 Get the length of the line in 2D space. More...
 
virtual void setStippleParameters (unsigned int scale, unsigned short pattern)
 Unimplemented as textured lines do not stipple. More...
 
virtual void getStippleParameters (unsigned int &scale, unsigned short &pattern) const
 Get the line stipple parameters Uses the two arguments as return values. More...
 
virtual void resetTextureCoordinates ()
 Calculates number of texture elements to place based on zoom factor and length of line. More...
 
 DtTexturedLineSegment ()
 

Protected Attributes

DtQuadProxymyVertex
 
float myVertices [2][4]
 
float my2DVertices [2][2]
 
DtOverlayResourceProvider::NativeResourceHandle myTexture
 
float myTextureWidth
 
float myZoomFactor
 
float myRotationOffset
 

Private Member Functions

 DtTexturedLineSegment (const DtTexturedLineSegment &)
 
DtTexturedLineSegmentoperator= (const DtTexturedLineSegment &)
 

Detailed Description

A class which represents a single line segment.

Constructor & Destructor Documentation

makVrv::DtTexturedLineSegment::DtTexturedLineSegment ( DtOverlayRenderer renderer)

Create a a line segment.

makVrv::DtTexturedLineSegment::DtTexturedLineSegment ( DtQuadRenderer renderer)

Create a a line segment.

virtual makVrv::DtTexturedLineSegment::~DtTexturedLineSegment ( )
virtual

Line segment destructor.

makVrv::DtTexturedLineSegment::DtTexturedLineSegment ( const DtTexturedLineSegment )
private
makVrv::DtTexturedLineSegment::DtTexturedLineSegment ( )
protected

Member Function Documentation

void makVrv::DtTexturedLineSegment::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::DtTexturedLineSegment::group ( ) const
virtual

Get the group.

Implements makVrv::DtLineSegmentInterface.

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

Set the first vertex position.

Implements makVrv::DtLineSegmentInterface.

void makVrv::DtTexturedLineSegment::get2DPosition ( unsigned int  index0or1,
float &  x,
float &  y 
) const
virtual
void makVrv::DtTexturedLineSegment::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::DtTexturedLineSegment::get3DPosition ( int  index0or1,
float &  dx,
float &  dy,
float &  z,
float &  w 
) const
virtual
void makVrv::DtTexturedLineSegment::setColor ( float  r,
float  g,
float  b,
float  a 
)
void makVrv::DtTexturedLineSegment::getColor ( float &  r,
float &  g,
float &  b,
float &  a 
) const
void makVrv::DtTexturedLineSegment::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::DtTexturedLineSegment::width ( ) const
virtual

Get the line width.

Implements makVrv::DtLineSegmentInterface.

virtual void makVrv::DtTexturedLineSegment::setTextureParameters ( DtOverlayResourceProvider::NativeResourceHandle  texture,
float  myTextureWidth,
float  left = 0.0f,
float  right = 1.0f,
float  bottom = 0.0f,
float  top = 1.0f 
)
virtual

Sets the parameters for the textured line.

values other than 1 will cause repeating of the texture. Texture width is used to determine the width of the texture. Set larger/smaller width than texture to produce texture scaling

virtual void makVrv::DtTexturedLineSegment::setZoomFactor ( float  z)
virtual

Sets the factor by which to adjust distance.

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

Sets the 2D position of the line segment.

Implements makVrv::DtLineSegmentInterface.

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

virtual void makVrv::DtTexturedLineSegment::setRotationOffset ( float  )
virtual

Sets the offset to the rotation to apply to the segmented line. Use for observer rotation.

virtual void makVrv::DtTexturedLineSegment::set3DDirection ( unsigned int  index0or1,
float  x,
float  y,
float  z 
)
inlineprotectedvirtual

Unimplemented.

Set the normalized direction of the line in world space. Unimplemented for this type of line

Implements makVrv::DtLineSegmentInterface.

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

Get the normalized direction of the vertex. Unimplemented for this line.

Implements makVrv::DtLineSegmentInterface.

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

Set the length of the line in 2D space. Unimplemented for this line.

Implements makVrv::DtLineSegmentInterface.

virtual float makVrv::DtTexturedLineSegment::direction2DLength ( unsigned int  index0or1) const
inlineprotectedvirtual

Get the length of the line in 2D space.

Implements makVrv::DtLineSegmentInterface.

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

Unimplemented as textured lines do not stipple.

Implements makVrv::DtLineSegmentInterface.

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

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

Implements makVrv::DtLineSegmentInterface.

virtual void makVrv::DtTexturedLineSegment::resetTextureCoordinates ( )
protectedvirtual

Calculates number of texture elements to place based on zoom factor and length of line.

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

Member Data Documentation

DtQuadProxy* makVrv::DtTexturedLineSegment::myVertex
protected
float makVrv::DtTexturedLineSegment::myVertices[2][4]
protected
float makVrv::DtTexturedLineSegment::my2DVertices[2][2]
protected
DtOverlayResourceProvider::NativeResourceHandle makVrv::DtTexturedLineSegment::myTexture
protected
float makVrv::DtTexturedLineSegment::myTextureWidth
protected
float makVrv::DtTexturedLineSegment::myZoomFactor
protected
float makVrv::DtTexturedLineSegment::myRotationOffset
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)