XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class SuperQuadric

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.Bounded
          extended byorg.autochthonous.graphics.rt.objects.SimpleObject
              extended byorg.autochthonous.graphics.rt.objects.SuperQuadric
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, NormalCalculator, Partitionable, Traceable

public class SuperQuadric
extends SimpleObject
implements NormalCalculator

A superquadric.

Example:

    <SuperQuadric color="1, 1, 1" order="1" vertex1="0, 0, 0" vertex2="1, 1, 1"/>
 

Document Type Definition:

     <!ENTITY %Color3f "CDATA">
     <!ENTITY %Point3f "CDATA">
     <!ENTITY %Integer "CDATA">

     <!ELEMENT SuperQuadric EMPTY>
     <!ATTLIST SuperQuadric
         color   %Color3f; "1, 1, 1"
         order   %Integer; "1"
         vertex1 %Point3f; "0, 0, 0"
         vertex2 %Point3f; "1, 1, 1">
 


Field Summary
static BBox canonicalBBox
           
 
Fields inherited from class org.autochthonous.graphics.rt.Bounded
bBox
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Constructor Summary
SuperQuadric(int order, Point3d p1, Point3d p2)
           
SuperQuadric(int order, Point3f p1, Point3f p2)
           
 
Method Summary
static SuperQuadric 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  boolean isObjectIntersected(Ray r)
           
protected  void processParameters(ParametersMap params)
           
 
Methods inherited from class org.autochthonous.graphics.rt.objects.SimpleObject
doClip, intersections, isIntersected, isShadowing
 
Methods inherited from class org.autochthonous.graphics.rt.Bounded
bBox, setBBox, setBBox, transform
 
Methods inherited from class org.autochthonous.graphics.rt.Renderable
clone, createObjectSpaceRay, getColor, getColor, getShader, hasShader, isSelfShadowing, processObject, readObject, setColor, setColor, setSelfShadowing, setShader, toObjectSpace, toObjectSpace, transformNormal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.autochthonous.graphics.rt.Traceable
clone
 

Field Detail

canonicalBBox

public static final BBox canonicalBBox
Constructor Detail

SuperQuadric

public SuperQuadric(int order,
                    Point3d p1,
                    Point3d p2)

SuperQuadric

public SuperQuadric(int order,
                    Point3f p1,
                    Point3f p2)
Method Detail

getInstance

public static SuperQuadric getInstance(RMLReader in)
                                throws java.io.IOException
Throws:
java.io.IOException

processParameters

protected void processParameters(ParametersMap params)
Overrides:
processParameters in class Renderable

isObjectIntersected

protected boolean isObjectIntersected(Ray r)
Specified by:
isObjectIntersected in class SimpleObject

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