|
||||||||||
| 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.Rotation
public class Rotation
Describes the rotation of a single joint in a formula The rotation can be a function of time t (0 < t < 1) and some parameters
| Field Summary | |
|---|---|
private VJoint |
joint
|
private boolean |
local
|
private org.nfunk.jep.Node[] |
node
|
private org.lsmp.djep.xjep.XJep |
parser
|
private String[] |
rotFormula
|
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 | |
|---|---|
Rotation(org.lsmp.djep.xjep.XJep p)
Creates a new Rotation with null target |
|
Rotation(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. |
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. |
Rotation |
deepCopy()
|
boolean |
evaluate(float[] goal)
|
float |
evaluateSingleIndex(int i)
Evaluates the rotation for time 0 < t < 1 |
Vector |
findParameters(Vector v)
returns list with all parameters used in all formulas |
VJoint |
getJoint()
Gets the joint the rotation works on |
String |
getRotationFormula(int i)
Get the rotation formula |
String |
getTarget()
Get the target joint sid |
String |
getXMLTag()
returns the XML tag that is used to encode this type of XMLStructure. |
boolean |
isLocal()
|
void |
mirror()
|
void |
set(Rotation eff)
Copy the rotation formulas and target from eff into this Rotation |
void |
setJoint(VJoint j)
Sets the new joint, sets the target to the joints sid, if j! |
void |
setRotation(int i,
String rotation)
Set the rotation path |
void |
setTarget(String t)
Sets the target joint sid |
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 org.nfunk.jep.Node[] node
private String[] rotFormula
private String target
private VJoint joint
private org.lsmp.djep.xjep.XJep parser
private boolean local
| Constructor Detail |
|---|
public Rotation(org.lsmp.djep.xjep.XJep p)
p - the XJep rotation formula parser
public Rotation(org.lsmp.djep.xjep.XJep p,
String t)
p - the XJep rotation formula parsert - the target joint sid| Method Detail |
|---|
public void mirror()
public void set(Rotation eff)
eff - the rotation to copypublic String getTarget()
public void setTarget(String t)
t - the sid of the target jointpublic String getRotationFormula(int i)
i - index (0=x axis,1=y axis,2=z axis)
public void setRotation(int i,
String rotation)
throws org.nfunk.jep.ParseException
i - the rotation axis (0=x,1=y,2=z)rotation - the rotation path a formula of 0 < t < 1 and amplitude a
org.nfunk.jep.ParseExceptionpublic boolean evaluate(float[] goal)
goal - : output rotation
public float evaluateSingleIndex(int i)
public Vector findParameters(Vector v)
public void setTarget(VJoint h)
h - the targetpublic void setJoint(VJoint j)
j - new jointpublic VJoint getJoint()
public Rotation deepCopy()
public boolean isLocal()
public boolean decodeAttribute(String attrName,
String attrValue)
XMLStructureAdapter
decodeAttribute in class XMLStructureAdapter
public boolean decodeAttribute(String attrName,
String attrValue,
XMLTokenizer tokenizer)
XMLStructureAdapter
decodeAttribute in class XMLStructureAdapter
public void decodeContent(XMLTokenizer tokenizer)
throws IOException
XMLStructureAdapter
decodeContent in class XMLStructureAdapterIOException
public StringBuilder appendContent(StringBuilder buf,
XMLFormatting fmt)
XMLStructureAdapter
appendContent in class XMLStructureAdapterpublic StringBuilder appendAttributeString(StringBuilder buf)
XMLStructureAdapter
appendAttributeString in class XMLStructureAdapterpublic String getXMLTag()
XMLStructureAdapter
getXMLTag in interface XMLStructuregetXMLTag in class XMLStructureAdapter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||