← Back to team overview

yade-dev team mailing list archive

Re: QGL cutting plane

 

> Hello
>
> I found a fast, dirty, and lazy way of implementing a cutting plane in 
> the QGL view.
>
> Line 215 of camera.cpp :
>
>  const float cuttingDistance = 0.5;// 0 = see the full view, 1=see 
> nothing, 0.5=cut half of the volume
>   float z = distanceToSceneCenter() - 
> zClippingCoefficient()*sceneRadius()*(1.f-2*cuttingDistance);
>
> Now, as I would need days to create new widgets alone, could somebody 
> link this "cuttingDistance" float to a nice button in the QtGUI?
>   
If would be far easier to bind a hotkey in the view itself to that, just
like 'a' toggles axes and 'g' toggles grid. Like 'c' to toggle on/off
and +- or something like that to cut further or closer.

A more proper solution would be to render only bodies of which
se3.position is on a given side of the cutting plane (easy (?), modify
the GL dispatcher) and not render those that are not. That would have
the benefit of not seeing interior of spheres that are cut by the plane.

Vaclav
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev



Follow ups

References