[964] | 1 | /*
|
---|
| 2 | Copyright (C) 2005-2006 Feeling Software Inc.
|
---|
| 3 | MIT License: http://www.opensource.org/licenses/mit-license.php
|
---|
| 4 | */
|
---|
| 5 | |
---|
| 6 | #ifndef _FCD_PHYSICS_RIGID_BODY_ENTITY_H_ |
---|
| 7 | #define _FCD_PHYSICS_RIGID_BODY_ENTITY_H_ |
---|
| 8 | |
---|
| 9 | #include "FCDocument/FCDEntityInstance.h" |
---|
| 10 | |
---|
| 11 | class FCDocument; |
---|
| 12 | class FCDSceneNode; |
---|
| 13 | class FCDPhysicsRigidBody; |
---|
| 14 | class FCDPhysicsMaterial; |
---|
| 15 | class FCDPhysicsModelInstance; |
---|
| 16 | class FCDPhysicsParameterGeneric; |
---|
| 17 | |
---|
| 18 | typedef vector<FCDPhysicsParameterGeneric*> FCDPhysicsParameterList; |
---|
| 19 | |
---|
| 20 | class FCOLLADA_EXPORT FCDPhysicsRigidBodyInstance : public FCDEntityInstance |
---|
| 21 | { |
---|
| 22 | private: |
---|
| 23 | DeclareObjectType; |
---|
| 24 | FCDPhysicsParameterList parameters; |
---|
| 25 | |
---|
| 26 | FCDPhysicsModel* parent; |
---|
| 27 | FCDPhysicsRigidBody* rigidBody; |
---|
| 28 | FCDPhysicsMaterial* physicsMaterial; |
---|
| 29 | bool ownsPhysicsMaterial; |
---|
| 30 | FCDSceneNode* targetNode; |
---|
| 31 | |
---|
| 32 | public: |
---|
| 33 | FCDPhysicsRigidBodyInstance(FCDocument* document, FCDEntity* _parent); |
---|
| 34 | virtual ~FCDPhysicsRigidBodyInstance(); |
---|
| 35 |
|
---|
| 36 | void AddParameter(FCDPhysicsParameterGeneric* parameter); |
---|
| 37 | |
---|
| 38 | FCDPhysicsRigidBody* FlattenRigidBody(); |
---|
| 39 | |
---|
| 40 | FCDSceneNode* GetTargetNode() const {return targetNode;} |
---|
| 41 | |
---|
| 42 | // FCDEntity override for RTTI-like |
---|
| 43 | virtual Type GetType() const { return PHYSICS_RIGID_BODY; } |
---|
| 44 | |
---|
| 45 | // Load the geometry instance from the COLLADA document |
---|
| 46 | virtual FUStatus LoadFromXML(xmlNode* instanceNode); |
---|
| 47 | |
---|
| 48 | // Write out the instantiation information to the xml node tree |
---|
| 49 | virtual xmlNode* WriteToXML(xmlNode* parentNode) const; |
---|
| 50 | }; |
---|
| 51 | |
---|
| 52 | #endif // _FCD_PHYSICS_RIGID_BODY_ENTITY_H_ |
---|