Ensure that the dom is instantiated inside registerRigidBody and registerConstraint.

Add a reset method to the colladaconverter so that the user can reuse the same converter.
This commit is contained in:
john.mccutchan
2008-03-14 18:46:03 +00:00
parent fbffa3a031
commit 3b9e114d9b
2 changed files with 104 additions and 72 deletions

View File

@@ -118,6 +118,8 @@ protected:
btRigidBodyColladaInfo* findRigidBodyColladaInfo(const btRigidBody* body);
btRigidConstraintColladaInfo* findRigidConstraintColladaInfo(btTypedConstraint* constraint);
bool instantiateDom ();
/* Searches based on matching name/id */
class domNode* findNode (const char* nodeName);
class domRigid_body* findRigid_body (const char* rigidBodyName);
@@ -166,6 +168,9 @@ public:
///load a COLLADA .dae file
bool load(const char* filename);
// resets the collada converter state
void reset ();
///save a snapshot in COLLADA physics .dae format.
///if the filename is left empty, modify the filename used during loading
bool save(const char* filename = 0);