|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Geom
org.odejava.PlaceableGeom
org.odejava.GeomTriMesh
public class GeomTriMesh
A triangle mesh (TriMesh) represents an arbitrary collection of triangles. The triangle mesh collision system has the following features:
Any triangle soup can be represented i.e. the triangles are not required to have any particular strip, fan or grid structure. Triangle meshes can interact with spheres, boxes and rays. It works well for relatively large triangles. It uses temporal coherence to speed up collision tests. When a geom has its collision checked with a trimesh once, data is stored inside the trimesh. This data can be cleared with the dGeomTriMeshClearTCCache function. In the future it will be possible to disable this functionality.
Note: give index in such way that triangles are build clockwise (z is up). Created 16.12.2003 (dd.mm.yyyy)
| Field Summary |
|---|
| Fields inherited from class org.odejava.Geom |
|---|
geomId, isEncapsulated, spaceId |
| Constructor Summary | |
|---|---|
GeomTriMesh(float[] vertices,
float[] normals,
int numVertices)
Convenience constructor to create a new geometry triangle mesh that is made from pure triangles without indices. |
|
GeomTriMesh(float[] vertices,
float[] normals,
int[] indices)
Create a tri mesh from a set of vertices and indices, and no name set. |
|
GeomTriMesh(float[] vertices,
int numVertices)
Convenience constructor to create a new geometry triangle mesh that is made from pure triangles without indices. |
|
GeomTriMesh(float[] vertices,
int[] indices)
Create a tri mesh from a set of vertices and indices, and no name set. |
|
GeomTriMesh(String name,
float[] vertices,
float[] normals,
int[] indices)
Create trimesh geometry to specific space. |
|
GeomTriMesh(String name,
float[] vertices,
int[] indices)
Create trimesh geometry to specific space. |
|
GeomTriMesh(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices)
Create a tri mesh from a set of vertices and indices, and no name set. |
|
| Method Summary | |
|---|---|
int[] |
getIndices()
Get the list of indices that define these triangles. |
float[] |
getNormals()
Get the list of normals that contribute to the mesh. |
float[] |
getVertices()
Get the list of vertices that contribute to the mesh. |
| Methods inherited from class org.odejava.PlaceableGeom |
|---|
delete, fixed, getAxisAngle, getAxisAngle, getBody, getPosition, getPosition, getPosition, getQuaternion, getQuaternion, getRotation, setAxisAndAngle, setAxisAndAngle, setBody, setPosition, setPosition, setQuaternion, setQuatWXYZ, setRotation |
| Methods inherited from class org.odejava.Geom |
|---|
addToSpace, finalize, getGeomFromNativeAddr, getId, getID, getName, getNativeAddr, getUserData, isEnabled, removeFromSpace, setCategoryBits, setCollideBits, setEnabled, setName, setUserData, updateNativeAddr |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.odejava.Placeable |
|---|
getName |
| Constructor Detail |
|---|
public GeomTriMesh(float[] vertices,
int numVertices)
vertices - The collection of vertices to make the mesh fromnumVertices - The number of valid vertices to use (must be a
multiple of 3)
public GeomTriMesh(float[] vertices,
float[] normals,
int numVertices)
vertices - The collection of vertices to make the mesh fromnormals - The collection of face normals for each trianglenumVertices - The number of valid vertices to use (must be a
multiple of 3)
public GeomTriMesh(float[] vertices,
int[] indices)
vertices - A list of vertices to create the geom withindices - A list of indices to define the triangles
public GeomTriMesh(org.openmali.vecmath2.Tuple3f[] vertices,
int[] indices)
vertices - A list of vertices to create the geom withindices - A list of indices to define the triangles
public GeomTriMesh(float[] vertices,
float[] normals,
int[] indices)
vertices - A list of vertices to create the geom withnormals - The collection of face normals for each triangleindices - A list of indices to define the triangles
public GeomTriMesh(String name,
float[] vertices,
int[] indices)
name - An optional name to associate with this geometryvertices - A list of vertices to create the geom withindices - A list of indices to define the triangles
public GeomTriMesh(String name,
float[] vertices,
float[] normals,
int[] indices)
name - An optional name to associate with this geometryvertices - A list of vertices to create the geom withnormals - The collection of face normals for each triangleindices - A list of indices to define the triangles| Method Detail |
|---|
public int[] getIndices()
public float[] getVertices()
public float[] getNormals()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||