|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.xml.XMLStructureAdapter
hmi.graphics.scenegraph.GMesh
hmi.graphics.scenegraph.GSkinnedMesh
public class GSkinnedMesh
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class hmi.graphics.scenegraph.GMesh |
|---|
GMesh.MeshType |
| Field Summary | |
|---|---|
private static int |
COLORCODINGSIZE
|
private static int |
COLORSIZE
|
private static float |
EPSILON1
|
private static float |
EPSILON2
|
private static int |
FIELDWIDTH
|
private static int |
INDICESPERLINE
|
private float[][] |
inverseBindMatrices
|
private static int |
JINFOFIELDWIDTH
|
private static int |
JINFOPRECISION
|
private static int |
JINFOTAB
|
private float[][] |
jointMatrices
|
private String[] |
jointNames
|
private GNode[] |
jointNodes
|
private float[][] |
jointPositions
|
private String[] |
jointSIDs
|
private boolean |
notshown
|
private static int |
NUMJOINTSSHOWN
|
private float[][] |
originalInverseBindMatrices
|
private int[] |
parentIndex
|
private static int |
PRECISION
|
private static boolean |
showCalc
|
private static int |
SHOWPOSFIELDWIDTH
|
private static int |
SHOWPOSPRECISION
|
private String[] |
skeletonIds
|
private GNode[] |
skeletonRoots
|
private float[][] |
transformMatrices
|
private VertexWeights |
vertexWeights
|
private static String |
XMLTAG
|
| Fields inherited from class hmi.xml.XMLStructureAdapter |
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING |
| Constructor Summary | |
|---|---|
GSkinnedMesh()
Default constructor |
|
GSkinnedMesh(GMesh base)
Creates a new GSkinnedMesh, with the data for the underlying GMesh fields obtained from the specified base GMesh parameter. |
|
GSkinnedMesh(XMLTokenizer tokenizer)
Creates a new GSkinnedMesh and reads the data from the XMLTokenizer. |
|
| Method Summary | |
|---|---|
void |
addVertexWeightColors(boolean useWeights,
String[] names,
float[][] colorCoding3)
assumption: colorCoding is an array of float[3] colors, same length as indices array. |
void |
adjustBindPose()
|
void |
affineTransform(float[] ma)
Transforms the mesh attributes with specific names: VertexCoord, Normal Assumption: transformMatrix is a 4x4 matrix, in row major order. |
StringBuilder |
appendAttributeString(StringBuilder buf,
XMLFormatting fmt)
appends the XML attributes to buf. |
StringBuilder |
appendContent(StringBuilder buf,
XMLFormatting fmt)
Appends content part of XML encoding |
void |
calculateGMatrices()
(re)calculates the transform matrices: matrices[i] = jointMatrices[i] * inverseBindMatrices[i] |
void |
decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodes the XML attributes. |
void |
decodeContent(XMLTokenizer tokenizer)
Decodes content part of XML encoding |
float[][] |
getColorCoding()
|
float[][] |
getInvBindMatrices()
returns the float array with packed inverse bind matrices. 16 floats per matrix, in row major order |
GNode |
getJointGNode(String sid)
|
int[] |
getJointIndices(String[] names)
|
String[] |
getJointNames()
Returns the String array with joint names |
String[] |
getJointSIDs()
Returns the String array with joint names |
float[][] |
getOriginalInvBindMatrices()
returns the float array with packed inverse bind matrices. 16 floats per matrix, in row major order |
int[] |
getParentIndex()
|
String[] |
getSkeletonIds()
Returns the String array with skeleton ids (probably of length 1) |
GNode[] |
getSkeletonRoots()
Returns an array with the skeleton roots(s) of this skinned mesh |
VertexWeights |
getVertexWeights()
Returns the VertexWeights |
VJoint |
getVJoint(String sid)
|
VJoint[] |
getVJoints()
Returns an array with VJoints for all joints within the skinned mesh |
String |
getXMLTag()
returns the XML Stag for XML encoding |
void |
linearTransform(float[] mat3x3)
Transforms the mesh attributes with specific names: VertexCoord, Normal Assumption: transformMatrix is a 4x4 matrix, in row major order. |
void |
printInvBindMatrices()
Prints the inverse bind matrices to the Console |
void |
printJointInfo()
Prints the name and inverse bind matrix for all joints. |
void |
printJointNames()
Prints the joint names to the Console |
void |
renameJointSIDs(Map<String,String> renaming)
renames the sids and names of GNodes |
void |
resolveJoints(List<GNode> jointRoots)
Resolves the joints, used in this GLSkinnedMesh, by searching for skeletons and joint names within the specified VJoint scene graphs. |
void |
resolveSkeletonIds(List<GNode> jointRoots)
Resolves the skeleton root node(s) within the GNode scenegraph adds these root(s) to skelRootList. |
void |
setBindPose()
Sets the inverse bind matrices to the inverse of the (global) matrices of the VJoints of this skinned mesh. |
void |
setInvBindMatrices(float[][] matrices)
Sets the float array with packed inverse bind matrices. |
void |
setJointNames(String[] names)
Sets the array with the Collada joint names. |
void |
setJointSIDs(String[] jointSIDs)
Sets the array with joint names (sid's) |
void |
setSkeletonIds(String[] skeletonIds)
Sets the array with skeleton id's |
void |
setVertexWeights(VertexWeights vertexWeights)
Sets the vertex weights for skinning |
void |
showPositions(int limit)
assume that global matrices have been calculated, so the jointMatrices have been set |
void |
unifyIndices()
Removes all attribute-specific indices, and replaces them by a single, common, indexData array. |
void |
writeBindMatrixRotations()
Writes the vector of bind matrix quaternions to file |
static String |
xmlTag()
The XML Stag for XML encoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String[] skeletonIds
private GNode[] skeletonRoots
private String[] jointNames
private String[] jointSIDs
private GNode[] jointNodes
private int[] parentIndex
private float[][] inverseBindMatrices
private float[][] originalInverseBindMatrices
private float[][] transformMatrices
private float[][] jointMatrices
private VertexWeights vertexWeights
private float[][] jointPositions
private static final int JINFOTAB
private static final int JINFOFIELDWIDTH
private static final int JINFOPRECISION
private static boolean showCalc
private static final int SHOWPOSFIELDWIDTH
private static final int SHOWPOSPRECISION
private boolean notshown
private static final int NUMJOINTSSHOWN
private static final int FIELDWIDTH
private static final int PRECISION
private static final float EPSILON1
private static final float EPSILON2
private static final int COLORCODINGSIZE
private static final int COLORSIZE
private static final int INDICESPERLINE
private static final String XMLTAG
| Constructor Detail |
|---|
public GSkinnedMesh()
public GSkinnedMesh(GMesh base)
public GSkinnedMesh(XMLTokenizer tokenizer)
throws IOException
IOException| Method Detail |
|---|
public void setSkeletonIds(String[] skeletonIds)
public String[] getSkeletonIds()
public void setJointSIDs(String[] jointSIDs)
public String[] getJointSIDs()
public void setJointNames(String[] names)
public String[] getJointNames()
public void renameJointSIDs(Map<String,String> renaming)
public GNode getJointGNode(String sid)
public VJoint getVJoint(String sid)
public void printJointNames()
public int[] getParentIndex()
public void setInvBindMatrices(float[][] matrices)
public float[][] getInvBindMatrices()
public float[][] getOriginalInvBindMatrices()
public void printInvBindMatrices()
public VJoint[] getVJoints()
public GNode[] getSkeletonRoots()
public void printJointInfo()
public void setVertexWeights(VertexWeights vertexWeights)
public VertexWeights getVertexWeights()
public void unifyIndices()
unifyIndices in class GMeshpublic void resolveSkeletonIds(List<GNode> jointRoots)
public void resolveJoints(List<GNode> jointRoots)
public void showPositions(int limit)
public void writeBindMatrixRotations()
public void adjustBindPose()
public void linearTransform(float[] mat3x3)
GMesh
linearTransform in class GMeshpublic void affineTransform(float[] ma)
GMesh
affineTransform in class GMeshpublic void setBindPose()
public void calculateGMatrices()
public void addVertexWeightColors(boolean useWeights,
String[] names,
float[][] colorCoding3)
public int[] getJointIndices(String[] names)
public float[][] getColorCoding()
public StringBuilder appendAttributeString(StringBuilder buf,
XMLFormatting fmt)
appendAttributeString in class GMesh
public void decodeAttributes(HashMap<String,String> attrMap,
XMLTokenizer tokenizer)
decodeAttributes in class GMesh
public StringBuilder appendContent(StringBuilder buf,
XMLFormatting fmt)
appendContent in class GMesh
public void decodeContent(XMLTokenizer tokenizer)
throws IOException
decodeContent in class GMeshIOExceptionpublic static String xmlTag()
public String getXMLTag()
getXMLTag in interface XMLStructuregetXMLTag in class GMesh
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||