Skip to content

Clipping distance #1904

Answered by gwaldron
JD31 asked this question in Support Q&A
Discussion options

You must be logged in to vote

JD,
Normally the camera is set up to automatically compute a far clipping plane based on the visible geometry. But you can change that and force it to a value.

For your osg::Camera you can say something like

camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera->setProjectionMatrixAsPerspective(vfov, aspect_ratio, near_clip, far_clip);

Hope this helps.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JD31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants