![]() |
VR-Forces 4.0.4 Class Documentation
|
A container for a single piece of terrain, containing settings needed to recreate it. More...

Public Types | |
| enum | GdbSurface { AsphaltOrOtherHardSurface = 0, Boulder = 1, Building = 2, CultivatedFields = 3, DeepBrook = 4, DeepLake = 5, DeepPond = 6, DeepRiver = 7, DeepStream = 8, DirtRoad = 9, DryGround = 10, EuroRailRoad = 11, Flimsy = 12, Forest = 13, Grass = 14, GravelRoad = 15, Icy = 16, IcyGround = 17, Moon = 18, Mud = 19, MuddyRoad = 20, Ocean = 21, Orchards = 22, PavedRoad = 23, Rock = 24, Sand = 25, ShallowBrook = 26, ShallowLake = 27, ShallowPond = 28, ShallowRiver = 29, ShallowStream = 30, SnowGround = 31, SoftSoil = 32, Swamp = 33, Tree = 34, USRailRoad = 35, UndefinedSoilType = 36, Unspecified = 37, UnspecifiedBodyOfWater = 38, UnspecifiedCulturalFeature = 39, UnspecifiedEnvStateGround = 40, WetGround = 41 } |
| GDB Surface IDs. More... | |
Public Member Functions | |
| DtTerrainPatch (DtDe &de, DtAgentManagerInterface &sceneInterface, const std::string &terrainDefinition) | |
| CTOR. | |
| ~DtTerrainPatch () | |
| DTOR. | |
| void | extractNodesToTrees (std::string const &searchExp, bool isRegEx, std::string const &treeSpecies) |
| Extract all trees fitting searchExp on this terrain patch and replace them with treeSpecies. | |
DtTerrainPatchRecord methods | |
| virtual void | getRecord (makArchives::DtTerrainPatchRecord &rec) const |
| Fill out a DtTerrainRecord with the current terrain info. | |
| virtual void | setFromRecord (const makArchives::DtTerrainPatchRecord &rec) |
| Populate a DtTerrainPatch from a DtTerrainPatchRecord. | |
Accessors | |
| const std::string & | definition () const |
| Get the definition. | |
| DtUniqueID | uniqueID () const |
| Get the unique id of the terrain patch object (from the agent). | |
| DtTerrainPatchObjectAgent * | agent () |
| Get the terrain patch object agent. | |
| const DtTerrainPatchObjectAgent * | agent () const |
| Get the terrain patch object driver. | |
| DtDe & | de () |
| Get the de. | |
| const DtDe & | de () const |
| Get the de. | |
| DtOverlaySettings & | overlaySettings () |
| Get the overlay settings. | |
| const DtOverlaySettings & | overlaySettings () const |
| Get the overlay settings. | |
| const makArchives::DtTerrainPatchRecord::ExtractionOperations & | extractionOperations () const |
| ExtractionOperations accessor. | |
Surface visibility settings | |
| void | setSurfaceVisible (int surfaceId, bool state) |
| Set a surface's visibility. | |
| bool | surfaceVisible (int surfaceId) |
| Check a surface's visibility. | |
| DtSurfacesSettings::SurfaceIdList const & | surfaceIds () |
| Get a list of all surface IDs for this terrain patch. | |
| void | loadSurfacesSettings () |
| Load the surfaces settings from a file. | |
Protected Member Functions | |
| void | onTerrainPatchObjectAvailable (DtUniqueID id) |
| Slot for signaling when a patch has an object. | |
| void | executeExtractionOperations (const makArchives::DtTerrainPatchRecord::ExtractionOperations &ops) |
| Execute all extraction operations. | |
| void | createPropsFromRecord (const makArchives::DtPropSettingsRecord &propSettings) |
| Restore settings for extracted props. | |
| void | getPropSettingsRecord (makArchives::DtPropSettingsRecord &record) const |
| Create a prop settings record from all props owned by this patch. | |
| void | createPropsFromExtraction (DtTerrainPatchObject &tpo, makArchives::DtPropRecord *protoTypeRecord, const std::string &exp, bool isRegEx, std::vector< std::string > matches) |
| Create props from an extraction. | |
Protected Attributes | |
| std::string | myDefinition |
| DtTerrainPatchObjectAgent * | myTerrainAgent |
| DtOverlaySettings | myOverlaySettings |
| DtSurfacesSettings | mySurfacesSettings |
| makArchives::DtTerrainPatchRecord::ExtractionOperations | myExtractionHistory |
Private Member Functions | |
| DtTerrainPatch (const DtTerrainPatch ©) | |
| DtTerrainPatch & | operator= (const DtTerrainPatch ©) |
Prop management | |
| typedef std::pair< std::string, std::string > | ExtractionRule |
| Make the prop's model be the extracted nodes via the prop's search expression and index. | |
| typedef std::vector < ExtractionRule > | ExtractionRuleList |
| Make the prop's model be the extracted nodes via the prop's search expression and index. | |
| virtual void | setExtractedNodeAsPropModel (DtProp *prop, bool setObjectPosition=false) |
| Make the prop's model be the extracted nodes via the prop's search expression and index. | |
| virtual int | countNodes (const std::string &rules) const |
| Count the number of nodes matching the rules. | |
| virtual void | extractNodes (const std::string &rule, bool isRegEx) |
| Extract nodes from the terrain patch using a given rule. | |
| virtual void | moveNode (DtSceneObjectAgent *objectDriver, DtModelAgent *model, const std::string &rule, unsigned int index) |
| Move a node located by the rule + index into a model and sets the location of the object to the location of the node. | |
| virtual void | addExtractNodeOperation (std::string const &searchExp, bool isRegEx, std::string const &propType, unsigned int count) |
| Add a prop extraction rule. | |
| void | extractNodesToProps (const std::string &exp, bool isRegEx, const std::string &type, const std::string &modelDefinition) |
| Wrapper around extractProps for the benefit of executeExtractionOperation. | |
| void | executeExtractionOperation (const makArchives::DtExtractionOperationRecord &extractionRec) |
| Execute a single extraction operation. | |
| ExtractionRuleList | extractionRules () |
| Get a list of extraction rules applied to this patch. | |
A container for a single piece of terrain, containing settings needed to recreate it.
| typedef std::pair<std::string, std::string> makVrv::DtTerrainPatch::ExtractionRule |
Make the prop's model be the extracted nodes via the prop's search expression and index.
| setObjectPosition | sets the position of the prop to the location of extracted nodes |
| typedef std::vector<ExtractionRule> makVrv::DtTerrainPatch::ExtractionRuleList |
Make the prop's model be the extracted nodes via the prop's search expression and index.
| setObjectPosition | sets the position of the prop to the location of extracted nodes |
GDB Surface IDs.
| makVrv::DtTerrainPatch::DtTerrainPatch | ( | DtDe & | de, |
| DtAgentManagerInterface & | sceneInterface, | ||
| const std::string & | terrainDefinition | ||
| ) |
CTOR.
DTOR.
| makVrv::DtTerrainPatch::DtTerrainPatch | ( | const DtTerrainPatch & | copy | ) | [private] |
| DtTerrainPatch& makVrv::DtTerrainPatch::operator= | ( | const DtTerrainPatch & | copy | ) | [private] |
| virtual void makVrv::DtTerrainPatch::getRecord | ( | makArchives::DtTerrainPatchRecord & | rec | ) | const [virtual] |
Fill out a DtTerrainRecord with the current terrain info.
| virtual void makVrv::DtTerrainPatch::setFromRecord | ( | const makArchives::DtTerrainPatchRecord & | rec | ) | [virtual] |
Populate a DtTerrainPatch from a DtTerrainPatchRecord.
| const std::string& makVrv::DtTerrainPatch::definition | ( | ) | const |
Get the definition.
| DtUniqueID makVrv::DtTerrainPatch::uniqueID | ( | ) | const |
Get the unique id of the terrain patch object (from the agent).
| DtTerrainPatchObjectAgent* makVrv::DtTerrainPatch::agent | ( | ) |
Get the terrain patch object agent.
| const DtTerrainPatchObjectAgent* makVrv::DtTerrainPatch::agent | ( | ) | const |
Get the terrain patch object driver.
| DtDe& makVrv::DtTerrainPatch::de | ( | ) | [inline] |
Get the de.
| const DtDe& makVrv::DtTerrainPatch::de | ( | ) | const [inline] |
Get the de.
Get the overlay settings.
| const DtOverlaySettings& makVrv::DtTerrainPatch::overlaySettings | ( | ) | const |
Get the overlay settings.
| const makArchives::DtTerrainPatchRecord::ExtractionOperations& makVrv::DtTerrainPatch::extractionOperations | ( | ) | const |
ExtractionOperations accessor.
| void makVrv::DtTerrainPatch::setSurfaceVisible | ( | int | surfaceId, |
| bool | state | ||
| ) |
Set a surface's visibility.
| bool makVrv::DtTerrainPatch::surfaceVisible | ( | int | surfaceId | ) |
Check a surface's visibility.
Get a list of all surface IDs for this terrain patch.
Load the surfaces settings from a file.
| virtual void makVrv::DtTerrainPatch::setExtractedNodeAsPropModel | ( | DtProp * | prop, |
| bool | setObjectPosition = false |
||
| ) | [virtual] |
Make the prop's model be the extracted nodes via the prop's search expression and index.
| setObjectPosition | sets the position of the prop to the location of extracted nodes |
| virtual int makVrv::DtTerrainPatch::countNodes | ( | const std::string & | rules | ) | const [virtual] |
Count the number of nodes matching the rules.
| virtual void makVrv::DtTerrainPatch::extractNodes | ( | const std::string & | rule, |
| bool | isRegEx | ||
| ) | [virtual] |
Extract nodes from the terrain patch using a given rule.
| virtual void makVrv::DtTerrainPatch::moveNode | ( | DtSceneObjectAgent * | objectDriver, |
| DtModelAgent * | model, | ||
| const std::string & | rule, | ||
| unsigned int | index | ||
| ) | [virtual] |
Move a node located by the rule + index into a model and sets the location of the object to the location of the node.
| virtual void makVrv::DtTerrainPatch::addExtractNodeOperation | ( | std::string const & | searchExp, |
| bool | isRegEx, | ||
| std::string const & | propType, | ||
| unsigned int | count | ||
| ) | [virtual] |
Add a prop extraction rule.
| void makVrv::DtTerrainPatch::extractNodesToProps | ( | const std::string & | exp, |
| bool | isRegEx, | ||
| const std::string & | type, | ||
| const std::string & | modelDefinition | ||
| ) |
Wrapper around extractProps for the benefit of executeExtractionOperation.
| void makVrv::DtTerrainPatch::executeExtractionOperation | ( | const makArchives::DtExtractionOperationRecord & | extractionRec | ) |
Execute a single extraction operation.
Get a list of extraction rules applied to this patch.
| void makVrv::DtTerrainPatch::extractNodesToTrees | ( | std::string const & | searchExp, |
| bool | isRegEx, | ||
| std::string const & | treeSpecies | ||
| ) |
Extract all trees fitting searchExp on this terrain patch and replace them with treeSpecies.
| void makVrv::DtTerrainPatch::onTerrainPatchObjectAvailable | ( | DtUniqueID | id | ) | [protected] |
Slot for signaling when a patch has an object.
| void makVrv::DtTerrainPatch::executeExtractionOperations | ( | const makArchives::DtTerrainPatchRecord::ExtractionOperations & | ops | ) | [protected] |
Execute all extraction operations.
| void makVrv::DtTerrainPatch::createPropsFromRecord | ( | const makArchives::DtPropSettingsRecord & | propSettings | ) | [protected] |
Restore settings for extracted props.
| void makVrv::DtTerrainPatch::getPropSettingsRecord | ( | makArchives::DtPropSettingsRecord & | record | ) | const [protected] |
Create a prop settings record from all props owned by this patch.
| void makVrv::DtTerrainPatch::createPropsFromExtraction | ( | DtTerrainPatchObject & | tpo, |
| makArchives::DtPropRecord * | protoTypeRecord, | ||
| const std::string & | exp, | ||
| bool | isRegEx, | ||
| std::vector< std::string > | matches | ||
| ) | [protected] |
Create props from an extraction.
Expects the terrain patch object the props came from, a prototype prop record, the search expression, whether the search expression was a regexp, and the list of search expression matches
std::string makVrv::DtTerrainPatch::myDefinition [protected] |
DtTerrainPatchObjectAgent* makVrv::DtTerrainPatch::myTerrainAgent [protected] |
makArchives::DtTerrainPatchRecord::ExtractionOperations makVrv::DtTerrainPatch::myExtractionHistory [protected] |