/** Sets the rotation of this decal to the given angles on all axes. * @param yaw Angle in degrees to rotate around the Y axis * @param pitch Angle in degrees to rotate around the X axis * @param roll Angle in degrees to rotate around the Z axis */ public void setRotation (float yaw, float pitch, float roll) { rotation.setEulerAngles(yaw, pitch, roll); updated = false; }
/** Sets the rotation of this decal to the given angles on all axes. * @param yaw Angle in degrees to rotate around the Y axis * @param pitch Angle in degrees to rotate around the X axis * @param roll Angle in degrees to rotate around the Z axis */ public void setRotation (float yaw, float pitch, float roll) { rotation.setEulerAngles(yaw, pitch, roll); updated = false; }
/** Sets this matrix to a rotation matrix from the given euler angles. * @param yaw the yaw in degrees * @param pitch the pitch in degrees * @param roll the roll in degrees * @return This matrix */ public Matrix4 setFromEulerAngles (float yaw, float pitch, float roll) { quat.setEulerAngles(yaw, pitch, roll); return set(quat); }
/** Sets this matrix to a rotation matrix from the given euler angles. * @param yaw the yaw in degrees * @param pitch the pitch in degrees * @param roll the roll in degrees * @return This matrix */ public Matrix4 setFromEulerAngles (float yaw, float pitch, float roll) { quat.setEulerAngles(yaw, pitch, roll); return set(quat); }
@Override public void render (final Array<ModelInstance> instances) { tmpUp.set(cam.up); tmpDirection.set(cam.direction); Input input = Gdx.input; tmpRotation.setEulerAngles(-input.getAzimuth(), -input.getPitch(), -input.getRoll()); cam.position.set(5, 10, 5); cam.direction.set(0, -1, 0); cam.up.set(0, 0, -1); cam.rotate(tmpRotation); cam.update(); super.render(instances); }
/** Sets the rotation of this decal to the given angles on all axes. * @param yaw Angle in degrees to rotate around the Y axis * @param pitch Angle in degrees to rotate around the X axis * @param roll Angle in degrees to rotate around the Z axis */ public void setRotation (float yaw, float pitch, float roll) { rotation.setEulerAngles(yaw, pitch, roll); updated = false; }
/** Sets this matrix to a rotation matrix from the given euler angles. * @param yaw the yaw in degrees * @param pitch the pitch in degrees * @param roll the roll in degrees * @return This matrix */ public Matrix4 setFromEulerAngles (float yaw, float pitch, float roll) { quat.setEulerAngles(yaw, pitch, roll); return set(quat); }
/** Sets this matrix to a rotation matrix from the given euler angles. * @param yaw the yaw in degrees * @param pitch the pitch in degrees * @param roll the roll in degrees * @return This matrix */ public Matrix4 setFromEulerAngles (float yaw, float pitch, float roll) { quat.setEulerAngles(yaw, pitch, roll); return set(quat); }
transform.q.setEulerAngles(joint.yRotation, joint.xRotation, joint.zRotation);
public void processDragRotation(Vector2 cursorDelta) { tmp1.set(camera.targetDirection).crs(camera.targetUp).nor(); deltaRotation.setEulerAngles(cursorDelta.x, cursorDelta.y * tmp1.x, cursorDelta.y * tmp1.z); camera.rotateAround(worldGroundTarget, deltaRotation); }
switch (state) { case TRANSFORM_X: tempQuat.setEulerAngles(0, -rot, 0); projectContext.currScene.currentSelection.rotate(tempQuat); modified = true; break; case TRANSFORM_Y: tempQuat.setEulerAngles(-rot, 0, 0); projectContext.currScene.currentSelection.rotate(tempQuat); modified = true; break; case TRANSFORM_Z: tempQuat.setEulerAngles(0, 0, -rot); projectContext.currScene.currentSelection.rotate(tempQuat); modified = true;
@Override public void applyTransform() { getRotation().setEulerAngles(getRotationEuler().y, getRotationEuler().x, getRotationEuler().z); modelInstance.transform.set(getPosition(), getRotation(), getScale()); }
@Override public void applyTransform() { getRotation().setEulerAngles(getRotationEuler().y, getRotationEuler().x, getRotationEuler().z); modelInstance.transform.set(getPosition(), getRotation(), getScale()); }