Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Dynamics/Physics/Headers/PXDevice.h

Diff revisions: vs.
  @@ -32,7 +32,7 @@
32 32
33 33 public:
34 34 void setApi(PhysicsAPI api);
35 - inline I8 getApi(){return _api.getId(); }
35 + inline I8 getApi() const {return _api.getId(); }
36 36
37 37 inline I8 initPhysics(U8 targetFrameRate) {return _api.initPhysics(targetFrameRate);}
38 38 inline bool exitPhysics() {return _api.exitPhysics();}
  @@ -42,14 +42,26 @@
42 42 inline void idle() {_api.idle();}
43 43 inline void setPhysicsScene(PhysicsSceneInterface* const targetScene) {_api.setPhysicsScene(targetScene);}
44 44 inline void initScene(){_api.initScene();}
45 - inline PhysicsSceneInterface* NewSceneInterface(Scene* scene) {return _api.NewSceneInterface(scene);}
46 45
47 - inline bool createPlane(const vec3<F32>& position = vec3<F32>(0,0,0), U32 size = 1){return _api.createPlane(position,size);}
48 - inline bool createBox(const vec3<F32>& position = vec3<F32>(0,0,0), F32 size = 1){return _api.createBox(position,size);}
49 - inline bool createActor(SceneGraphNode* const node, PhysicsActorMask mask,PhysicsCollisionGroup group){return _api.createActor(node,mask,group);}
46 + inline PhysicsSceneInterface* NewSceneInterface(Scene* scene) {
47 + return _api.NewSceneInterface(scene);
48 + }
49 +
50 + inline bool createPlane(const vec3<F32>& position = vec3<F32>(0.0f), U32 size = 1){
51 + return _api.createPlane(position,size);
52 + }
53 +
54 + inline bool createBox(const vec3<F32>& position = vec3<F32>(0.0f), F32 size = 1.0f){
55 + return _api.createBox(position,size);
56 + }
57 +
58 + inline bool createActor(SceneGraphNode* const node, PhysicsActorMask mask,PhysicsCollisionGroup group){
59 + return _api.createActor(node,mask,group);
60 + }
61 +
50 62 private:
51 63 PXDevice() :
52 - _api(PhysX::getInstance()) //Defaulting to nothig if no api has been defined
64 + _api(PhysX::getOrCreateInstance()) //Defaulting to nothig if no api has been defined
53 65 {
54 66 }
55 67 PhysicsAPIWrapper& _api;