|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--Mesh.Polygon
Represents one polygon in the mesh.
| Field Summary | |
protected Color |
color
The color of this polygon. |
protected PlaneEquation |
equation
The plane equation for this polygon. |
protected RGBTriplet |
KAmbient
|
protected RGBTriplet |
KDiffuse
|
protected RGBTriplet |
KSpecular
The object reflectance |
protected float |
N
The specular-reflection parameter |
protected Mesh |
owner
The owner mesh which this polygon belongs to. |
protected int[] |
verticesIndex
The array of indices to the points in the owner mesh. |
protected double |
xMax
the maximum x value. |
protected double |
xMin
the minimum x value. |
protected double |
yMax
the maximum y value. |
protected double |
yMin
the minimum y value |
protected double |
zMax
the maximum Z value. |
protected double |
zMin
the minimum Z value |
| Constructor Summary | |
Mesh.Polygon(Mesh owner,
int[] vi)
Polygon |
|
Mesh.Polygon(Mesh owner,
int[] vi,
Color col)
|
|
Mesh.Polygon(Mesh owner,
int[] vi,
Color col,
RGBTriplet KAmbient,
RGBTriplet KDiffuse,
RGBTriplet KSpecular,
float N)
|
|
| Method Summary | |
protected void |
calcBoundaries()
Calculates minZ and maxZ |
Object |
clone()
|
Color |
getColor()
Returns the color of the polygon surface. |
PlaneEquation |
getEquation()
Returns the plane equation for this polygon. |
RGBTriplet |
getKAmbient()
|
RGBTriplet |
getKDiffuse()
|
RGBTriplet |
getKSpecular()
|
float |
getN()
Returns the normal vector of this polygon. |
Mesh |
getOwner()
Returns the owning mesh object of this polygon. |
int[] |
getVerticesIndex()
Returns the indexes to the vertices in the owner Mesh object. |
double |
getXMax()
Returns the maximum x value. |
double |
getXMin()
Returns the minimum x value. |
double |
getYMax()
Returns the maximum y value. |
double |
getYMin()
Returns the minimum y value. |
double |
getZMax()
Returns the maximum z value. |
double |
getZMin()
Returns the minimum z value. |
void |
setN(float n)
Sets the normal vector of this polygon. |
String |
toString()
Returns the string representation of this polygon. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected RGBTriplet KSpecular
protected RGBTriplet KAmbient
protected RGBTriplet KDiffuse
protected float N
protected int[] verticesIndex
protected Mesh owner
verticesIndex,
Mesh.verticesprotected Color color
protected PlaneEquation equation
protected double xMax
protected double yMax
protected double zMax
protected double xMin
protected double yMin
protected double zMin
| Constructor Detail |
public Mesh.Polygon(Mesh owner,
int[] vi)
public Mesh.Polygon(Mesh owner,
int[] vi,
Color col)
public Mesh.Polygon(Mesh owner,
int[] vi,
Color col,
RGBTriplet KAmbient,
RGBTriplet KDiffuse,
RGBTriplet KSpecular,
float N)
| Method Detail |
public String toString()
owner[ {
xMin,xMax;
yMin,yMax;
zMin,zMax
}
(x1,y1,z1)
(x1,y1,z1)
...
]
public RGBTriplet getKAmbient()
public RGBTriplet getKDiffuse()
public RGBTriplet getKSpecular()
public float getN()
public void setN(float n)
public Mesh getOwner()
public int[] getVerticesIndex()
public Color getColor()
public Object clone()
public double getXMax()
public double getYMax()
public double getZMax()
public double getXMin()
public double getYMin()
public double getZMin()
public PlaneEquation getEquation()
protected void calcBoundaries()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||