public void get(FloatingJoint joint) { rotationMatrix.set(rotation); joint.setRotation(rotationMatrix); joint.setPosition(translation); twist.getAngularPart(tempVector); joint.setAngularVelocityInBody(tempVector); twist.getLinearPart(tempVector); joint.setVelocity(tempVector); }
@Override public void update() { jointState.getRotation(rotationMatrix); jointState.getTranslation(tempVector); joint.setRotation(rotationMatrix); joint.setPosition(tempVector); jointState.getTwistAngularPart(tempVector); joint.setAngularVelocityInBody(tempVector); jointState.getTwistLinearPart(tempVector); joint.setVelocity(tempVector); } }
@Override public void update() { jointState.getRotation(rotationMatrix); jointState.getTranslation(tempVector); joint.setRotation(rotationMatrix); joint.setPosition(tempVector); jointState.getTwistAngularPart(tempVector); joint.setAngularVelocityInBody(tempVector); jointState.getTwistLinearPart(tempVector); joint.setVelocity(tempVector); } }
public void set(Vector3D accel, Vector3D angRate, Quaternion orientation) { temporaryMatrix.set(orientation); rotation.set(MicroStrainData.MICROSTRAIN_TO_ZUP_WORLD); rotation.multiply(temporaryMatrix); ms3DM.setRotation(rotation); yaw.set(rotation.getYaw()); pitch.set(rotation.getPitch()); roll.set(rotation.getRoll()); xdd.set(accel.getX() * MicroStrainData.MICROSTRAIN_GRAVITY); ydd.set(accel.getY() * MicroStrainData.MICROSTRAIN_GRAVITY); zdd.set(accel.getZ() * MicroStrainData.MICROSTRAIN_GRAVITY); wx.set(angRate.getX()); wy.set(angRate.getY()); wz.set(angRate.getZ()); }
rootJoint.setRotation(rotation); rootJoint.setVelocity(linearVelocityInWorld); rootJoint.setAngularVelocityInBody(angularVelocity);
Matrix3d rotationMatrix = new Matrix3d(); rotationMatrix.rotX(0.6); rootJoint.setRotation(rotationMatrix);