source: NonGTP/FCollada/FCDocument/FCDPhysicsRigidBodyInstance.h @ 964

Revision 964, 1.4 KB checked in by igarcia, 18 years ago (diff)
RevLine 
[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
11class FCDocument;
12class FCDSceneNode;
13class FCDPhysicsRigidBody;
14class FCDPhysicsMaterial;
15class FCDPhysicsModelInstance;
16class FCDPhysicsParameterGeneric;
17
18typedef vector<FCDPhysicsParameterGeneric*> FCDPhysicsParameterList;
19
20class FCOLLADA_EXPORT FCDPhysicsRigidBodyInstance : public FCDEntityInstance
21{
22private:
23        DeclareObjectType;
24        FCDPhysicsParameterList parameters;
25
26        FCDPhysicsModel* parent;
27        FCDPhysicsRigidBody* rigidBody;
28        FCDPhysicsMaterial* physicsMaterial;
29        bool ownsPhysicsMaterial;
30        FCDSceneNode* targetNode;
31
32public:
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_
Note: See TracBrowser for help on using the repository browser.