|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectunc.cdva.graphics.models.Face
public class Face
Correspond to a polygon. Stores the vertices, the normal vector, the material id, and the UV
| Constructor Summary | |
|---|---|
Face(int verticesNumber,
int materialId)
Init a Face with the id of its material, and the number of vertices |
|
| Method Summary | |
|---|---|
void |
addPoint(javax.vecmath.Vector3f vertex,
javax.vecmath.Vector2f texture,
javax.vecmath.Vector3f normal)
Add a vertex to the face, with its texture coordinate and it's normal |
int |
getMaterialId()
|
javax.vecmath.Vector3f |
getNormal(int i)
Get the normal of the vertex of index i |
javax.vecmath.Vector2f |
getTextureCoordinates(int i)
Get the texture coordinates of the vertex of index i |
javax.vecmath.Vector3f |
getVertex(int i)
Get a vertex of the face using its index |
int |
getVerticesNumber()
Total number of vertices of the face |
void |
removePoint(javax.vecmath.Vector3f vertex)
Remove a vertex from the face |
void |
setMaterialId(int materialId)
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Face(int verticesNumber,
int materialId)
verticesNumber - number of vertices of the facematerialId - id of the material| Method Detail |
|---|
public void addPoint(javax.vecmath.Vector3f vertex,
javax.vecmath.Vector2f texture,
javax.vecmath.Vector3f normal)
vertex - coordinate of the pointtexture - texture coordinate of the pointnormal - normal at the pointpublic void removePoint(javax.vecmath.Vector3f vertex)
vertex - vertex to removepublic int size()
public javax.vecmath.Vector3f getVertex(int i)
i - index of the vertex
public javax.vecmath.Vector2f getTextureCoordinates(int i)
i - index of the vertex
public javax.vecmath.Vector3f getNormal(int i)
i - index of the vertex
public int getVerticesNumber()
public int getMaterialId()
public void setMaterialId(int materialId)
materialId - The material id to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||