|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectm3g04.mesh.MeshFactory3D
public class MeshFactory3D
Factory methods for 3D meshes.
| Constructor Summary | |
|---|---|
private |
MeshFactory3D()
Constructor has private access because class contains static methods exclusively. |
| Method Summary | |
|---|---|
static javax.microedition.m3g.Mesh |
createCube(boolean addColors,
boolean addNormals,
boolean addTexCoords)
Creates a cube with three separate vertices for each corner. |
static javax.microedition.m3g.Mesh |
createCylinder(int slices,
boolean addNormals,
boolean addTexCoords)
Creates a cylinder with a radius of one unit and a height of two units. |
static javax.microedition.m3g.Mesh |
createMinimalCube()
Creates a cube with one vertex per corner. |
static javax.microedition.m3g.Mesh |
createSphere(int slices,
int stacks,
boolean addNormals,
boolean addTexCoords)
Creates a sphere that's subdivided with the given number of slices and stacks. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private MeshFactory3D()
| Method Detail |
|---|
public static javax.microedition.m3g.Mesh createMinimalCube()
public static javax.microedition.m3g.Mesh createCube(boolean addColors,
boolean addNormals,
boolean addTexCoords)
addColors - true to give each side a fixed color.addNormals - true to generate normals, false otherwise.addTexCoords - true to generate texture coordinates, false
otherwise.
public static javax.microedition.m3g.Mesh createCylinder(int slices,
boolean addNormals,
boolean addTexCoords)
slices - subdivisions along the longitude.addNormals - true to generate normals, false otherwise.addTexCoords - true to generate texture coordinates, false
otherwise.
public static javax.microedition.m3g.Mesh createSphere(int slices,
int stacks,
boolean addNormals,
boolean addTexCoords)
slices - subdivisions along the longitude.stacks - subdivisions along the latitude.addNormals - true to generate normals, false otherwise.addTexCoords - true to generate texture coordinates, false
otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||