XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class Csg

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.Bounded
          extended byorg.autochthonous.graphics.rt.objects.Csg
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, Partitionable, Traceable

public class Csg
extends Bounded

a csg object, these can be nested and support UNION, INTERSECT, and the SUBTRACT operation (right operand affects left).


Field Summary
static int INTERSECT
           
static int SUBTRACT
           
static int UNION
           
 
Fields inherited from class org.autochthonous.graphics.rt.Bounded
bBox
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Constructor Summary
Csg(int operation, Renderable left, Renderable right)
           
 
Method Summary
static Csg getInstance(RMLReader in)
           
 HitList intersections(Ray r)
           
 boolean isIntersected(Ray r)
           
 boolean isShadowing(Ray r)
           
protected  void processObject(java.lang.Object obj)
           
protected  void processParameters(ParametersMap params)
           
 void setSelfShadowing(boolean selfShadowing)
          set whether or not we are self shadowing
 void setShader(Shader shader)
          set the shader for the csg object (note: this will not override shaders already set in sub branches.
 void transform(Matrix4f trans)
          apply the given 4x4 transform to the object.
 
Methods inherited from class org.autochthonous.graphics.rt.Bounded
bBox, setBBox, setBBox
 
Methods inherited from class org.autochthonous.graphics.rt.Renderable
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, readObject, setColor, setColor, toObjectSpace, toObjectSpace, transformNormal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.autochthonous.graphics.rt.Traceable
clone
 

Field Detail

UNION

public static final int UNION
See Also:
Constant Field Values

INTERSECT

public static final int INTERSECT
See Also:
Constant Field Values

SUBTRACT

public static final int SUBTRACT
See Also:
Constant Field Values
Constructor Detail

Csg

public Csg(int operation,
           Renderable left,
           Renderable right)
Method Detail

processParameters

protected void processParameters(ParametersMap params)
Overrides:
processParameters in class Renderable

getInstance

public static Csg getInstance(RMLReader in)
                       throws java.io.IOException
Throws:
java.io.IOException

processObject

protected void processObject(java.lang.Object obj)
Overrides:
processObject in class Renderable

transform

public void transform(Matrix4f trans)
apply the given 4x4 transform to the object.

Overrides:
transform in class Bounded

setSelfShadowing

public void setSelfShadowing(boolean selfShadowing)
Description copied from class: Renderable
set whether or not we are self shadowing

Overrides:
setSelfShadowing in class Renderable

setShader

public void setShader(Shader shader)
set the shader for the csg object (note: this will not override shaders already set in sub branches.

Overrides:
setShader in class Renderable

intersections

public HitList intersections(Ray r)

isIntersected

public boolean isIntersected(Ray r)
Specified by:
isIntersected in interface Traceable
Specified by:
isIntersected in class Bounded

isShadowing

public boolean isShadowing(Ray r)
Specified by:
isShadowing in interface Traceable
Specified by:
isShadowing in class Bounded

XJRT Rendering Toolkit 1.0b06