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

Revision 964, 1.7 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_PHYSICSMODEL_H_
7#define _FCD_PHYSICSMODEL_H_
8
9#include "FCDocument/FCDEntity.h"
10#include "FCDocument/FCDEntityInstance.h"
11#include "FUtils/FUDaeEnum.h"
12
13class FCDocument;
14class FCDPhysicsRigidBody;
15class FCDPhysicsRigidConstraint;
16
17typedef vector<FCDEntityInstance*> FCDEntityInstanceList;
18typedef vector<FCDPhysicsRigidBody*> FCDPhysicsRigidBodyList;
19typedef vector<FCDPhysicsRigidConstraint*> FCDPhysicsRigidConstraintList;
20
21class FCOLLADA_EXPORT FCDPhysicsModel : public FCDEntity
22{
23private:
24        DeclareObjectType;
25        FCDEntityInstanceList instances;
26        FCDPhysicsRigidBodyList rigidBodies;
27        FCDPhysicsRigidConstraintList rigidConstraints;
28
29public:
30        FCDPhysicsModel(FCDocument* document);
31        virtual ~FCDPhysicsModel();
32
33        // Returns the entity type
34        virtual Type GetType() const { return PHYSICS_MODEL; }
35
36        // Direct Accessors
37        FCDEntityInstanceList& GetInstances() { return instances; }
38        const FCDEntityInstanceList& GetInstances() const { return instances; }
39
40        FCDPhysicsRigidBody* FindRigidBodyFromSid(const string& sid);
41        FCDPhysicsRigidConstraint* FindRigidConstraintFromSid(const string& sid);
42
43        // Create a copy of this physicsmodel, with the vertices overwritten
44        FCDPhysicsModel* Clone(/*FloatList& newPositions, uint32 newPositionsStride, FloatList& newNormals, uint32 newNormalsStride*/);
45
46        // Read in the <physics_model> node of the COLLADA document
47        virtual FUStatus LoadFromXML(xmlNode* node);
48
49        // Write out the <physics_model> node to the COLLADA xml tree
50        virtual xmlNode* WriteToXML(xmlNode* parentNode) const;
51};
52
53#endif // _FCD_PHYSICSMODEL_H_
Note: See TracBrowser for help on using the repository browser.