|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mesh3D
Common interface for 3D (triangle) mesh containers.
Method Summary | |
---|---|
Mesh3D |
addFace(Vec3D a,
Vec3D b,
Vec3D c)
Adds the given 3 points as triangle face to the mesh. |
Mesh3D |
addFace(Vec3D a,
Vec3D b,
Vec3D c,
Vec2D uvA,
Vec2D uvB,
Vec2D uvC)
Adds the given 3 points as triangle face to the mesh and assigns the given texture coordinates to each vertex. |
Mesh3D |
addFace(Vec3D a,
Vec3D b,
Vec3D c,
Vec3D n)
|
Mesh3D |
addFace(Vec3D a,
Vec3D b,
Vec3D c,
Vec3D n,
Vec2D uvA,
Vec2D uvB,
Vec2D uvC)
|
Mesh3D |
addMesh(Mesh3D mesh)
|
AABB |
center(ReadonlyVec3D origin)
Centers the mesh around the given pivot point (the centroid of its AABB). |
Mesh3D |
clear()
Clears all counters, and vertex & face buffers. |
Vec3D |
computeCentroid()
Computes the mesh centroid, the average position of all vertices. |
Mesh3D |
computeFaceNormals()
Re-calculates all face normals. |
Mesh3D |
computeVertexNormals()
Computes the smooth vertex normals for the entire mesh. |
Mesh3D |
faceOutwards()
Changes the vertex order of faces such that their normal is facing away from the mesh centroid. |
Mesh3D |
flipVertexOrder()
Flips the vertex ordering between clockwise and anti-clockwise. |
Mesh3D |
flipYAxis()
Flips all vertices along the Y axis and reverses the vertex ordering of all faces to compensate and keep the direction of normals intact. |
AABB |
getBoundingBox()
Computes & returns the axis-aligned bounding box of the mesh. |
Sphere |
getBoundingSphere()
Computes & returns the bounding sphere of the mesh. |
Vertex |
getClosestVertexToPoint(ReadonlyVec3D p)
|
java.util.Collection<Face> |
getFaces()
|
int |
getNumFaces()
Returns the number of triangles used. |
int |
getNumVertices()
Returns the number of actual vertices used (unique vertices). |
java.util.Collection<Vertex> |
getVertices()
|
Mesh3D |
init(java.lang.String name,
int numV,
int numF)
|
Mesh3D |
setName(java.lang.String name)
|
Method Detail |
---|
Mesh3D addFace(Vec3D a, Vec3D b, Vec3D c)
a
- b
- c
- Mesh3D addFace(Vec3D a, Vec3D b, Vec3D c, Vec2D uvA, Vec2D uvB, Vec2D uvC)
a
- b
- c
- uvA
- uvB
- uvC
-
Mesh3D addFace(Vec3D a, Vec3D b, Vec3D c, Vec3D n)
Mesh3D addFace(Vec3D a, Vec3D b, Vec3D c, Vec3D n, Vec2D uvA, Vec2D uvB, Vec2D uvC)
Mesh3D addMesh(Mesh3D mesh)
AABB center(ReadonlyVec3D origin)
origin
- new centroid or null (defaults to {0,0,0})Mesh3D clear()
Vec3D computeCentroid()
Mesh3D computeFaceNormals()
Mesh3D computeVertexNormals()
Mesh3D faceOutwards()
Mesh3D flipVertexOrder()
Mesh3D flipYAxis()
AABB getBoundingBox()
Sphere getBoundingSphere()
Vertex getClosestVertexToPoint(ReadonlyVec3D p)
java.util.Collection<Face> getFaces()
int getNumFaces()
int getNumVertices()
java.util.Collection<Vertex> getVertices()
Mesh3D init(java.lang.String name, int numV, int numF)
Mesh3D setName(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |