Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-16 16:52:30 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-05-16 16:52:30 +0400
commit979e24265763ab8780a6807a890074296d276941 (patch)
treeb76aac8d28e700e2e63acadd89e9d9f3b849241d /source/gameengine/Ketsji/KX_Scene.h
parent5659bedf343eb9b8fec3741393f2d1b3436b1294 (diff)
Frustum Culling.
- tests every object against the view frustum. - Tree based culling is there, need to build tree.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.h')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 35f2f9dbb71..a468a8d1861 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -68,6 +68,7 @@ class SND_IAudioDevice;
class NG_NetworkDeviceInterface;
class NG_NetworkScene;
class SG_Node;
+class SG_Tree;
class KX_Camera;
class GEN_HashedPtr;
class KX_GameObject;
@@ -87,6 +88,8 @@ class SG_IObject;
* */
class KX_Scene : public SCA_IScene
{
+ //Py_Header;
+protected:
RAS_BucketManager* m_bucketmanager;
CListValue* m_tempObjectList;
@@ -102,6 +105,11 @@ class KX_Scene : public SCA_IScene
CListValue* m_lightlist;
/**
+ * The tree of objects in the scene.
+ */
+ SG_Tree* m_objecttree;
+
+ /**
* The set of cameras for this scene
*/
set<class KX_Camera*> m_cameras;
@@ -222,7 +230,7 @@ class KX_Scene : public SCA_IScene
* Toggle to enable or disable activity culling.
*/
bool m_activity_culling;
-
+
/**
* The framing settings used by this scene
*/
@@ -235,6 +243,9 @@ class KX_Scene : public SCA_IScene
*/
RAS_Rect m_viewport;
+ void MarkVisible(SG_Tree *node, RAS_IRasterizer* rasty);
+ void MarkSubTreeVisible(SG_Tree *node, RAS_IRasterizer* rasty, bool visible);
+
public:
KX_Scene(class SCA_IInputDevice* keyboarddevice,
class SCA_IInputDevice* mousedevice,
@@ -469,6 +480,31 @@ public:
void SetPhysicsEnvironment(class PHY_IPhysicsEnvironment* physEnv);
void SetGravity(const MT_Vector3& gravity);
+
+ /**
+ * Sets the node tree for this scene.
+ */
+ void SetNodeTree(SG_Tree* root);
+
+#if 0
+ KX_PYMETHOD_DOC(KX_Scene, GetLightList);
+ KX_PYMETHOD_DOC(KX_Scene, GetObjectList);
+ KX_PYMETHOD_DOC(KX_Scene, GetName);
+
+ KX_PYMETHOD_DOC(KX_Scene, GetActiveCamera);
+ KX_PYMETHOD_DOC(KX_Scene, SetActiveCamera);
+ KX_PYMETHOD_DOC(KX_Scene, FindCamera);
+
+ KX_PYMETHOD_DOC(KX_Scene, SetGravity);
+
+ KX_PYMETHOD_DOC(KX_Scene, SetActivityCulling);
+ KX_PYMETHOD_DOC(KX_Scene, SetActivityCullingRadius);
+
+ KX_PYMETHOD_DOC(KX_Scene, SetSceneViewport);
+ KX_PYMETHOD_DOC(KX_Scene, GetSceneViewport);
+
+ virtual PyObject* _getattr(const STR_String& attr); /* name, active_camera, gravity, suspended, viewport, framing, activity_culling, activity_culling_radius */
+#endif
};
typedef std::vector<KX_Scene*> KX_SceneList;