jjdh.opengl.engine.buffers
Class NormalGenerator
java.lang.Object
jjdh.opengl.engine.buffers.NormalGenerator
public class NormalGenerator
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isActive
protected boolean isActive
- Indicates if this generator should be uesed or not
vertices
protected VertexBuffer vertices
normals
protected HashMap<Integer,Vector3D> normals
NormalGenerator
public NormalGenerator()
setActive
public void setActive(boolean enable)
isActive
public boolean isActive()
setVertexBuffer
public void setVertexBuffer(VertexBuffer vertexBuffer)
init
protected void init()
putNormal
public void putNormal(int i0,
int i1,
int i2)
- Adds the Normal of the given Triangle.
- Parameters:
i0
- the index of the first Vertex of the Trianglei1
- the index of the second Vertex of the Trianglei2
- the index of the third Vertex of the Triangle
putNormal
public void putNormal(int i0,
int i1,
int i2,
int i3)
- Adds the Normal of the given Quad.
- Parameters:
i0
- the index of the first Vertex of the Quadi1
- the index of the second Vertex of the Quadi2
- the index of the third Vertex of the Quadi3
- the index of the forth Vertex of the Quad
calculateNormal
protected Vector3D calculateNormal(int i0,
int i1,
int i2)
- Calculates the Normal of the given Triangle.
- Parameters:
i0
- the index of the first Vertex of the Trianglei1
- the index of the second Vertex of the Trianglei2
- the index of the third Vertex of the Triangle
getResult
public NormalBuffer getResult()
Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.