pl.webnet.JaTrac
Class UniformGrid

java.lang.Object
  |
  +--pl.webnet.JaTrac.IntersectionTester
        |
        +--pl.webnet.JaTrac.UniformGrid
All Implemented Interfaces:
XmlSettable

final class UniformGrid
extends IntersectionTester
implements XmlSettable


Field Summary
(package private)  int depth
           
(package private)  int height
           
(package private)  double scaleDepth
           
(package private)  double scaleHeight
           
(package private)  double scaleWidth
           
(package private)  pl.webnet.JaTrac.Scene scene
           
(package private)  pl.webnet.JaTrac.BoundingBox sceneBB
           
(package private)  pl.webnet.JaTrac.Voxel[][][] voxelGrid
           
(package private)  int width
           
 
Constructor Summary
(package private) UniformGrid()
           
 
Method Summary
private  void assignToVoxels(pl.webnet.JaTrac.Primitive prim)
           
 java.lang.String[] getAttachArray()
          Get object's attach array.
 java.lang.String[] getParamArray()
          Get object's parameter array.
 int init(pl.webnet.JaTrac.Point p, pl.webnet.JaTrac.Ray ray, boolean shadow)
           
 java.lang.Object initialize()
          Initialize object's internal state after setting all params from XML file.
 void initialize(pl.webnet.JaTrac.Scene scene, pl.webnet.JaTrac.Camera cam)
           
 int intersect(pl.webnet.JaTrac.Ray ray, pl.webnet.JaTrac.Level level, int hits, boolean shadow)
           
 int intersectRay(pl.webnet.JaTrac.Ray ray)
           
 int intersectShadowfeeler(pl.webnet.JaTrac.Ray ray)
           
 int intersectVoxelContents(pl.webnet.JaTrac.Ray ray, pl.webnet.JaTrac.Voxel voxel, boolean shadowRay)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scene

pl.webnet.JaTrac.Scene scene

sceneBB

pl.webnet.JaTrac.BoundingBox sceneBB

width

int width

height

int height

depth

int depth

scaleWidth

double scaleWidth

scaleHeight

double scaleHeight

scaleDepth

double scaleDepth

voxelGrid

pl.webnet.JaTrac.Voxel[][][] voxelGrid
Constructor Detail

UniformGrid

UniformGrid()
Method Detail

initialize

public void initialize(pl.webnet.JaTrac.Scene scene,
                       pl.webnet.JaTrac.Camera cam)
Specified by:
initialize in class IntersectionTester

assignToVoxels

private void assignToVoxels(pl.webnet.JaTrac.Primitive prim)

intersectRay

public int intersectRay(pl.webnet.JaTrac.Ray ray)
Specified by:
intersectRay in class IntersectionTester

intersectShadowfeeler

public int intersectShadowfeeler(pl.webnet.JaTrac.Ray ray)
Specified by:
intersectShadowfeeler in class IntersectionTester

intersect

public int intersect(pl.webnet.JaTrac.Ray ray,
                     pl.webnet.JaTrac.Level level,
                     int hits,
                     boolean shadow)

init

public int init(pl.webnet.JaTrac.Point p,
                pl.webnet.JaTrac.Ray ray,
                boolean shadow)

intersectVoxelContents

public int intersectVoxelContents(pl.webnet.JaTrac.Ray ray,
                                  pl.webnet.JaTrac.Voxel voxel,
                                  boolean shadowRay)

initialize

public java.lang.Object initialize()
Description copied from interface: XmlSettable
Initialize object's internal state after setting all params from XML file. Called after element's end tag is encountered in XML file.

Specified by:
initialize in interface XmlSettable

getParamArray

public java.lang.String[] getParamArray()
Description copied from interface: XmlSettable
Get object's parameter array. The array maps XML element names to variable names and, if setting one variable is not enough, lists names of functions to call.

Specified by:
getParamArray in interface XmlSettable
Returns:
object's parameter array.

getAttachArray

public java.lang.String[] getAttachArray()
Description copied from interface: XmlSettable
Get object's attach array. The array specifies what functions to call to attach children nodes to this object.

Specified by:
getAttachArray in interface XmlSettable
Returns:
object's attach array.