public void setRootOrientation(Quat4d rootOrientation) { this.desiredRootOrientation.set(rootOrientation); }
public void getRotation(Quat4f rotationToPack) { rotationToPack.set(jointRotation); }
public void setRootOrientation(Quat4d rootOrientation) { this.rootOrientation.set(rootOrientation); }
public VMDMotion set(VMDMotion m) { boneIndex = m.boneIndex; frameNo = m.frameNo; location.set(m.location); rotation.set(m.rotation); System.arraycopy(m.interpolation, 0, interpolation, 0, 64); vmdFile = m.vmdFile; return m; }
public static void convertMatrixToQuaternion(Matrix3d rotationMatrix, Quat4f quaternionToPack) { Quat4d result = quaternionForMatrixToQuaternionFloatConvertor.get(); convertMatrixToQuaternion(rotationMatrix, result); quaternionToPack.set(result); }
@Override public void set(KinematicsToolboxOutputStatus other) { if (desiredJointAngles == null) { desiredJointAngles = new float[other.desiredJointAngles.length]; jointNameHash = other.jointNameHash; } else { if (other.desiredJointAngles.length != desiredJointAngles.length) throw new RuntimeException("Array size does not match"); if (jointNameHash != other.jointNameHash) throw new RuntimeException("Joint name hashes are different."); } for (int i = 0; i < desiredJointAngles.length; i++) desiredJointAngles[i] = other.desiredJointAngles[i]; desiredRootTranslation.set(other.desiredRootTranslation); desiredRootOrientation.set(other.desiredRootOrientation); uniqueId = other.uniqueId; destination = other.destination; solutionQuality = other.solutionQuality; }
public void set(Vector3f linearAcceleration, Quat4f orientation, Vector3f angularVelocity, double time) { this.linearAcceleration.set(linearAcceleration); this.orientation.set(orientation); this.angularVelocity.set(angularVelocity); this.time = time; }
public void getRotation(Quat4f rotationToPack) { RotationTools.convertQuaternionToYawPitchRoll(this.jointRotation, yawPitchRoll); RotationTools.convertYawPitchRollToQuaternion(0.0, yawPitchRoll[1], 0.0, this.jointRotation); rotationToPack.set(jointRotation); }
@Override public @Nonnull Pair<? extends IBakedModel, Matrix4f> handlePerspective(@Nonnull ItemCameraTransforms.TransformType cameraTransformType) { Pair<? extends IBakedModel, Matrix4f> perspective = parent.handlePerspective(cameraTransformType); double r = (EnderIO.proxy.getTickCount() % 360) + Minecraft.getMinecraft().getRenderPartialTicks(); TRSRTransformation transformOrig = new TRSRTransformation(perspective.getRight()); Quat4f leftRot = transformOrig.getLeftRot(); Quat4f yRotation = new Quat4f(); yRotation.set(new AxisAngle4d(0, 1, 0, Math.toRadians(r * speed))); leftRot.mul(yRotation); TRSRTransformation transformNew = new TRSRTransformation(transformOrig.getTranslation(), leftRot, transformOrig.getScale(), transformOrig.getRightRot()); return Pair.of(perspective.getLeft(), transformNew.getMatrix()); }
private static Multimap<Orientation, XYZRotation> calculateXyzRotations(Map<Matrix3f, Orientation> fromMatrix) { final Multimap<Orientation, XYZRotation> toXYZRotation = HashMultimap.create(); for (Rotation x : Rotation.values()) for (Rotation y : Rotation.values()) for (Rotation z : Rotation.values()) { final XYZRotation rotation = new XYZRotation(x, y, z); Quat4f q = new Quat4f(0, 0, 0, 1); Quat4f tmp = new Quat4f(); tmp.set(new AxisAngle4f(0, 0, 1, z.angle)); q.mul(tmp); tmp.set(new AxisAngle4f(0, 1, 0, y.angle)); q.mul(tmp); tmp.set(new AxisAngle4f(1, 0, 0, x.angle)); q.mul(tmp); Matrix3f m = new Matrix3f(); m.set(q); roundMatrixElements(m); final Orientation orientation = fromMatrix.get(m); Preconditions.checkNotNull(orientation, rotation); toXYZRotation.put(orientation, rotation); } return toXYZRotation; }
tmpq1.set(m1.getRotation()); tmpp1.set(m1.getLocation()); continue; tmpq1.set(m1.getRotation()); tmpp1.set(m1.getLocation()); } else { tmpq5.normalizeLocal(); tmpq4.slerp(tmpq5, fr); tmpq1.set(tmpq4.getX(), tmpq4.getY(), tmpq4.getZ(), tmpq4.getW()); tmpp1.x = m1.getLocation().x + (m2.getLocation().x - m1.getLocation().x) * fx; tmpp1.y = m1.getLocation().y + (m2.getLocation().y - m1.getLocation().y) * fy;