abstractphysicsproperty.h
Go to the documentation of this file.00001 #ifndef PROPERTIES_ABSTRACTPHYSICSPROPERTY_H 00002 #define PROPERTIES_ABSTRACTPHYSICSPROPERTY_H 00003 //------------------------------------------------------------------------------ 00011 #include "properties/transformableproperty.h" 00012 00013 //------------------------------------------------------------------------------ 00014 namespace Physics 00015 { 00016 class Entity; 00017 }; 00018 00019 //------------------------------------------------------------------------------ 00020 namespace Properties 00021 { 00022 class AbstractPhysicsProperty : public TransformableProperty 00023 { 00024 DeclareRtti; 00025 DeclareFactory(AbstractPhysicsProperty); 00026 00027 public: 00029 AbstractPhysicsProperty(); 00031 virtual ~AbstractPhysicsProperty(); 00033 virtual int GetActiveEntityPools() const; 00035 virtual void OnActivate(); 00037 virtual void OnDeactivate(); 00038 00040 void SetEnabled(bool enabled); 00042 bool IsEnabled() const; 00043 00045 virtual Physics::Entity* GetPhysicsEntity() const; 00046 00047 protected: 00049 virtual void EnablePhysics(); 00051 virtual void DisablePhysics(); 00052 00053 private: 00054 bool enabled; 00055 }; 00056 00057 RegisterFactory(AbstractPhysicsProperty); 00058 00059 //------------------------------------------------------------------------------ 00062 inline 00063 bool 00064 AbstractPhysicsProperty::IsEnabled() const 00065 { 00066 return this->enabled; 00067 } 00068 00069 }; // namespace Properties 00070 //------------------------------------------------------------------------------ 00071 #endif