de.jreality.geometry
Class SliceBoxFactory

java.lang.Object
  extended by de.jreality.geometry.SliceBoxFactory

public class SliceBoxFactory
extends java.lang.Object

This class wraps a SceneGraphComponent in a representation of its bounding box, containing two parallel local clipping planes separated by a variable amount. It attaches a tool to the result so that the user can drag on the faces of the box. The direction of the drag determines the orientation of the clipping planes and the extent of the drag determines its position. The clipping planes will be oriented to be perpendicular to the axial direction of the mouse drag. Note: using an instance of this class will hinder you from attaching pick-activated tools to the contents of the scene graph component. A typical usage of this class:

                SceneGraphComponent sliceableSGC =  
                        SphereUtility.tessellatedCubeSphere(SphereUtility.SPHERE_SUPERFINE);
                SliceBoxFactory sbf = new SliceBoxFactory(sliceableSGC);
                sbf.setSeparation(0.3);
                sbf.update();
                SceneGraphComponent slicedSGC = sbf.getSliceBoxSGC();
 

Author:
Charles Gunn

Nested Class Summary
 class SliceBoxFactory.SimpleDragTool
           
 
Constructor Summary
SliceBoxFactory(SceneGraphComponent w)
           
 
Method Summary
 double getSeparation()
           
 SceneGraphComponent getSliceBoxSGC()
           
 void setSeparation(double separation)
           
 void update()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceBoxFactory

public SliceBoxFactory(SceneGraphComponent w)
Method Detail

getSliceBoxSGC

public SceneGraphComponent getSliceBoxSGC()

getSeparation

public double getSeparation()

setSeparation

public void setSeparation(double separation)

update

public void update()