Bouncy Castle Rendering Toolkit 1.0

org.bouncycastle.graphics.rt.objects
Class Csg

java.lang.Object
  |
  +--org.bouncycastle.graphics.rt.Renderable
        |
        +--org.bouncycastle.graphics.rt.Bounded
              |
              +--org.bouncycastle.graphics.rt.objects.Csg
All Implemented Interfaces:
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.bouncycastle.graphics.rt.Bounded
bBox
 
Fields inherited from class org.bouncycastle.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.bouncycastle.graphics.rt.Bounded
bBox, setBBox, setBBox
 
Methods inherited from class org.bouncycastle.graphics.rt.Renderable
createObjectSpaceRay, getColor, getColor, getShader, isSelfShadowing, readObject, setColor, setColor, toObjectSpace, toObjectSpace, transformNormal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNION

public static final int UNION

INTERSECT

public static final int INTERSECT

SUBTRACT

public static final int SUBTRACT
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

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)
Overrides:
isIntersected in class Bounded

isShadowing

public boolean isShadowing(Ray r)
Overrides:
isShadowing in class Bounded

Bouncy Castle Rendering Toolkit 1.0