Bouncy Castle Rendering Toolkit 1.0

org.bouncycastle.graphics.rt.objects
Class IndexedMesh

java.lang.Object
  |
  +--org.bouncycastle.graphics.rt.Renderable
        |
        +--org.bouncycastle.graphics.rt.Bounded
              |
              +--org.bouncycastle.graphics.rt.objects.IndexedMesh
All Implemented Interfaces:
ColorCalculator, Partitionable, TextureMapper, Traceable
Direct Known Subclasses:
ObjFile, OffFile, TriangleStrip

public class IndexedMesh
extends Bounded
implements TextureMapper

An indexed polygon mesh.


Fields inherited from class org.bouncycastle.graphics.rt.Bounded
bBox
 
Fields inherited from class org.bouncycastle.graphics.rt.Renderable
color, objToRay, rayToObj, selfShadowing, shader
 
Fields inherited from interface org.bouncycastle.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)
           
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.bouncycastle.graphics.rt.Bounded
bBox, setBBox, setBBox, transform
 
Methods inherited from class org.bouncycastle.graphics.rt.Renderable
createObjectSpaceRay, getColor, getColor, getShader, isSelfShadowing, processObject, readObject, setColor, setColor, setSelfShadowing, toObjectSpace, toObjectSpace, transformNormal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
Overrides:
isShadowing in class Bounded

intersections

public HitList intersections(Ray r)

isIntersected

public boolean isIntersected(Ray r)
Overrides:
isIntersected in class Bounded

getST

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

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)

Bouncy Castle Rendering Toolkit 1.0