- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# FCDocument/FCDPhysicsModelInstance.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2005-2007 Feeling Software Inc.
    00003     Portions of the code are:
    00004     Copyright (C) 2005-2007 Sony Computer Entertainment America
    00005
    00006     MIT License: http://www.opensource.org/licenses/mit-license.php
    00007 */
    00008
    00014 #ifndef _FCD_PHYSICS_MODEL_ENTITY_H_
    00015 #define _FCD_PHYSICS_MODEL_ENTITY_H_
    00016
    00017 #ifndef _FCD_ENTITY_INSTANCE_H_
    00018 #include "FCDocument/FCDEntityInstance.h"
    00019 #endif // _FCD_ENTITY_INSTANCE_H_
    00020
    00021 class FCDocument;
    00022 class FCDForceField;
    00023 class FCDPhysicsForceFieldInstance;
    00024 class FCDPhysicsRigidBody;
    00025 class FCDPhysicsRigidBodyInstance;
    00026 class FCDPhysicsRigidConstraint;
    00027 class FCDPhysicsRigidConstraintInstance;
    00028
    00034 class FCOLLADA_EXPORT FCDPhysicsModelInstance : public FCDEntityInstance
    00035 {
    00036 private:
    00037     DeclareObjectType(FCDEntityInstance);
    00038
    00039     DeclareParameterContainer(FCDEntityInstance, instances, FC("Inner Instances"));
    00040
    00041 public:
    00046     FCDPhysicsModelInstance(FCDocument* document);
    00047
    00049     virtual ~FCDPhysicsModelInstance();
    00050
    00054     virtual Type GetType() const { return FCDEntityInstance::PHYSICS_MODEL; }
    00055
    00058     DEPRECATED(3.05A, GetInstanceCount and GetInstance(index)) void GetInstances() const {}
    00059
    00062     size_t GetInstanceCount() const { return instances.size(); }
    00063
    00068     FCDEntityInstance* GetInstance(size_t index) { FUAssert(index < GetInstanceCount(), return NULL); return instances.at(index); }
    00069     const FCDEntityInstance* GetInstance(size_t index) const { FUAssert(index < GetInstanceCount(), return NULL); return instances.at(index); }
    00076     FCDPhysicsRigidBodyInstance* AddRigidBodyInstance(FCDPhysicsRigidBody* rigidBody = NULL);
    00077
    00084     FCDPhysicsRigidConstraintInstance* AddRigidConstraintInstance(FCDPhysicsRigidConstraint* rigidConstraint = NULL);
    00085
    00091     FCDPhysicsForceFieldInstance* AddForceFieldInstance(FCDForceField* forceField = NULL);
    00092
    00096     DEPRECATED(3.05A, instance->Release() or SAFE_RELEASE(instance)) bool RemoveInstance(FCDEntityInstance* instance);
    00097
    00103     virtual FCDEntityInstance* Clone(FCDEntityInstance* clone = NULL) const;
    00104
    00108     virtual void CleanSubId(FUSUniqueStringMap* parentStringMap);
    00109 };
    00110
    00111 #endif // _FCD_PHYSICS_MODEL_ENTITY_H_