Go to the documentation of this file.00001
00002
00003 #ifndef _PHYSICSMATERIAL_H_
00004 #define _PHYSICSMATERIAL_H_
00005
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <resource/Resource.h>
00009
00010 #include <string>
00011
00012 namespace resource
00013 {
00014 class Serializer;
00015 }
00016
00017 namespace physics
00018 {
00019
00021 class ENGINE_PUBLIC_EXPORT Material : public resource::Resource
00022 {
00023 public:
00024
00025 Material(const std::string& name, resource::Serializer* serializer);
00026 virtual ~Material();
00027
00029 virtual void setRestitution(f32 restitution);
00030
00032 f32 getRestitution() const;
00033
00035 virtual void setStaticFriction(f32 staticFriction);
00036
00038 f32 getStaticFriction() const;
00039
00041 virtual void setDynamicFriction(f32 dynamicFriction);
00042
00044 f32 getDynamicFriction() const;
00045
00046 protected:
00047
00048 void initProperties();
00049 void unloadImpl();
00050
00051 f32 mRestitution;
00052 f32 mStaticFriction;
00053 f32 mDynamicFriction;
00054 };
00055
00056 }
00057
00058 #endif