org.xith3d.render
Class Clipper

java.lang.Object
  extended by org.xith3d.render.Clipper
All Implemented Interfaces:
org.jagatoo.datatypes.Enableable

public class Clipper
extends java.lang.Object
implements org.jagatoo.datatypes.Enableable

A clipper can take up to six arbitrary clipping planes, which can individually be enabled/disabled. All values are measured in Node-Local coordinates.


Constructor Summary
Clipper()
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane[] planes)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0, org.openmali.spatial.bodies.Plane plane1)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0, org.openmali.spatial.bodies.Plane plane1, org.openmali.spatial.bodies.Plane plane2)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0, org.openmali.spatial.bodies.Plane plane1, org.openmali.spatial.bodies.Plane plane2, org.openmali.spatial.bodies.Plane plane3)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0, org.openmali.spatial.bodies.Plane plane1, org.openmali.spatial.bodies.Plane plane2, org.openmali.spatial.bodies.Plane plane3, org.openmali.spatial.bodies.Plane plane4)
          Creates a new Clipper.
Clipper(org.openmali.spatial.bodies.Plane plane0, org.openmali.spatial.bodies.Plane plane1, org.openmali.spatial.bodies.Plane plane2, org.openmali.spatial.bodies.Plane plane3, org.openmali.spatial.bodies.Plane plane4, org.openmali.spatial.bodies.Plane plane5)
          Creates a new Clipper.
 
Method Summary
 int getId()
          Returns the unique id of this clipper instance.
 org.openmali.spatial.bodies.Plane getPlane(int i)
           
 org.openmali.spatial.bodies.Plane getPlane(int i, org.openmali.spatial.bodies.Plane plane)
          Gets this Clipper's i-th Plane.
 void getPlaneEnables(boolean[] enables)
          Gets the enabled states of this Clipper's Planes.
 boolean isEnabled()
           
 boolean isPlaneEnabled(int i)
           
 boolean isWorldCoordinateSystemUsed()
          If this is true, the clipper uses world coordinates.
 void setEnabled(boolean enabled)
          Enables/Disables this Clipper.
 void setPlane(int i, org.openmali.spatial.bodies.Plane plane)
          Sets the i-th Plane of this Clipper.
 void setPlaneEnabled(int i, boolean enabled)
          Sets the enabled states of this Clipper's i-th Plane.
 void setPlaneEnables(boolean[] enables)
          Enables/Disables this Clipper's Planes.
 void setUseWorldCoordinateSystem(boolean ignored)
          If this is true, the clipper uses world coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Clipper

public Clipper(org.openmali.spatial.bodies.Plane[] planes)
Creates a new Clipper.

Parameters:
planes -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0,
               org.openmali.spatial.bodies.Plane plane1,
               org.openmali.spatial.bodies.Plane plane2,
               org.openmali.spatial.bodies.Plane plane3,
               org.openmali.spatial.bodies.Plane plane4,
               org.openmali.spatial.bodies.Plane plane5)
Creates a new Clipper.

Parameters:
plane0 -
plane1 -
plane2 -
plane3 -
plane4 -
plane5 -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0)
Creates a new Clipper.

Parameters:
plane0 -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0,
               org.openmali.spatial.bodies.Plane plane1)
Creates a new Clipper.

Parameters:
plane0 -
plane1 -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0,
               org.openmali.spatial.bodies.Plane plane1,
               org.openmali.spatial.bodies.Plane plane2)
Creates a new Clipper.

Parameters:
plane0 -
plane1 -
plane2 -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0,
               org.openmali.spatial.bodies.Plane plane1,
               org.openmali.spatial.bodies.Plane plane2,
               org.openmali.spatial.bodies.Plane plane3)
Creates a new Clipper.

Parameters:
plane0 -
plane1 -
plane2 -
plane3 -

Clipper

public Clipper(org.openmali.spatial.bodies.Plane plane0,
               org.openmali.spatial.bodies.Plane plane1,
               org.openmali.spatial.bodies.Plane plane2,
               org.openmali.spatial.bodies.Plane plane3,
               org.openmali.spatial.bodies.Plane plane4)
Creates a new Clipper.

Parameters:
plane0 -
plane1 -
plane2 -
plane3 -
plane4 -

Clipper

public Clipper()
Creates a new Clipper.

Method Detail

getId

public final int getId()
Returns the unique id of this clipper instance.


setUseWorldCoordinateSystem

public final void setUseWorldCoordinateSystem(boolean ignored)
If this is true, the clipper uses world coordinates.

Parameters:
ignored -

isWorldCoordinateSystemUsed

public final boolean isWorldCoordinateSystemUsed()
If this is true, the clipper uses world coordinates.


setPlane

public void setPlane(int i,
                     org.openmali.spatial.bodies.Plane plane)
Sets the i-th Plane of this Clipper.

Parameters:
i -
plane -

getPlane

public org.openmali.spatial.bodies.Plane getPlane(int i)
Parameters:
i -
Returns:
the i-th Plane of this Clipper.

getPlane

public org.openmali.spatial.bodies.Plane getPlane(int i,
                                                  org.openmali.spatial.bodies.Plane plane)
Gets this Clipper's i-th Plane.

Parameters:
i -
plane -
Returns:
the i-th Plane

setEnabled

public void setEnabled(boolean enabled)
Enables/Disables this Clipper.

Specified by:
setEnabled in interface org.jagatoo.datatypes.Enableable
Parameters:
enabled -

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.jagatoo.datatypes.Enableable
Returns:
Is this Clipper enabled?

setPlaneEnables

public void setPlaneEnables(boolean[] enables)
Enables/Disables this Clipper's Planes.

Parameters:
enables -

getPlaneEnables

public void getPlaneEnables(boolean[] enables)
Gets the enabled states of this Clipper's Planes.

Parameters:
enables -

setPlaneEnabled

public void setPlaneEnabled(int i,
                            boolean enabled)
Sets the enabled states of this Clipper's i-th Plane.

Parameters:
i -
enabled -

isPlaneEnabled

public boolean isPlaneEnabled(int i)
Parameters:
i -
Returns:
Is the i-th Plane of this Clipper enabled?