|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmex.model.ogrexml.anim.WeightBuffer
public final class WeightBuffer
WeightBuffer contains associations of vertexes to bones and their weights. The WeightBuffer can be sent to a shader or processed on the CPU to do skinning.
Field Summary | |
---|---|
(package private) java.nio.ByteBuffer |
indexes
Each 4 bytes in the boneIndex buffer are assigned to a vertex. |
(package private) int |
maxWeightsPerVert
The maximum number of weighted bones used by the vertices Can be 1-4. |
(package private) java.nio.FloatBuffer |
weights
The weight of each bone specified in the index buffer |
Constructor Summary | |
---|---|
WeightBuffer(java.nio.ByteBuffer indexes,
java.nio.FloatBuffer weights)
|
|
WeightBuffer(int vertexCount)
|
Method Summary | |
---|---|
void |
initializeWeights()
Normalizes weights if needed and finds largest amount of weights used for all vertices in the buffer. |
void |
sendToShader(GLSLShaderObjectsState shader)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.nio.ByteBuffer indexes
java.nio.FloatBuffer weights
int maxWeightsPerVert
Constructor Detail |
---|
public WeightBuffer(int vertexCount)
public WeightBuffer(java.nio.ByteBuffer indexes, java.nio.FloatBuffer weights)
Method Detail |
---|
public void sendToShader(GLSLShaderObjectsState shader)
public void initializeWeights()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |