Class CrabLeg
java.lang.Object
com.marginallyclever.ro3.node.nodes.crab.CrabLeg
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
double
double
final javax.vecmath.Point3d
final javax.vecmath.Point3d
final javax.vecmath.Point3d
boolean
double
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
animateStep
(double timeUnit) Interpolate between pointOfContactLast to pointOfContactNext based on timeUnit.void
checkLegTouchingGround
(RayPickSystem rayPickSystem) is the leg touching the ground?double
getPhase()
javax.vecmath.Point3d
void
putFootDown
(double dt) Move the foot towards the floor.void
setAngles
(double coxa, double femur, double tibia) void
setPhase
(CrabLegPhase phase) void
Update 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()
-