A structure which describes the attributes of a Vg3DModule::VgLine. More...
Public Types | |
typedef VgLine | Described |
Public Member Functions | |
VgEngine::VgRefPtr < VgLineDescriptor > | clone () |
Creates a new descriptor by copyiong another one. | |
Static Public Member Functions | |
static VgEngine::VgRefPtr < Vg3DModule::VgLineDescriptor > | create () |
This static method returns a new heap-allocated descriptor. | |
Public Attributes | |
std::vector< VgEngine::VgPosition > | mPositions |
The positions of the control points ordered sequentially. | |
std::vector< VgEngine::VgColor > | mColors |
The line colors. | |
std::vector< double > | mWidths |
The line widths. | |
VgEngine::VgRefPtr < VgEngine::VgITexture > | mTexture |
The texture that will be used when drawing the track. | |
float | mTextureSize |
The texture's size in y coordinate (metric). | |
float | mTextureAnimationSpeed |
The texture animation speed in meters/second (along the vertical axis of the texture). | |
VgLineType | mLineType |
The type of line that will be rendered. | |
VgEngine::VgAltitudeMode | mAltitudeMode |
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements. | |
double | mVisibilityRampStartVisible |
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements. | |
double | mVisibilityRampFullyVisible |
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements. | |
double | mVisibilityRampStartInvisible |
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements. | |
double | mVisibilityRampFullyInvisible |
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements. | |
double | mMaxCornerRadius |
This member sets the maximal curvature radius used in corners when smoothing the line. | |
int | mZIndex |
This member sets the z-index of the line. | |
bool | mHaveVertexColor |
Tells whether the line should use vertex colors (mandatory to modulate the texture's color). | |
bool | mDrawOnTop |
Tells whether the line should draw on top (ignoring z-buffer). | |
bool | mHaveCaps |
Tells whether the line should have round caps at start and end. | |
Protected Member Functions | |
VgLineDescriptor () | |
Constructor. | |
virtual | ~VgLineDescriptor () |
A structure which describes the attributes of a Vg3DModule::VgLine.
Below is a code snippet showing how an allocated VgPointDescriptor can be configured:
... VgApplication::VgIApplication* mVgApplication; VgEngine::VgRefPtr< VgEngine::VgITexture > mTexture; VgEngine::VgPosition mStartPos; VgEngine::VgPosition mEndPos; ... Vg3DModule::VgLineDescriptor lLineDesc; const float lTextureSize = 1.0; lLineDesc.mLineType = Vg3DModule::eGeometryConstantSize; lLineDesc.mTextureAnimationSpeed = 4.0; lLineDesc.mWidths.push_back(lTextureSize); lLineDesc.mColors.push_back(VgEngine::VgColor(1.0, 1.0, 1.0, 1.0)); lLineDesc.mTexture =mTexture.get(); lLineDesc.mTextureSize = 1.0; lLineDesc.mAltitudeMode = = VgEngine::eAbsolute; lLineDesc.mPositions.push_back(mStartPos); lLineDesc.mPositions.push_back(mEndPos); ...
Vg3DModule::VgLineDescriptor::VgLineDescriptor | ( | ) | [inline, protected] |
Constructor.
virtual Vg3DModule::VgLineDescriptor::~VgLineDescriptor | ( | ) | [protected, virtual] |
VgEngine::VgRefPtr< VgLineDescriptor > Vg3DModule::VgLineDescriptor::clone | ( | ) | [inline] |
Creates a new descriptor by copyiong another one.
static VgEngine::VgRefPtr< Vg3DModule::VgLineDescriptor > Vg3DModule::VgLineDescriptor::create | ( | ) | [static] |
This static method returns a new heap-allocated descriptor.
It is the only method that should be used to instantiate new descriptors. It is a way to make sure no one will delete it, except the last VgRefPtr pointing to it.
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements.
Default is eAbsolute.
std::vector< VgEngine::VgColor > Vg3DModule::VgLineDescriptor::mColors |
The line colors.
This vector should contain either 1 element in which case all the line will be drawn using that color. If the vector's size is greater or equal to the size of VgLineDescriptor::mPositions, then one color element will be used for each position, and these will be interpolated by the spline erp.
Tells whether the line should draw on top (ignoring z-buffer).
Tells whether the line should have round caps at start and end.
Tells whether the line should use vertex colors (mandatory to modulate the texture's color).
The type of line that will be rendered.
This member sets the maximal curvature radius used in corners when smoothing the line.
expressed in meters.
std::vector< VgEngine::VgPosition > Vg3DModule::VgLineDescriptor::mPositions |
The positions of the control points ordered sequentially.
If you want to close the VgLine you have to push_back the first point at the end of the vector.
The texture that will be used when drawing the track.
The texture mapping will ensure that the full texture width is mapped on the track's width.
The texture animation speed in meters/second (along the vertical axis of the texture).
a zero or close-to-zero value (<1e-3) means no animation.
The texture's size in y coordinate (metric).
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements.
Default is eAbsolute.
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements.
Default is eAbsolute.
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements.
Default is eAbsolute.
The altitude mode tells how to interpret the 'mHeight' members for all the mPositions elements.
Default is eAbsolute.
std::vector< double > Vg3DModule::VgLineDescriptor::mWidths |
The line widths.
Depending on VgLineDescriptor::mLineType value these parameters can represent either pixel values (ePixelConstantSize) or meter values (eGeometryConstantSize). This vector should contain either 1 element in which case all the line will be drawn using that width. If the vector's size is greater or equal to the size of VgLineDescriptor::mPositions, then one width element will be used for each position, and these will be interpolated by the spline erp.
This member sets the z-index of the line.
This is used to solve cases where translucent objects can not be sorted correctly. Forces a rendering order (only used on translucent objects). Smaller values (can be negative) lead to object appearing "over" the others.