![]() |
VR-Forces 4.0.4 Class Documentation
|
The class definition for DtSdcArea3DObject, which represents an area object positioned in the 3D scene. More...

Public Member Functions | |
| DtSdcArea3DObject (DtExerciseConn *exConn, unsigned id, std::vector< DtVector > vertices, DtVector offset=DtVector::zero(), DtSdcColor color=DtSdcColor::DtSdcWhite, const DtString &textureDirectory="", const DtString &textureFilename=DtString::nullString(), int numTextureTiles=0, bool flashing=false) | |
| Construct the area Draw Control Object. | |
| virtual | ~DtSdcArea3DObject () |
| virtual const DtVector & | offset () const |
| offset accessor | |
| virtual void | setOffset (const DtVector &off) |
| offset mutator | |
| virtual const DtSdcColor & | color () const |
| color accessor | |
| virtual void | setColor (const DtSdcColor &color) |
| color mutator | |
| virtual bool | flashing () const |
| flashing accessor | |
| virtual void | setFlashing (bool flashing) |
| flashing mutator | |
| virtual const DtString & | textureDirectory () const |
| Texture directory accessor. | |
| virtual void | setTextureDirectory (const DtString &str) |
| Texture directory mutator. | |
| virtual const DtString & | textureFilename () const |
| Texture file name accessor. | |
| virtual void | setTextureFilename (const DtString &str) |
| Texture file name mutator. | |
| virtual int | numTextureTiles () const |
| Texture tile repetitions accessor. | |
| virtual void | setNumTextureTiles (int numTextureTiles) |
| Texture tile repetitions mutator. | |
| virtual void | update () |
| update the internal pdu | |
| virtual const DtVector & | vertex (int index) const |
| vertex accessor | |
| virtual void | setVertex (int index, const DtVector &vertex) |
| vertex mutator | |
| virtual void | setRemoteGraphicSet (const std::string &setName) |
Protected Member Functions | |
| virtual void | calculateBoundingSphere () |
| virtual void | setStateRecordUserData () |
| void | initRecords () |
Protected Attributes | |
| DtVector | myOffset |
| DtSdcColor | myColor |
| bool | myFlashing |
| int | myNumVertices |
| std::vector< DtVector > | myVertices |
| DtString | myTextureFilename |
| DtString | myTextureDirectory |
| int | myNumTextureTiles |
| std::vector < DtEnvironmentalPointRecord > | myPointRecords |
| DtEnvironmentalBoundingSphereRecord | myBoundingSphereRecord |
| Dt3DGraphicalObjectStateRecord | myStateRecord |
| DtVector | myEmptyVertex |
Private Member Functions | |
| DtSdcArea3DObject () | |
| Default constructor. | |
| DtSdcArea3DObject (const DtSdcArea3DObject &orig) | |
| Copy constructor. | |
| DtSdcArea3DObject & | operator= (const DtSdcArea3DObject &rhs) |
| Assignment operator. | |
The class definition for DtSdcArea3DObject, which represents an area object positioned in the 3D scene.
Currently, there are some limitations for an area to appear correctly; it should be a convex polygon, and its points should be specified in counter-clockwise order. The points should also all be coplanar. Polygons are currently limited to no more than 16 points. A 3D Area Stealth Draw Control Object.
DtSdcArea3DObject represents a area that can be positioned and displayed in the 3D scene. A color may be specified; and the area can flash, if desired; it can have a texture which may be tiled on the area (level of tiling controlled by setNumTextureTiles). Currently, there are some limitations for an area to appear correctly; it should be a convex polygon with no more than 16 vertices, and its points should be specified in counter-clockwise order. The points should also be coplanar.
| DtSdcArea3DObject::DtSdcArea3DObject | ( | DtExerciseConn * | exConn, |
| unsigned | id, | ||
| std::vector< DtVector > | vertices, | ||
| DtVector | offset = DtVector::zero(), |
||
| DtSdcColor | color = DtSdcColor::DtSdcWhite, |
||
| const DtString & | textureDirectory = "", |
||
| const DtString & | textureFilename = DtString::nullString(), |
||
| int | numTextureTiles = 0, |
||
| bool | flashing = false |
||
| ) |
Construct the area Draw Control Object.
| id | Passed to DtSdcObject base (see) |
| vertices | A std::list of DtVector's containing the vertices The color to apply to all segments constructed |
| flashing | A boolean parameter indicating whether or not the area should be flashing |
| virtual DtSdcArea3DObject::~DtSdcArea3DObject | ( | ) | [virtual] |
| DtSdcArea3DObject::DtSdcArea3DObject | ( | ) | [private] |
Default constructor.
Private and not implemented - you must supply an id and basic geometric parameters to construct the area
| DtSdcArea3DObject::DtSdcArea3DObject | ( | const DtSdcArea3DObject & | orig | ) | [private] |
Copy constructor.
Private and unimplemented - not copyable.
| DtSdcArea3DObject& DtSdcArea3DObject::operator= | ( | const DtSdcArea3DObject & | rhs | ) | [private] |
Assignment operator.
Private and unimplemented - not copyable.
| virtual const DtVector& DtSdcArea3DObject::offset | ( | ) | const [virtual] |
offset accessor
Get the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
| virtual void DtSdcArea3DObject::setOffset | ( | const DtVector & | off | ) | [virtual] |
offset mutator
Set the object's offset from the attach point, in entity coordinates if attached, geocentric otherwise
| enuOffset | [X, Y, Z] |
| virtual const DtSdcColor& DtSdcArea3DObject::color | ( | ) | const [virtual] |
color accessor
Get the color assigned to the indicated segment
| segment | The segment to retrieve the color from |
Reimplemented from DtSdcObject.
| virtual void DtSdcArea3DObject::setColor | ( | const DtSdcColor & | color | ) | [virtual] |
color mutator
Set the color to use when drawing the indicated segment
| color | The DtSdcColor to use |
| segment | The segment to apply the color to |
Reimplemented from DtSdcObject.
| virtual bool DtSdcArea3DObject::flashing | ( | ) | const [virtual] |
flashing accessor
Get the boolean that indicates whether or not the area should flash
Reimplemented from DtSdcObject.
| virtual void DtSdcArea3DObject::setFlashing | ( | bool | flashing | ) | [virtual] |
flashing mutator
Set the boolean that indicates whether or not the area should flash
| flashing | true or false |
Reimplemented from DtSdcObject.
| virtual const DtString& DtSdcArea3DObject::textureDirectory | ( | ) | const [virtual] |
Texture directory accessor.
Get the directory for texture access
| virtual void DtSdcArea3DObject::setTextureDirectory | ( | const DtString & | str | ) | [virtual] |
Texture directory mutator.
Set the directory for texture access
| str | directory name |
| virtual const DtString& DtSdcArea3DObject::textureFilename | ( | ) | const [virtual] |
Texture file name accessor.
Get the area's texture file name
| virtual void DtSdcArea3DObject::setTextureFilename | ( | const DtString & | str | ) | [virtual] |
Texture file name mutator.
Set the area's texture file name
| str | name (without directory) of texture file |
| virtual int DtSdcArea3DObject::numTextureTiles | ( | ) | const [virtual] |
Texture tile repetitions accessor.
Get the number of times texture repeats
| virtual void DtSdcArea3DObject::setNumTextureTiles | ( | int | numTextureTiles | ) | [virtual] |
Texture tile repetitions mutator.
Set the int that indicates how many times texture repeats
| numTextureTiles | number of times texture repeats |
| virtual void DtSdcArea3DObject::update | ( | ) | [virtual] |
update the internal pdu
Make sure the internal pdu reflects the actual state of the draw control object's members. This is necessary because some members can be modified directly (which make the interface easier to use). DtStealthRemoteDrawer::update() calls this, so the user doesn't need to; but if the user is accessing the pdu directly (via the pdu() accessor) this should be called before using the pdu.
Implements DtSdcObject.
| virtual const DtVector& DtSdcArea3DObject::vertex | ( | int | index | ) | const [virtual] |
vertex accessor
Get the vertex at index (0-indexed) Vertices should be specified in counterclockwise order and should define a convex polygon.
| index,from | 0 to 15 |
| virtual void DtSdcArea3DObject::setVertex | ( | int | index, |
| const DtVector & | vertex | ||
| ) | [virtual] |
vertex mutator
Set the area's vertex at index (0-indexed) Vertices should be specified in counterclockwise order and should define a convex polygon.
| index | (from 0 to 15) vertex (in geocentric coordinates) |
| virtual void DtSdcArea3DObject::setRemoteGraphicSet | ( | const std::string & | setName | ) | [virtual] |
Reimplemented from DtSdcObject.
| virtual void DtSdcArea3DObject::calculateBoundingSphere | ( | ) | [protected, virtual] |
| virtual void DtSdcArea3DObject::setStateRecordUserData | ( | ) | [protected, virtual] |
| void DtSdcArea3DObject::initRecords | ( | ) | [protected] |
DtVector DtSdcArea3DObject::myOffset [protected] |
DtSdcColor DtSdcArea3DObject::myColor [protected] |
bool DtSdcArea3DObject::myFlashing [protected] |
int DtSdcArea3DObject::myNumVertices [protected] |
std::vector<DtVector> DtSdcArea3DObject::myVertices [protected] |
DtString DtSdcArea3DObject::myTextureFilename [protected] |
DtString DtSdcArea3DObject::myTextureDirectory [protected] |
int DtSdcArea3DObject::myNumTextureTiles [protected] |
std::vector<DtEnvironmentalPointRecord> DtSdcArea3DObject::myPointRecords [protected] |
DtEnvironmentalBoundingSphereRecord DtSdcArea3DObject::myBoundingSphereRecord [protected] |
DtVector DtSdcArea3DObject::myEmptyVertex [protected] |