Class CrabLeg
java.lang.Object
com.marginallyclever.ro3.node.nodes.crab.CrabLeg
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubledoubledoublefinal javax.vecmath.Point3dfinal javax.vecmath.Point3dfinal javax.vecmath.Point3dbooleandouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateStep(double timeUnit) Interpolate between pointOfContactLast to pointOfContactNext based on timeUnit.voidcheckLegTouchingGround(RayPickSystem rayPickSystem) is the leg touching the ground?doublegetPhase()javax.vecmath.Point3dvoidputFootDown(double dt) Move the foot towards the floor.voidsetAngles(double coxa, double femur, double tibia) voidsetPhase(CrabLegPhase phase) voidUpdate the visualization of the next and last contact points.
-
Field Details
-
coxa
-
femur
-
tibia
-
toe
-
targetPosition
-
nextPosition
-
lastPosition
-
startingCoxaAngle
public double startingCoxaAngle -
angleCoxa
public double angleCoxa -
angleFemur
public double angleFemur -
angleTibia
public double angleTibia -
contactPointIdeal
public final javax.vecmath.Point3d contactPointIdeal -
contactPointLast
public final javax.vecmath.Point3d contactPointLast -
contactPointNext
public final javax.vecmath.Point3d contactPointNext -
isTouchingGround
public boolean isTouchingGround
-
-
Constructor Details
-
CrabLeg
-
-
Method Details
-
setAngles
public void setAngles(double coxa, double femur, double tibia) -
updateVisualizations
public void updateVisualizations()Update the visualization of the next and last contact points. -
animateStep
public void animateStep(double timeUnit) Interpolate between pointOfContactLast to pointOfContactNext based on timeUnit. Interpolate the z up and down in an abs(sine) wave.- Parameters:
timeUnit- 0 to 1
-
putFootDown
public void putFootDown(double dt) Move the foot towards the floor.- Parameters:
dt- time delta
-
getToePosition
public javax.vecmath.Point3d getToePosition() -
setPhase
-
getPhase
-
checkLegTouchingGround
is the leg touching the ground?- Parameters:
rayPickSystem- the ray pick system to use for ground detection
-
getAnimationTime
public double getAnimationTime()
-