| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.xml.XMLStructureAdapter
hmi.elckerlyc.animationengine.procanimation.Keyframes
public class Keyframes
Procedurally describes joint rotation as key rotations at key times, inbetween rotations are calculated through slerp interpolation.
| Field Summary | |
|---|---|
private  String | 
encoding
 | 
private  double | 
endT
 | 
private  ArrayList<Keyframe> | 
frames
 | 
private  VJoint | 
joint
 | 
private  org.lsmp.djep.xjep.XJep | 
parser
 | 
private  double | 
startT
 | 
private  String | 
target
 | 
| Fields inherited from class hmi.xml.XMLStructureAdapter | 
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING | 
| Constructor Summary | |
|---|---|
Keyframes(org.lsmp.djep.xjep.XJep p)
Constructor, no target set  | 
|
Keyframes(org.lsmp.djep.xjep.XJep p,
          String t)
Constructor  | 
|
| Method Summary | |
|---|---|
 StringBuilder | 
appendAttributeString(StringBuilder buf)
Appends a String to buf that encodes the attributes for the XML encoding.  | 
 StringBuilder | 
appendContent(StringBuilder buf,
              XMLFormatting fmt)
Appends a String to buf that encodes the contents for the XML encoding.  | 
 void | 
clear()
Removes all keyframes  | 
 boolean | 
decodeAttribute(String attrName,
                String attrValue)
decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized.  | 
 boolean | 
decodeAttribute(String attrName,
                String attrValue,
                XMLTokenizer tokenizer)
decodes the value from an attribute value String returns true if succesful, returns false for attribute names that are not recognized.  | 
 void | 
decodeContent(XMLTokenizer tokenizer)
decodes the XML contents, i.e. the XML between the STag and ETag of the encoding.  | 
 Keyframes | 
deepCopy()
Creates a deep copy linked to the same parser and joint  | 
 boolean | 
evaluate(double t,
         float[] goal,
         VJoint human)
Calculates joint rotation at time t  | 
 Vector | 
findParameters(Vector v)
returns list with all parameters used in all formulas  | 
 String | 
getEncoding()
 | 
 VJoint | 
getJoint()
Gets the joint the rotation works on  | 
 String | 
getTarget()
 | 
 String | 
getXMLTag()
Get the XML tag  | 
 void | 
mirror()
Mirrors all joint rotations on the XY plane, switches left/right partIds  | 
 void | 
set(Keyframes kfs)
Copies the KeyFrame-s of another Keyframes object into this object.  | 
 void | 
setJoint(VJoint j)
Sets the new joint  | 
 void | 
setTarget(VJoint h)
Sets the target humanoid for this rotation, tries to find the joint to rotate  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
private String target
private String encoding
private ArrayList<Keyframe> frames
private VJoint joint
private double startT
private double endT
private org.lsmp.djep.xjep.XJep parser
| Constructor Detail | 
|---|
public Keyframes(org.lsmp.djep.xjep.XJep p)
p - parser
public Keyframes(org.lsmp.djep.xjep.XJep p,
                 String t)
p - parsert - target| Method Detail | 
|---|
public void setTarget(VJoint h)
h - the targetpublic void mirror()
public void clear()
public void setJoint(VJoint j)
j - public VJoint getJoint()
public void set(Keyframes kfs)
kfs - public Keyframes deepCopy()
public Vector findParameters(Vector v)
public boolean evaluate(double t,
                        float[] goal,
                        VJoint human)
t - : time, 0 < t < 1goal - : output rotation
public String getTarget()
public StringBuilder appendContent(StringBuilder buf,
                                   XMLFormatting fmt)
XMLStructureAdapter
appendContent in class XMLStructureAdapterpublic StringBuilder appendAttributeString(StringBuilder buf)
XMLStructureAdapter
appendAttributeString in class XMLStructureAdapter
public boolean decodeAttribute(String attrName,
                               String attrValue)
XMLStructureAdapter
decodeAttribute in class XMLStructureAdapter
public void decodeContent(XMLTokenizer tokenizer)
                   throws IOException
XMLStructureAdapter
decodeContent in class XMLStructureAdapterIOException
public boolean decodeAttribute(String attrName,
                               String attrValue,
                               XMLTokenizer tokenizer)
XMLStructureAdapter
decodeAttribute in class XMLStructureAdapterpublic String getXMLTag()
getXMLTag in interface XMLStructuregetXMLTag in class XMLStructureAdapterpublic String getEncoding()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||