Class GouraudRenderer.PolygonInfoEx
java.lang.Object
|
+--FlatRenderer.PolygonInfo
|
+--GouraudRenderer.PolygonInfoEx
- Direct Known Subclasses:
- PhongRenderer.PolygonInfoEx
- Enclosing class:
- GouraudRenderer
- protected static class GouraudRenderer.PolygonInfoEx
- extends FlatRenderer.PolygonInfo
Extended polygon info containing information about the intensities of
each vertices.
|
Method Summary |
protected void |
calcIntensities()
Calculates the intensity values of each vertice in the polygon. |
Color |
getColor()
Shorthand function to return the base color of this polygon. |
float[] |
getIntensity(int i)
returns the intensity of the vertice at Mesh.Polygon.verticesIndex[i] |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
intensities
protected float[][] intensities
- The intensity values. The element intensities[i] corresponds
to the vertice at Mesh.Polygon.verticesIndex[i].
meshInfo
protected GouraudRenderer.MeshInfo meshInfo
- The mesh information.
GouraudRenderer.PolygonInfoEx
protected GouraudRenderer.PolygonInfoEx()
- Constructs a blank PolygonInfoEx object. Derived classes' constructor
must initialize all of the data members.
GouraudRenderer.PolygonInfoEx
public GouraudRenderer.PolygonInfoEx(Mesh.Polygon poly,
GouraudRenderer.MeshInfo meshInfo,
List lights)
- Constructs the object. Creates the Edge Table and Active Edge Table
for the polygon.
- Parameters:
poly - the polygon this object is tied with.meshInfo - the MeshInfo object of poly's owner.lights - a list of Light object in the current world,
used to calculate intensity values for each
vertice in the polygon.
getColor
public Color getColor()
- Shorthand function to return the base color of this polygon.
- Overrides:
- getColor in class FlatRenderer.PolygonInfo
calcIntensities
protected void calcIntensities()
- Calculates the intensity values of each vertice in the polygon.
getIntensity
public float[] getIntensity(int i)
- returns the intensity of the vertice at Mesh.Polygon.verticesIndex[i]