|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh
public class CalCoreSubmesh
The core submesh class.
| Nested Class Summary | |
|---|---|
static class |
CalCoreSubmesh.Face
|
| Field Summary | |
|---|---|
protected int |
coreMaterialThreadId
|
protected java.util.Vector<CalCoreSubMorphTarget> |
coreSubMorphTargets
|
protected int |
lodCount
|
protected boolean[] |
tangentsEnabled
|
protected TexCoord2fBuffer[] |
textureCoordinateBuffers
|
protected CalCoreSubmesh.Face[] |
vectorFace
|
protected float[] |
vectorPhysicalProperty
|
protected org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring[] |
vectorSpring
|
protected org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo[] |
vectorVertexInfo
|
protected Vector3fBuffer |
vertexNormals
|
protected Vector3fBuffer |
vertexPositions
|
protected ScalarfBuffer[] |
vertexTangentCrossFactors
|
protected Vector3fBuffer[] |
vertexTangents
|
| Constructor Summary | |
|---|---|
CalCoreSubmesh()
Constructs the core submesh instance. |
|
| Method Summary | |
|---|---|
int |
addCoreSubMorphTarget(CalCoreSubMorphTarget subMorphTarget)
Add a core sub morph target to the submesh. |
int |
getCoreMaterialThreadId()
Returns the ID of the core material thread. |
CalCoreSubMorphTarget |
getCoreSubMorphTarget(int id)
Gets a core sub morph target by id. |
int |
getCoreSubMorphTargetCount()
|
java.util.Vector<CalCoreSubMorphTarget> |
getCoreSubMorphTargets()
|
int |
getFaceCount()
Returns the number of faces. |
int |
getLodCount()
Returns the number of LOD steps. |
int |
getSpringCount()
Returns the number of springs. |
TexCoord2fBuffer[] |
getTextureCoordinates()
Returns an array of texture coordinate buffers - one for each texture map. |
CalCoreSubmesh.Face[] |
getVectorFace()
Returns the face vector. |
float[] |
getVectorPhysicalProperty()
Returns the physical property vector. |
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring[] |
getVectorSpring()
Returns the spring vector. |
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo[] |
getVectorVertexInfo()
Returns the vertex vector. |
int |
getVertexCount()
Returns the number of vertices. |
void |
getVertexNormal(int vertexId,
org.openmali.vecmath2.Vector3f normal)
|
Vector3fBuffer |
getVertexNormals()
|
void |
getVertexPosition(int vertexId,
org.openmali.vecmath2.Vector3f position)
|
Vector3fBuffer |
getVertexPositions()
|
ScalarfBuffer |
getVertexTangentCrossFactors(int mapId)
|
Vector3fBuffer |
getVertexTangents(int mapId)
|
boolean |
isTangentsEnabled(int mapId)
|
void |
reserve(int vertexCount,
int textureCoordinateCount,
int faceCount,
int springCount)
Reserves memory for the vertices, faces and texture coordinates. |
void |
scale(float factor)
Scale the Submesh. |
void |
setCoreMaterialThreadId(int coreMaterialThreadId)
Sets the ID of the core material thread. |
void |
setFace(int faceId,
CalCoreSubmesh.Face face)
Sets a specified face. |
void |
setLodCount(int lodCount)
Sets the number of LOD steps. |
void |
setPhysicalProperty(int vertexId,
float physicalProperty)
Sets a specified physical property. |
void |
setSpring(int springId,
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring spring)
Sets a specified spring. |
void |
setTangentsEnabled(int mapId,
boolean enabled)
|
void |
setTangentSpace(int vertexId,
int textureCoordinateId,
org.openmali.vecmath2.Vector3f tangent,
float crossFactor)
Sets the tangent vector associated with a specified texture coordinate pair. |
void |
setTextureCoordinate(int vertexId,
int textureCoordinateId,
org.openmali.vecmath2.Vector2f textureCoordinate)
Sets a specified texture coordinate. |
void |
setVertex(int vertexId,
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo vertex,
org.openmali.vecmath2.Vector3f position,
org.openmali.vecmath2.Vector3f normal)
Sets a specified vertex. |
void |
updateTangentVector(int v0,
int v1,
int v2,
int mapId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo[] vectorVertexInfo
protected Vector3fBuffer vertexPositions
protected Vector3fBuffer vertexNormals
protected boolean[] tangentsEnabled
protected Vector3fBuffer[] vertexTangents
protected ScalarfBuffer[] vertexTangentCrossFactors
protected TexCoord2fBuffer[] textureCoordinateBuffers
protected float[] vectorPhysicalProperty
protected CalCoreSubmesh.Face[] vectorFace
protected org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring[] vectorSpring
protected java.util.Vector<CalCoreSubMorphTarget> coreSubMorphTargets
protected int coreMaterialThreadId
protected int lodCount
| Constructor Detail |
|---|
public CalCoreSubmesh()
| Method Detail |
|---|
public int getCoreMaterialThreadId()
public int getFaceCount()
public int getLodCount()
public int getSpringCount()
public CalCoreSubmesh.Face[] getVectorFace()
public float[] getVectorPhysicalProperty()
public org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring[] getVectorSpring()
public TexCoord2fBuffer[] getTextureCoordinates()
public org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo[] getVectorVertexInfo()
public int getVertexCount()
public void reserve(int vertexCount,
int textureCoordinateCount,
int faceCount,
int springCount)
vertexCount - The number of vertices that this core submesh instance
should be able to hold.textureCoordinateCount - The number of texture coordinates that this
core submesh instance should be able to hold.faceCount - The number of faces that this core submesh instance should
be able to hold.springCount - The number of springs that this core submesh instance
should be able to hold.public void setCoreMaterialThreadId(int coreMaterialThreadId)
coreMaterialThreadId - The ID of the core material thread that should
be set.
public void setFace(int faceId,
CalCoreSubmesh.Face face)
faceId - The ID of the face.face - The face that should be set.public void setLodCount(int lodCount)
lodCount - The number of LOD steps that should be set.
public void setPhysicalProperty(int vertexId,
float physicalProperty)
vertexId - The ID of the vertex.physicalProperty - The physical property that should be set.
public void setSpring(int springId,
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.Spring spring)
springId - The ID of the spring.spring - The spring that should be set.
public void setTextureCoordinate(int vertexId,
int textureCoordinateId,
org.openmali.vecmath2.Vector2f textureCoordinate)
vertexId - The ID of the vertex.textureCoordinateId - The ID of the texture coordinate.textureCoordinate - The texture coordinate that should be set.
public void setVertex(int vertexId,
org.jagatoo.loaders.models.cal3d.core.CalCoreSubmesh.VertexInfo vertex,
org.openmali.vecmath2.Vector3f position,
org.openmali.vecmath2.Vector3f normal)
vertexId - The ID of the vertex.vertex - The vertex that should be set.
public void setTangentSpace(int vertexId,
int textureCoordinateId,
org.openmali.vecmath2.Vector3f tangent,
float crossFactor)
vertexId - The ID of the vertex.textureCoordinateId - The ID of the texture coordinate channel.tangent - The tangent vector that should be stored.crossFactor - The cross-product factor that should be stored.public Vector3fBuffer getVertexNormals()
public void getVertexNormal(int vertexId,
org.openmali.vecmath2.Vector3f normal)
public Vector3fBuffer getVertexPositions()
public void getVertexPosition(int vertexId,
org.openmali.vecmath2.Vector3f position)
public Vector3fBuffer getVertexTangents(int mapId)
public ScalarfBuffer getVertexTangentCrossFactors(int mapId)
public boolean isTangentsEnabled(int mapId)
public void setTangentsEnabled(int mapId,
boolean enabled)
public void updateTangentVector(int v0,
int v1,
int v2,
int mapId)
public int addCoreSubMorphTarget(CalCoreSubMorphTarget subMorphTarget)
public CalCoreSubMorphTarget getCoreSubMorphTarget(int id)
public java.util.Vector<CalCoreSubMorphTarget> getCoreSubMorphTargets()
public int getCoreSubMorphTargetCount()
public void scale(float factor)
factor - A float with the scale factor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||