diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-04-08 02:14:06 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-04-08 02:14:06 +0400 |
commit | 51b4145841293d4a695b7bbe88e90ebd98443fc8 (patch) | |
tree | 61818fb3a50e0891b630680b203c3fe80fe149bb /source/gameengine/Physics/common/PHY_IPhysicsController.h | |
parent | 486985762aa71b75ec1d1d0e7bbf0f777065f3a3 (diff) |
BGE Scenegraph and View frustrum culling improvement.
This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.
The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.
The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.
The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.
The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further
improvements.
Diffstat (limited to 'source/gameengine/Physics/common/PHY_IPhysicsController.h')
-rw-r--r-- | source/gameengine/Physics/common/PHY_IPhysicsController.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsController.h b/source/gameengine/Physics/common/PHY_IPhysicsController.h index 884e14cfb5a..6cba6fa88af 100644 --- a/source/gameengine/Physics/common/PHY_IPhysicsController.h +++ b/source/gameengine/Physics/common/PHY_IPhysicsController.h @@ -29,7 +29,7 @@ #ifndef PHY_IPHYSICSCONTROLLER_H #define PHY_IPHYSICSCONTROLLER_H -#include "PHY_DynamicTypes.h" +#include "PHY_IController.h" @@ -37,7 +37,7 @@ PHY_IPhysicsController is the abstract simplified Interface to a physical object. It contains the IMotionState and IDeformableMesh Interfaces. */ -class PHY_IPhysicsController +class PHY_IPhysicsController : public PHY_IController { public: @@ -82,9 +82,7 @@ class PHY_IPhysicsController // dyna's that are rigidbody are free in orientation, dyna's with non-rigidbody are restricted virtual void setRigidBody(bool rigid)=0; - // clientinfo for raycasts for example - virtual void* getNewClientInfo()=0; - virtual void setNewClientInfo(void* clientinfo)=0; + virtual PHY_IPhysicsController* GetReplica() {return 0;} virtual void calcXform() =0; |