|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectthreeD.raytracer.engine.AbstractSurface
threeD.raytracer.primitives.CSG
A CSG object represents an object produced using a boolean combination of two surfaces.
| Field Summary | |
static int |
DIFFERENCE
Integer code for boolean difference (A - B). |
static int |
INTERSECTION
Integer code for boolean intersection (A & B). |
static int |
UNION
Integer code for boolean union (A + B). |
| Constructor Summary | |
CSG(AbstractSurface a,
AbstractSurface b,
int type)
Constructs a new CSG object using the specified Surface objects. |
|
| Method Summary | |
Vector |
getNormalAt(Vector point)
Returns a Vector object that represents the vector normal to the 3d surface at the point represented by the specified Vector object. |
boolean |
intersect(Ray ray)
This method calls intersectAt to determine the value to return. |
Intersection |
intersectAt(Ray ray)
Returns an Intersection object that represents the values for t that solve the vector equation p = o + t * d where p is a point of intersection of the specified ray and the surface. |
double[] |
interval(double[] intersect)
|
double[][] |
intervalDifference(double[] ia,
double[] ib)
|
double[] |
intervalIntersection(double[] ia,
double[] ib)
|
| Methods inherited from class threeD.raytracer.engine.AbstractSurface |
addShader, addTexture, addTransform, calculateTransform, getColor, getColorAt, getLocation, getParent, getRotationCoefficients, getScaleCoefficients, getShadeBack, getShadeFront, getShaderSet, getSize, getTexture, getTextures, getTextureSet, getTransform, getTransform, getTransforms, removeTexture, removeTransform, setColor, setLocation, setParent, setRotationCoefficients, setScaleCoefficients, setShadeBack, setShadeFront, setShaders, setSize, setTexture, setTextures, setTransform, setTransforms, shade |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int UNION
public static final int DIFFERENCE
public static final int INTERSECTION
| Constructor Detail |
public CSG(AbstractSurface a,
AbstractSurface b,
int type)
a - Surface A.b - Surface B.type - The type of boolean operation to perform (UNION, DIFFERENCE, INTERSECTION).
java.lang.IllegalArgumentException - If the type code is not valid.| Method Detail |
public Vector getNormalAt(Vector point)
Surface
public boolean intersect(Ray ray)
Surface.intersect(threeD.raytracer.engine.Ray)public Intersection intersectAt(Ray ray)
Surface
Surface.intersectAt(threeD.raytracer.engine.Ray)public double[] interval(double[] intersect)
public double[][] intervalDifference(double[] ia,
double[] ib)
public double[] intervalIntersection(double[] ia,
double[] ib)
|
Rings Version 0.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||