XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class Heightfield

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.Bounded
          extended byorg.autochthonous.graphics.rt.objects.Heightfield
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, Partitionable, Traceable
Direct Known Subclasses:
ImageHeightfield

public class Heightfield
extends Bounded

a heightfield.

Example:

    <Heightfield color="1, 1, 1" name="hfield.hf" vertex1="-1, -1, -1" vertex2="1, 1, 1"/>
 

Document Type Definition:

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

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


Field Summary
protected  int pixHeight
           
protected  int[] pixVals
           
protected  int pixWidth
           
static float tolerance
           
protected  float[][] zVals
           
 
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
protected Heightfield()
           
protected Heightfield(Point3f p1, Point3f p2, float[][] zVals)
           
 
Method Summary
static Heightfield getInstance(RMLReader in)
           
protected  void initZ(float[][] zVals)
           
 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.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

tolerance

public static final float tolerance
See Also:
Constant Field Values

zVals

protected float[][] zVals

pixVals

protected int[] pixVals

pixWidth

protected int pixWidth

pixHeight

protected int pixHeight
Constructor Detail

Heightfield

protected Heightfield()

Heightfield

protected Heightfield(Point3f p1,
                      Point3f p2,
                      float[][] zVals)
Method Detail

getInstance

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

initZ

protected void initZ(float[][] zVals)

processParameters

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

intersections

public HitList intersections(Ray r)

isIntersected

public boolean isIntersected(Ray r)
Specified by:
isIntersected in interface Traceable
Specified by:
isIntersected in class Bounded

isShadowing

public boolean isShadowing(Ray r)
Specified by:
isShadowing in interface Traceable
Specified by:
isShadowing in class Bounded

XJRT Rendering Toolkit 1.0b06