|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.j3d.threeD.raytracer.engine.AbstractSurface
net.sf.j3d.threeD.raytracer.primitives.CSG
public class 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 java.lang.Object |
|---|
equals, 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).
IllegalArgumentException - If the type code is not valid.| Method Detail |
|---|
public Vector getNormalAt(Vector point)
Surface
public boolean intersect(Ray ray)
Surface.intersect(net.sf.j3d.threeD.raytracer.engine.Ray)public Intersection intersectAt(Ray ray)
Surface
Surface.intersectAt(net.sf.j3d.threeD.raytracer.engine.Ray)public double[] interval(double[] intersect)
public double[][] intervalDifference(double[] ia,
double[] ib)
public double[] intervalIntersection(double[] ia,
double[] ib)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||