|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.animationengine.mixed.Connector
public class Connector
Connection point for a @see{KinematicChain} to a @see{PhysicalSegment}
| Field Summary | |
|---|---|
private float[] |
aAcc
|
private float[] |
acc
|
private float[] |
aVel
|
private float[] |
bodyRotation
|
private float[] |
connectionPoint
|
private boolean |
isFirst
|
private float |
k
|
private org.slf4j.Logger |
logger
|
private static float |
MAX_REACTIVE_TORQUE
|
private float[] |
mTemp
|
private float[] |
prevAVel
|
private float[] |
prevVel
|
private float[] |
rTorque
|
private PhysicalSegment |
segment
|
private float[] |
tempPos
|
private float[] |
tempRot
|
private float[] |
tempS
|
private float[] |
vel
|
| Constructor Summary | |
|---|---|
Connector(PhysicalSegment seg,
float[] p,
float kmul)
Sets up the connector, assumes the segment is initialized and has a valid world position |
|
| Method Summary | |
|---|---|
void |
applyReactiveTorque(float[] q,
float[] f)
Applies a reactive torque of -k*f to the connectors body |
void |
getAvelocity(float[] aVelocity)
|
void |
getRelVelocity(float[] velocity)
|
void |
getSpatialVelocityAndAcceleration(float timeDiff,
float[] spatialV,
float[] spatialA)
Calculates the spatial velocity and acceleration of the connector from the velocity of the physical segment and the velocity at the previous call to this function Not thread safe, the caller of this function needs to guard for thread safety for the physical segment |
void |
getSpatialVelocityAndAcceleration(float timeDiff,
float[] spatialV,
float[] spatialA,
float[] spatialG)
Calculates the spatial velocity and acceleration of the connector from the velocity of the physical segment and the velocity at the previous call to this function Not thread safe, the caller of this function needs to guard for thread safety for the physical segment Depends on previous velocity values, call reset before using this function if drastic changes happened |
PhysicalSegment |
getStartSegment()
|
void |
getVelocity(float[] velocity)
|
void |
getWorldPosition(float[] dst)
Get the world position of the connection point Not thread safe, the caller of this function needs to guard for thread safety for the physical segment |
void |
getWorldTransform(float[] m)
Get the 4x4 world transform of the connection point Not thread safe, the caller of this function needs to guard for thread safety for the physical segment |
void |
reset()
Resets the state of the connector, newly calculated acceleration values will assume 0 velocity at the previous frame. |
void |
setFeedbackRatio(float kmul)
Sets the ratio of torques that is applied to the physical body |
void |
setVel(Connector c)
Sets the prevVel and prevAvel from connector c |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.slf4j.Logger logger
private PhysicalSegment segment
private float[] connectionPoint
private float[] vel
private float[] aVel
private float[] aAcc
private float[] acc
private float[] prevVel
private float[] prevAVel
private float[] rTorque
private float[] bodyRotation
private float[] tempS
private float[] tempRot
private float[] tempPos
private float[] mTemp
private boolean isFirst
private float k
private static final float MAX_REACTIVE_TORQUE
| Constructor Detail |
|---|
public Connector(PhysicalSegment seg,
float[] p,
float kmul)
seg - physical segmentp - the connection point, in world coordinateskmul - the reactive torque multiplier (typically 0 < kmul < 1), 0.6 works well| Method Detail |
|---|
public void setFeedbackRatio(float kmul)
kmul - the new feedback ratiopublic void reset()
public void setVel(Connector c)
c - public void getWorldTransform(float[] m)
m - output: the world position of the connection pointpublic void getWorldPosition(float[] dst)
dst - output: the world position of the connection pointpublic void getRelVelocity(float[] velocity)
public void getVelocity(float[] velocity)
public void getAvelocity(float[] aVelocity)
public void getSpatialVelocityAndAcceleration(float timeDiff,
float[] spatialV,
float[] spatialA,
float[] spatialG)
timeDiff - time since previous callspatialV - output: the current spatial velocityspatialA - output: the current spatial accelerationspatialG - spatial acceleration gravity in world coordinates
public void getSpatialVelocityAndAcceleration(float timeDiff,
float[] spatialV,
float[] spatialA)
timeDiff - time since previous callspatialV - output: the current spatial velocityspatialA - output: the current spatial acceleration
public void applyReactiveTorque(float[] q,
float[] f)
f - the reactive torquepublic PhysicalSegment getStartSegment()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||