XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class Algebraic

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.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"/>
 


Nested Class Summary
protected  class Algebraic.RayPoly
           
 
Field Summary
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Constructor Summary
protected Algebraic(int order)
           
  Algebraic(java.lang.String eqn)
          base constructor for an algebraic surface.
 
Method Summary
static Algebraic getInstance(RMLReader in)
           
 void getN(Hit hit, Vector3f n)
          set the normal for this hit point (object space) in hd the value is returned in n
protected  Algebraic.RayPoly getPolynomial(Ray r)
           
 HitList intersections(Ray r)
           
 boolean isIntersected(Ray r)
           
 boolean isShadowing(Ray r)
           
protected  void processParameters(ParametersMap params)
           
 
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
 

Constructor Detail

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)
Method Detail

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

XJRT Rendering Toolkit 1.0b06