Class GouraudRenderer.MeshInfo
java.lang.Object
|
+--GouraudRenderer.MeshInfo
- Enclosing class:
- GouraudRenderer
- protected static class GouraudRenderer.MeshInfo
- extends Object
Information about rendering a mesh. Calculates and contain the normal
vectors for each vertice in the mesh
|
Field Summary |
protected Mesh |
mesh
The mesh for which this MeshInfo is tied to. |
protected Vector3D[] |
normalVectors
The normal vectors of each vertice in the mesh. |
|
Method Summary |
protected void |
calcVertices()
For each vertice in the mesh, calculate its corresponding normal vector
and place it in normalVectors. |
Vector3D |
getNormalVector(int i)
Returns the normal vector of a vertice in the mesh at the
specified index. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
normalVectors
protected Vector3D[] normalVectors
- The normal vectors of each vertice in the mesh.
Index i at Mesh.vertices[] corresponds to index
i at normalVectors[].
mesh
protected Mesh mesh
- The mesh for which this MeshInfo is tied to.
GouraudRenderer.MeshInfo
public GouraudRenderer.MeshInfo(Mesh m)
- Constructs the object and calculate the intensity value for each
vertice.
- Parameters:
m - the mesh for which this MeshInfo is tied to.
calcVertices
protected void calcVertices()
- For each vertice in the mesh, calculate its corresponding normal vector
and place it in normalVectors.
- See Also:
normalVectors
getNormalVector
public Vector3D getNormalVector(int i)
- Returns the normal vector of a vertice in the mesh at the
specified index.
- Parameters:
i - the index of the vertice in Mesh.vertices.- Returns:
- the normal vector of the vertice at index i.