![]() |
VR-Forces 5.0.2 Developer's Guide
|
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.
Classes | |
| struct | NodeLinkage |
Public Types | |
| typedef std::map< std::string, rapidjson::Document * > | FileDocumentMap |
| typedef std::pair< NodeLinkage, std::vector< const rapidjson::Value * > > | LinkageValuePair |
| typedef std::vector < LinkageValuePair > | LinkageValueVec |
Public Member Functions | |
| virtual | ~DtMetaFileManager () |
| std::string | convertPathToMeta (const std::string &inPath) |
| std::string | convertModelDefToMeta (const DtModelDefinition *modelDef) |
| bool | pathHasMeta (const std::string &inPath) |
| bool | convertLoadAndParse (const DtModelDefinition *modelDef) |
| bool | convertLoadAndParse (const std::string &fileName) |
| rapidjson::Document * | retrieveFileData (const std::string &fileName) |
| LinkageValueVec | makeLinkagesAndFeaturesArray (rapidjson::Document *linkagesFeaturesDocument) |
Static Public Attributes | |
| static const char * | theTagFeatureName |
| 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) |
| DtMetaFileManager (DtDe &de) | |
Protected Attributes | |
| FileDocumentMap | myDocumentMap |
| DtDe & | myDe |
| boost::mutex | myMapMutex |
Friends | |
| class | DtMetaFileManagerCreator |
| 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 |
|
protected |