Various API updates to suppor light points developments better, but should also

benifit other extensions to rendering.
This commit is contained in:
Robert Osfield
2002-05-18 08:39:42 +00:00
parent 116e0cd8c9
commit 00f91631c2
5 changed files with 74 additions and 14 deletions

View File

@@ -238,6 +238,8 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
}
osg::ClippingVolume& getCurrentClippingVolume() { return _modelviewClippingVolumeStack.back(); }
inline bool isCulled(const osg::BoundingSphere& sp,CullingMode& mode)
{
if (!sp.isValid()) return true;
@@ -258,7 +260,10 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
return !_modelviewClippingVolumeStack.back().contains(bb,mode);
}
void updateCalculatedNearFar(const osg::Matrix& matrix,const osg::Drawable& drawable);
const CullingMode getCurrentCullingMode() const { return _cullingModeStack.back(); }
void updateCalculatedNearFar(const osg::Matrix& matrix,const osg::Drawable& drawable) { updateCalculatedNearFar(matrix,drawable.getBound()); }
void updateCalculatedNearFar(const osg::Matrix& matrix,const osg::BoundingBox& bb);
void updateCalculatedNearFar(const osg::Vec3& pos);
/** Add a drawable to current render graph.*/

View File

@@ -33,6 +33,8 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
int _depth;
ChildList _children;
LeafList _leaves;
osg::ref_ptr<osg::Referenced> _userData;
RenderGraph():
@@ -54,6 +56,10 @@ class OSGUTIL_EXPORT RenderGraph : public osg::Referenced
RenderGraph* cloneType() const { return new RenderGraph; }
void setUserData(osg::Referenced* obj) { _userData = obj; }
osg::Referenced* getUserData() { return _userData.get(); }
const osg::Referenced* getUserData() const { return _userData.get(); }
/** return true if all of drawables, lights and children are empty.*/
inline const bool empty() const