org.autochthonous.graphics.rt.objects
Class Algebraic
java.lang.Object
org.autochthonous.graphics.rt.Renderable
org.autochthonous.graphics.rt.objects.Algebraic
- All Implemented Interfaces:
- java.lang.Cloneable, ColorCalculator, NormalCalculator, Traceable
- Direct Known Subclasses:
- KummerSurface
- public class Algebraic
- extends Renderable
- implements NormalCalculator
Rendering for an arbitrary algebraic surface.
Sample RML:
<Algebraic color="0.1372, 0.557, 0.1372"
equation="4(x^{2} + y^{2} + z^{2} - 13)^{3} + 27(3x^{2} + y^{2} - 4z^{2} - 12)^{2} = 0"/>
Constructor Summary |
protected |
Algebraic(int order)
|
|
Algebraic(java.lang.String eqn)
base constructor for an algebraic surface. |
Methods inherited from class org.autochthonous.graphics.rt.Renderable |
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, processObject, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transform, transformNormal |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Algebraic
public Algebraic(java.lang.String eqn)
- base constructor for an algebraic surface.
The equation format follows the same rules as TeX, for example:
x^{2} + y^{2} + z^{2} = 1
describes a unit sphere.
Algebraic
protected Algebraic(int order)
getInstance
public static Algebraic getInstance(RMLReader in)
throws java.io.IOException
- Throws:
java.io.IOException
processParameters
protected void processParameters(ParametersMap params)
- Overrides:
processParameters
in class Renderable
isShadowing
public boolean isShadowing(Ray r)
- Specified by:
isShadowing
in interface Traceable
- Specified by:
isShadowing
in class Renderable
intersections
public HitList intersections(Ray r)
- Specified by:
intersections
in interface Traceable
isIntersected
public boolean isIntersected(Ray r)
- Specified by:
isIntersected
in interface Traceable
- Specified by:
isIntersected
in class Renderable
getPolynomial
protected Algebraic.RayPoly getPolynomial(Ray r)
getN
public void getN(Hit hit,
Vector3f n)
- Description copied from interface:
NormalCalculator
- set the normal for this hit point (object space) in hd
the value is returned in n
- Specified by:
getN
in interface NormalCalculator