XJRT Rendering Toolkit 1.0b06

org.autochthonous.graphics.rt.objects
Class IndexedMesh

java.lang.Object
  extended byorg.autochthonous.graphics.rt.Renderable
      extended byorg.autochthonous.graphics.rt.Bounded
          extended byorg.autochthonous.graphics.rt.objects.IndexedMesh
All Implemented Interfaces:
java.lang.Cloneable, ColorCalculator, Partitionable, TextureMapper, Traceable
Direct Known Subclasses:
ObjFile, OffFile, TriangleStrip

public class IndexedMesh
extends Bounded
implements TextureMapper

An indexed polygon mesh.


Field Summary
 
Fields inherited from class org.autochthonous.graphics.rt.Bounded
bBox
 
Fields inherited from class org.autochthonous.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Fields inherited from interface org.autochthonous.graphics.rt.TextureMapper
S, T
 
Constructor Summary
protected IndexedMesh()
           
  IndexedMesh(Point3f[] vertices, short[][] indxs)
           
  IndexedMesh(Point3f[] vertices, short[][] indxs, boolean smooth)
           
 
Method Summary
 boolean getST(Tuple3f l, float[] uv)
           
 boolean hasShader()
           
protected  void init(Point3f[] vertices, short[][] indxs)
           
protected  void init(Point3f[] vertices, short[][] indxs, boolean smooth)
           
 HitList intersections(Ray r)
           
 boolean isIntersected(Ray r)
           
 boolean isShadowing(Ray r)
           
protected  void processParameters(ParametersMap params)
           
 void setColors(Color3f[] colors, short[] colorIndexes)
           
 void setShader(Shader shader)
           
 void setShader(Shader[] shaders, short[] shaderIndexes)
           
 void setVertexColors(Color3f[] colors, short[][] indxs)
           
 void setVertexNormals(Vector3f[] normals, short[][] indxs)
           
 void setVertexTextureCoordinates(Point3f[] coords, short[][] indxs)
           
protected  short[][] vertexIndexes()
           
 
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, isSelfShadowing, processObject, readObject, setColor, setColor, setSelfShadowing, 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
 

Constructor Detail

IndexedMesh

public IndexedMesh(Point3f[] vertices,
                   short[][] indxs)

IndexedMesh

public IndexedMesh(Point3f[] vertices,
                   short[][] indxs,
                   boolean smooth)

IndexedMesh

protected IndexedMesh()
Method Detail

processParameters

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

init

protected void init(Point3f[] vertices,
                    short[][] indxs,
                    boolean smooth)

init

protected void init(Point3f[] vertices,
                    short[][] indxs)

isShadowing

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

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 Bounded

getST

public boolean getST(Tuple3f l,
                     float[] uv)
Specified by:
getST in interface TextureMapper

hasShader

public boolean hasShader()
Overrides:
hasShader in class Renderable

setShader

public void setShader(Shader shader)
Overrides:
setShader in class Renderable

setShader

public void setShader(Shader[] shaders,
                      short[] shaderIndexes)

vertexIndexes

protected short[][] vertexIndexes()

setColors

public void setColors(Color3f[] colors,
                      short[] colorIndexes)

setVertexNormals

public void setVertexNormals(Vector3f[] normals,
                             short[][] indxs)

setVertexTextureCoordinates

public void setVertexTextureCoordinates(Point3f[] coords,
                                        short[][] indxs)

setVertexColors

public void setVertexColors(Color3f[] colors,
                            short[][] indxs)

XJRT Rendering Toolkit 1.0b06