#include <v2oLoader.h>
v2oLoader::v2oLoader | ( | ) |
Initialises the '_v2oDecMap' Hashtable containing pairs of (std::string,v2oFactory*): (the Node name, the corresponding class that will reconstruct that node in OpenSceneGraph)
v2oLoader::~v2oLoader | ( | ) | [virtual] |
osgGroupRef v2oLoader::createOSGScene | ( | const bool | reset = true |
) |
Loader's main construction method. Parses the children of the root node and polymorphically creates the corresponding OpenSceneGraph scenegraph.
void v2oLoader::loadScene | ( | const char * | fileToLoad | ) | [virtual] |
Performs all the necessary initialisations for loading the scene and the root node.
v2oFactory * v2oLoader::getFactory | ( | std::string | name | ) |
Returns the corresponding v2oFactory class according to the parsed Vrml node name. e.g. for the "Transform" node name it returns a v2oTransformFactory object.
name | the node name. |
v2oFactory * v2oLoader::getGeomFactory | ( | std::string | name | ) |
Returns the corresponding geometry v2oFactory class according to the parsed Vrml geometry node name. e.g. for the "Cone" geometry node name it returns a v2oConeFactory object.
name | the node name. |
osgNodeRef v2oLoader::createOSGNode | ( | v2oFactory * | , | |
Node * | ||||
) |
Accesses polymorphically the correct createOSGNode() of the corresponding to the vrml node, v2oFactory object.
myosgDec | the v2oFactory derived class(e.g. v2oGroupFactory) pointer is assigned to the base class(v2oFactory) and passed as an argument here. | |
currentRootNode | the parsed Vrml node that has to be reconstructed in OpenSceneGraph. |
osgGeometryRef v2oLoader::createOSGGeomNode | ( | v2oFactory * | myv2oDec, | |
Node * | _currentRootNode | |||
) |
Accesses polymorphically the correct createOSGGeomNode() of the corresponding to the vrml node, v2oFactory object.
myosgDec | the v2oFactory derived class(e.g. v2oSphereFactory) pointer is assigned to the base class(v2oFactory) and passed as an argument here. | |
_currentRootNode | the parsed Vrml Geometry node that has to be reconstructed in OpenSceneGraph. |
static void v2o::v2oLoader::storeTexture | ( | std::string & | textureName, | |
osg::Texture2D * | textureNode | |||
) | [static] |
Store the parsed textures as pairs Name-osgTexture2D in order to reuse already loaded textures
static void v2o::v2oLoader::storeLight | ( | osg::Light * | parsedLight | ) | [static] |
Store the parsed lights as osgLights in order to append them in the root Environment node
static osgTexture2DRef v2o::v2oLoader::getStoredTexture | ( | std::string & | textureName | ) | [static] |
Returns the stored osg::Texture2D according to the specified name(filename)
v2oLoader * v2oLoader::instance | ( | ) | [static] |
Returns Singleton access to the static instance of the v2oloader that can be accessed easily by all guys around. Makes "lazy" creation of an instance on the first call. It DOES NOT returns a copy of the current v2oLoader object. NOT To be used only when this original instance of v2oLoader isn't sufficient (e.g. v2oInlineFactory)
v2oLoader* v2o::v2oLoader::getLoader | ( | ) | [inline] |
Returns the current instance of v2oLoader. It DOES return a copy of the current v2oLoader object. ONLY To be used when the original instance of v2oLoader isn't sufficient (v2oLoader::instance()) (e.g. in v2oInlineFactory)
Node* v2o::v2oLoader::getRoot | ( | ) | [inline] |
Returns the root Node of the raw scenegraph constructed by vhdVRMLParser.
osgNodeRef v2o::v2oLoader::getOSGRoot | ( | ) | [inline] |
Returns the root Node of the raw scenegraph constructed by vhdVRMLParser.
v2oFactoryList* v2o::v2oLoader::getFactoryList | ( | ) | [inline] |
Gets the vector containing all the root v2oFactorys of the current Scene.
osgNodeRef v2oLoader::getDEFNode | ( | Node * | _defNamedNode | ) |
It returns the osg::Node that corresponds to a VRML97 node with a DEF named, which is already stored in a v2oLoader Map<Node*, void *>. Thus all the DEF VRML nodes can be retrieved in osg::Node form by the interpolator nodes
v2oOSGHanimSkeleton* v2o::v2oLoader::getHanimSkeleton | ( | void | ) | [inline] |
TM get the v2oOSGHanimSkeleton class containing direct access to Hanim Joints and Humanoid root (see v2oOSGHanimSkeleton.h)
v2oOSGHanimMesh* v2o::v2oLoader::getHanimMesh | ( | void | ) | [inline] |
TM get the v2oOSGHanimMesh class containing direct access to Hanim Meshes (see v2oOSGHanimMesh.h)
v2oUseNodeMap v2oLoader::_v2oUseNodeMap [static] |
Temporary here, it has to be removed to private...
bool v2o::v2oLoader::_v2oShapeExtMode [static, private] |
Scene* v2o::v2oLoader::_loadedScene [private] |
Node* v2o::v2oLoader::_root [private] |
NodeList* v2o::v2oLoader::_allRootNodes [private] |
v2oTextureMap v2oLoader::_v2oTextureMap [static, private] |
v2oLightsList v2oLoader::_v2oLightsList [static, private] |
v2oLoader * v2oLoader::_instance [static, private] |
osgGroupRef v2o::v2oLoader::_vrmlGroup [private] |
osgNodeRef v2o::v2oLoader::_componentNode [private] |
Node* v2o::v2oLoader::_currentRootNode [private] |
v2oFactory* v2o::v2oLoader::_v2oFactory [private] |
FieldValue* v2o::v2oLoader::_value [private] |
v2oOSGHanimSkeleton* v2o::v2oLoader::_skel [private] |
v2oOSGHanimMesh* v2o::v2oLoader::_mesh [private] |