Commit ad8579ca authored by hybrid's avatar hybrid

Make the method isCulled publicly available

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2361 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ffc37ec8
......@@ -1029,7 +1029,7 @@ namespace scene
/** \return The active camera is returned. Note that this can
be NULL, if there was no camera created yet.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual ICameraSceneNode* getActiveCamera() = 0;
virtual ICameraSceneNode* getActiveCamera() const =0;
//! Sets the currently active camera.
/** The previous active camera will be deactivated.
......@@ -1454,6 +1454,17 @@ namespace scene
/** The geometry creator provides some helper methods to create various types of
basic geometry. This can be useful for custom scene nodes. */
virtual const IGeometryCreator* getGeometryCreator(void) const = 0;
//! Check if node is culled in current view frustum
/** Please note that depending on the used culling method this
check can be rather coarse, or slow. A positive result is
correct, though, i.e. if this method returns true the node is
positively not visible. The node might still be invisible even
if this method returns false.
\param node The scene node which is checked for culling.
\return True if node is not visible in the current scene, else
false. */
virtual bool isCulled(const ISceneNode* node) const =0;
};
......
......@@ -1084,7 +1084,7 @@ ISceneNode* CSceneManager::getRootSceneNode()
//! Returns the current active camera.
//! \return The active camera is returned. Note that this can be NULL, if there
//! was no camera created yet.
ICameraSceneNode* CSceneManager::getActiveCamera()
ICameraSceneNode* CSceneManager::getActiveCamera() const
{
return ActiveCamera;
}
......@@ -1121,7 +1121,7 @@ const core::aabbox3d<f32>& CSceneManager::getBoundingBox() const
//! returns if node is culled
bool CSceneManager::isCulled(const ISceneNode* node)
bool CSceneManager::isCulled(const ISceneNode* node) const
{
const ICameraSceneNode* cam = getActiveCamera();
if (!cam)
......
......@@ -278,7 +278,7 @@ namespace scene
//! Returns the current active camera.
//! \return The active camera is returned. Note that this can be NULL, if there
//! was no camera created yet.
virtual ICameraSceneNode* getActiveCamera();
virtual ICameraSceneNode* getActiveCamera() const;
//! Sets the active camera. The previous active camera will be deactivated.
//! \param camera: The new camera which should be active.
......@@ -485,10 +485,10 @@ namespace scene
//! Get an instance of a geometry creator.
virtual const IGeometryCreator* getGeometryCreator(void) const { return GeometryCreator; }
private:
//! returns if node is culled
bool isCulled(const ISceneNode* node);
virtual bool isCulled(const ISceneNode* node) const;
private:
//! clears the deletion list
void clearDeletionList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment