![]() |
VR-Forces 4.3.1 Class Documentation
|
Handles the set up and processing of .meta files. More...
Classes | |
| struct | NodeLinkage |
| NodeLinkage structure contains the name and annotation strings for a node. More... | |
Public Types | |
| typedef std::map< std::string, rapidjson::Document * > | FileDocumentMap |
| ex. FileDocumentMap["Makland.meta"] = <parsed json="" data>=""> | |
| typedef std::pair< NodeLinkage, std::vector< const rapidjson::Value * > > | LinkageValuePair |
| ex. (node name/annotation, node JSON data*) | |
| typedef std::vector < LinkageValuePair > | LinkageValueVec |
| ex. | |
Public Member Functions | |
| virtual | ~DtMetaFileManager () |
| DTOR. | |
| std::string | convertPathToMeta (const std::string &inPath) |
| Convert a path (chop off extension, replace with .meta) | |
| std::string | convertModelDefToMeta (const DtModelDefinition *modelDef) |
| Look in a model definition file for .meta info or use the filename path in the model definition to get .meta file path. | |
| bool | pathHasMeta (const std::string &inPath) |
| Does this string end with '.meta'? | |
| bool | convertLoadAndParse (const DtModelDefinition *modelDef) |
| Take a model definition (ex. | |
| bool | convertLoadAndParse (const std::string &fileName) |
| Take a file (ex. | |
| rapidjson::Document * | retrieveFileData (const std::string &fileName) |
| Retrieve the parsed JSON data for the .meta file. | |
| LinkageValueVec | makeLinkagesAndFeaturesArray (rapidjson::Document *linkagesFeaturesDocument) |
| Given the parsed data for a file, convert it to an array as [ {node1 name or annotation , JSON data for node2 } ... | |
Static Public Attributes | |
| static const char * | theTagFeatureName |
| Strings to get the different parts of the meta file Use these instead of hardcoded strings. | |
| static const char * | theTagFeatureData |
| static const char * | theTagNodeFeaturesTag |
| static const char * | theTagTextureFeature |
| static const char * | theTagComment |
| static const char * | theTagLinkage |
| static const char * | theTagLinkageNodeName |
| static const char * | theTagLinkageAnnotationTag |
Protected Member Functions | |
| bool | parseMetaFile (const std::string &fileName) |
| Load .meta file. | |
| DtMetaFileManager (DtDe &de) | |
| Protected CTOR. Must be called by creator. | |
Protected Attributes | |
| FileDocumentMap | myDocumentMap |
| DtDe & | myDe |
Friends | |
| class | DtMetaFileManagerCreator |
| This allows the protected constructor to be called by the DtMetaFileManagerCreator. | |
Handles the set up and processing of .meta files.
Meta files contain extra information about nodes in a scene graph. As the scene graph is traversed, the nodes are matched based on annotation or node name. Then the specific settings to use during processing of the node are extracted from the parsed .meta file. .meta files are in JSON format
| typedef std::map<std::string, rapidjson::Document*> makVrv::DtMetaFileManager::FileDocumentMap |
ex. FileDocumentMap["Makland.meta"] = <parsed json="" data>="">
| typedef std::pair<NodeLinkage, std::vector<const rapidjson::Value*> > makVrv::DtMetaFileManager::LinkageValuePair |
ex. (node name/annotation, node JSON data*)
| typedef std::vector<LinkageValuePair> makVrv::DtMetaFileManager::LinkageValueVec |
ex.
vector of node names/annotations and JSON data for those node names/annotations
|
virtual |
DTOR.
|
protected |
Protected CTOR. Must be called by creator.
| std::string makVrv::DtMetaFileManager::convertPathToMeta | ( | const std::string & | inPath | ) |
Convert a path (chop off extension, replace with .meta)
| std::string makVrv::DtMetaFileManager::convertModelDefToMeta | ( | const DtModelDefinition * | modelDef | ) |
Look in a model definition file for .meta info or use the filename path in the model definition to get .meta file path.
| bool makVrv::DtMetaFileManager::pathHasMeta | ( | const std::string & | inPath | ) |
Does this string end with '.meta'?
| bool makVrv::DtMetaFileManager::convertLoadAndParse | ( | const DtModelDefinition * | modelDef | ) |
Take a model definition (ex.
PolesWindsock), look for 'metaFileName', read .meta file contents as string and store the string, then parse the string into a rapidjson Document* return false if any of those steps fail
| bool makVrv::DtMetaFileManager::convertLoadAndParse | ( | const std::string & | fileName | ) |
Take a file (ex.
makland.medf), convert to makland.meta read .meta file contents as string and store the string, then parse the string into a rapidjson Document* return false if any of those steps fail
| rapidjson::Document* makVrv::DtMetaFileManager::retrieveFileData | ( | const std::string & | fileName | ) |
Retrieve the parsed JSON data for the .meta file.
| LinkageValueVec makVrv::DtMetaFileManager::makeLinkagesAndFeaturesArray | ( | rapidjson::Document * | linkagesFeaturesDocument | ) |
Given the parsed data for a file, convert it to an array as [ {node1 name or annotation , JSON data for node2 } ...
{ node2 nane or annotation, JSON data for node2 }
|
protected |
Load .meta file.
|
friend |
This allows the protected constructor to be called by the DtMetaFileManagerCreator.
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
|
protected |