Game Engine: Level of detail support and tools
[blender.git] / source / gameengine / Ketsji / KX_GameObject.h
index 12aac68365b6c83ef8bc81eee661f6db52d54884..ac0afca91eb6e6b29fb3aaaf2f39a6d44a3f9448 100644 (file)
@@ -87,6 +87,7 @@ protected:
        STR_String                                                      m_text;
        int                                                                     m_layer;
        std::vector<RAS_MeshObject*>            m_meshes;
+       std::vector<RAS_MeshObject*>            m_lodmeshes;
        SG_QList                                                        m_meshSlots;    // head of mesh slots of this 
        struct Object*                                          m_pBlenderObject;
        struct Object*                                          m_pBlenderGroupObject;
@@ -771,6 +772,23 @@ public:
                m_meshes.push_back(mesh);
        }
 
+       /**
+        * Add a level of detail mesh to the object. These should
+        * be added in order.
+        */
+               void
+       AddLodMesh(
+               RAS_MeshObject* mesh
+       );
+
+       /**
+        * Updates the current lod level based on distance from camera.
+        */
+               void
+       UpdateLod(
+               MT_Vector3 &cam_pos
+       );
+
        /**
         * Pick out a mesh associated with the integer 'num'.
         */