|
||||||||||
| 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.EndEffector
public class EndEffector
Contains the end effector and end effector path (rotation and/or translation) of an IK motion The path can be a function of time t (0 < t < 1) and several other variables.
| Field Summary | |
|---|---|
private boolean |
local
|
private org.nfunk.jep.Node |
nodeSwivel
|
private org.nfunk.jep.Node[] |
nodeTrans
|
private org.lsmp.djep.xjep.XJep |
parser
|
private String |
swivelFormula
|
private String |
target
|
private String[] |
transFormula
|
| Fields inherited from class hmi.xml.XMLStructureAdapter |
|---|
ATTRIBUTE_TOKEN_DELIMITERS, COMMA_SEPARATOR, DECODEDARRAYSIZE, DEFAULT_RECOVER_MODE, NEWLINE, SYSTEMNEWLINE, TAB, TAB_STRING |
| Constructor Summary | |
|---|---|
EndEffector(org.lsmp.djep.xjep.XJep p)
Constructor, no target set |
|
EndEffector(org.lsmp.djep.xjep.XJep parser,
String target)
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. |
EndEffector |
deepCopy()
|
double |
evaluateSingleIndex(int target)
Evaluates for a single index |
double |
evaluateSwivel()
Evaluates the swivel angle for time 0 |
void |
evaluateTrans(float[] dst)
Evaluates the translation position for the current parameter settings and time |
void |
evaluateTrans(float[] dst,
double t)
Evaluates the translation position for the current parameter settings at time t, 0<=t<=1 |
Vector |
findParameters(Vector v)
returns list with all parameters used in all formulas |
String |
getSwivel()
Get the swivel formula |
String |
getTarget()
Get the target |
String |
getTranslationFormula(int i)
Get the translation formula |
String |
getXMLTag()
returns the XML tag that is used to encode this type of XMLStructure. |
boolean |
isLocal()
Checks if local coordinates are used for this endeffector |
void |
mirror()
Mirrors the movement trajectory on the XY plane, switches left/right targets |
void |
set(EndEffector eff)
Copy the values of eff into this endeffector, links the target joint. |
void |
setLocal(boolean local)
Set if local coordinates should be used |
void |
setSwivel(String s)
Set the swivel formula |
void |
setTranslation(int i,
String translation)
Set the translation path |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private org.nfunk.jep.Node[] nodeTrans
private org.nfunk.jep.Node nodeSwivel
private String[] transFormula
private String swivelFormula
private String target
private boolean local
private org.lsmp.djep.xjep.XJep parser
| Constructor Detail |
|---|
public EndEffector(org.lsmp.djep.xjep.XJep p)
p - parsers
public EndEffector(org.lsmp.djep.xjep.XJep parser,
String target)
parser - parsertarget - endeffector target name| Method Detail |
|---|
public void mirror()
public void set(EndEffector eff)
eff - endeffector to copypublic String getTarget()
public String getTranslationFormula(int i)
i - index (0=x, 1=y, 2=z)
public void setTranslation(int i,
String translation)
i - the translation axis (0=x,1=y,2=z)translation - the translation path a formula of 0public String getSwivel()
public void setSwivel(String s)
s - the swivel formula
org.nfunk.jep.ParseExceptionpublic double evaluateSwivel()
public void evaluateTrans(float[] dst,
double t)
public void evaluateTrans(float[] dst)
public double evaluateSingleIndex(int target)
target - x=0,y=1,z=2public boolean isLocal()
public void setLocal(boolean local)
local - new local valuepublic EndEffector deepCopy()
public Vector findParameters(Vector v)
public boolean decodeAttribute(String attrName,
String attrValue)
decodeAttribute in class XMLStructureAdapter
public boolean decodeAttribute(String attrName,
String attrValue,
XMLTokenizer tokenizer)
decodeAttribute in class XMLStructureAdapter
public void decodeContent(XMLTokenizer tokenizer)
throws IOException
decodeContent in class XMLStructureAdapterIOException
public StringBuilder appendContent(StringBuilder buf,
XMLFormatting fmt)
appendContent in class XMLStructureAdapterpublic StringBuilder appendAttributeString(StringBuilder buf)
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 | |||||||||