org.autochthonous.graphics.rt.objects
Class Csg
java.lang.Object
org.autochthonous.graphics.rt.Renderable
org.autochthonous.graphics.rt.Bounded
org.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).
Fields inherited from class org.autochthonous.graphics.rt.Bounded |
bBox |
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 |
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
Csg
public Csg(int operation,
Renderable left,
Renderable right)
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