00001 #ifndef PH_FORCEFIELD_H
00002 #define PH_FORCEFIELD_H
00003
00004 #include <FileIO/FIDocScene.h>
00005 #include <SceneGraph/SGScene.h>
00006 #include <Physics/PHSolid.h>
00007 #include <list>
00008
00009 namespace Spr{
00010
00011 void RegisterPHGravityLoader(FILoadScene* loader);
00012 void RegisterPHGravitySaver (FISaveScene* saver );
00013
00014
00015
00016
00017 class PHGravityEngine : public SGBehaviorEngine
00018 {
00019 public:
00020 SGOBJECTDEF(PHGravityEngine);
00021 PHSolids solids;
00022 Vec3f accel;
00023
00024 int GetPriority() const {return SGBP_GRAVITYENGINE;}
00025 void Step(SGScene* s);
00026 void ApplyForce();
00027 void Clear(SGScene* s){solids.clear();}
00028 bool AddChildObject(SGObject* o, SGScene* s);
00029 };
00030 }
00031
00032 #endif