raja.shape
Class BasicForm
java.lang.Object
|
+--raja.shape.BasicForm
- All Implemented Interfaces:
- Form, Shape3D
- Direct Known Subclasses:
- Cone, Cylinder, Plane, Sphere
- public abstract class BasicForm
- extends Object
- implements Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicForm
public BasicForm()
computeIntersection
protected abstract Point3D computeIntersection(Ray r)
computeNormal
protected abstract Vector3D computeNormal(Point3D p)
exactlyContains
protected abstract boolean exactlyContains(Point3D p)
exactlyStrictlyContains
protected abstract boolean exactlyStrictlyContains(Point3D p)
intersection
public LocalGeometry intersection(Ray r)
- Specified by:
intersection in interface Form
intersects
public boolean intersects(LightRay r)
- Specified by:
intersects in interface Shape3D
contains
public boolean contains(Point3D p)
- Specified by:
contains in interface Shape3D
strictlyContains
public boolean strictlyContains(Point3D p)
- Specified by:
strictlyContains in interface Shape3D
solve2ndOrder
protected Point3D solve2ndOrder(double a,
double b,
double c,
Ray r)
- Returns the point on the ray corresponding to the smallest positive solution
to the equation a*X^2 + b*X + c = 0.
- Parameters:
a, - b, c the coefficients of the equation.r - the ray.- Returns:
- the point r.origin + t*r.direction where t is the smallest X > 0 such that a*X^2 + b*X + c = 0 if there is any;
null otherwise.
hasLG
protected boolean hasLG(Point3D p)