public static final Point3D postureUpDirection(final TrackedPosture3DFloat posture, final boolean relative) { return relative ? postureUpDirection(posture) : UP; }
public static final Point3D postureFrontDirection(final TrackedPosture3DFloat posture, final boolean relative) { return postureFrontDirection(posture, postureUpDirection(posture, relative)); }
public static final Point3D postureRightDirection(final TrackedPosture3DFloat posture, final boolean relative) { return postureRightDirection(posture, postureUpDirection(posture, relative)); }
public static final double getHandHeightAngle(final TrackedPosture3DFloat posture, final boolean right, final boolean relative) { final JointPair armJoints = right ? new JointPair(Joints.ShoulderRight, Joints.HandRight) : new JointPair(Joints.ShoulderLeft, Joints.HandLeft); final Point3D direction = getDirection(posture, armJoints); final Point3D up = postureUpDirection(posture, relative); return up.angle(direction); }
public static final double getElbowHeightAngle(final TrackedPosture3DFloat posture, final boolean right, final boolean relative) { final JointPair armJoints = right ? new JointPair(Joints.ShoulderRight, Joints.ElbowRight) : new JointPair(Joints.ShoulderLeft, Joints.ElbowLeft); final Point3D direction = getDirection(posture, armJoints); final Point3D up = postureUpDirection(posture, relative); return up.angle(direction); }
public static final double getSignedHorizontalAngle(final TrackedPosture3DFloat posture, final boolean right, final boolean relative) { final Joints handJoint = right ? Joints.HandRight : Joints.HandLeft; final Point3D up = postureUpDirection(posture, relative); final Point3D front = postureFrontDirection(posture, up); final Point3D direction = projectOrthogonal(getDirection(posture, new JointPair(Joints.SpineMid, handJoint)), up); return getSignedAngle(front, direction, up); } }