Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to \altering the draw distance for klampt vis module #30

Hi!

I'm currently using the klampt vis module to generate some 3D plots of my results in my project. However, the default draw distance of the module culls a part of my geometries. Is there a simple way to alter the draw distance of a visualization?

Thank you!

  • replies 1
  • views 2.1K
  • likes 0
joaomcm · Author
#2

The author provided me with a simple solution to this problem.

In python, you can simply acquire the viewport, change its clipping planes and set it as the visualization's viewport again - like so:

vp = vis.getViewport()
vp.clippingplanes = [dmin,dmax]
vis.setViewport(vp)

where dmin is the minimum drawing distance and dmax is the maximum drawing distance. Setting dmax to be high (say 10000) basically eliminates the culling due to distance!

Thank you!