Added code to better compute the view frustum that is appropriate for a traversed

subgraph.
This commit is contained in:
Robert Osfield
2007-05-15 17:04:57 +00:00
parent 881ba2ed2f
commit 1e0af35900
3 changed files with 88 additions and 7 deletions

View File

@@ -188,6 +188,11 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac
/** Add an attribute which is positioned relative to the modelview matrix.*/
inline void addPositionedTextureAttribute(unsigned int textureUnit, osg::RefMatrix* matrix,const osg::StateAttribute* attr);
/** compute near plane based on the polgon intersection of primtives in near plane candidate list of drawables.
* Note, you have to set ComputeNearFarMode to COMPUTE_NEAR_FAR_USING_PRIMITIVES to be able to near plane candidate drawables to be recorded by the cull traversal. */
void computeNearPlane();
/** Re-implement CullStack's popProjectionMatrix() adding clamping of the projection matrix to
* the computed near and far.*/
virtual void popProjectionMatrix();