![]() |
VR-Forces Developer's Guide
|
Parameters pre-read from a DtModelDefinition, either from the live definition on the main thread via fromDefinition(), or from a lease snapshot on a background thread via DtBackgroundLoadContext::modelLoadParams().
This class exists to avoid calling DtModelDefinition::findParameter() from background threads, where concurrent main-thread writes to myParameters would be a data race.
Subclass this to add parameters needed by custom model instance types. Override populate() to read the additional parameters, calling the base class implementation first.
Public Member Functions | |
| DtModelLoadParams () | |
| virtual | ~DtModelLoadParams () |
| virtual void | populate (const DtModelDefinition &definition) |
| bool | ddsFlip () const |
| const std::string & | searchPathList () const |
| bool | hasScale () const |
| float | scale () const |
| bool | castShadows () const |
| const std::string & | modelFilename () const |
| const std::string & | movingActiveRegions () const |
| const std::string & | powerPlantActiveRegions () const |
| const std::string & | weaponFireActiveRegions () const |
Static Public Member Functions | |
| static DtModelLoadParams | fromDefinition (const DtModelDefinition &definition) |
Protected Attributes | |
| bool | myDdsFlip |
| std::string | mySearchPathList |
| bool | myHasScale |
| float | myScale |
| bool | myCastShadows |
| std::string | myModelFilename |
| std::string | myMovingActiveRegions |
| std::string | myPowerPlantActiveRegions |
| std::string | myWeaponFireActiveRegions |
| makVrv::DtModelLoadParams::DtModelLoadParams | ( | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Populates this instance from a live DtModelDefinition. Call only from the main thread. Subclasses should override this to read additional parameters, calling the base implementation first.
|
static |
Factory method. Populates and returns a DtModelLoadParams from a live DtModelDefinition. Call only from the main thread.
| bool makVrv::DtModelLoadParams::ddsFlip | ( | ) | const |
Returns true if the "flip DDS textures" parameter was present and set to a non-zero value.
| const std::string& makVrv::DtModelLoadParams::searchPathList | ( | ) | const |
Returns the value of the "searchPathList" parameter, or an empty string if the parameter was not present.
| bool makVrv::DtModelLoadParams::hasScale | ( | ) | const |
Returns true if the "Scale" parameter was present in the definition. Check this before using scale().
| float makVrv::DtModelLoadParams::scale | ( | ) | const |
Returns the value of the "Scale" parameter. Only meaningful when hasScale() returns true.
| bool makVrv::DtModelLoadParams::castShadows | ( | ) | const |
Returns true if the "shadowCaster" parameter was absent or set to a non-zero value. Returns false only when the parameter is explicitly present and set to zero.
| const std::string& makVrv::DtModelLoadParams::modelFilename | ( | ) | const |
Returns the value of the "modelFilename" parameter, or an empty string if the parameter was not present.
| const std::string& makVrv::DtModelLoadParams::movingActiveRegions | ( | ) | const |
Returns the value of the "movingActiveRegions" parameter, or an empty string if the parameter was not present.
| const std::string& makVrv::DtModelLoadParams::powerPlantActiveRegions | ( | ) | const |
Returns the value of the "powerPlantActiveRegions" parameter, or an empty string if the parameter was not present.
| const std::string& makVrv::DtModelLoadParams::weaponFireActiveRegions | ( | ) | const |
Returns the value of the "weaponFireActiveRegions" parameter, or an empty string if the parameter was not present.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |