Quaternionf quaternion = new Quaternionf(vecQuaternion.x, vecQuaternion.y, vecQuaternion.z, vecQuaternion.w); setOrientation(new Quat4f(quaternion.x, quaternion.y, quaternion.z, quaternion.w));
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(Vector3f vec) { Quaternionf orientation = new Quaternionf(vec.x, vec.y, vec.z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public static Quaternionf calculateQuaternion(float x, float y, float z) { Quaternionf orientation = new Quaternionf(x, y, z, 0); float temp = 1.0f - (orientation.x * orientation.x) - (orientation.y * orientation.y) - (orientation.z * orientation.z); if (temp < 0.0f) { orientation.w = 0.0f; } else { orientation.w = -(float) (Math.sqrt(temp)); } return orientation; } }
public GameItem() { selected = false; position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; }
public GameItem() { selected = false; position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; insideFrustum = true; disableFrustumCulling = false; }
/** * Starts a dragging gesture (mouse move with left button down) * @param x x coordinate (cursor location) * @param y y coordinate (cursor location) */ public void beginDrag(int x, int y) { dragging = true; // reset the current rotation currentRot = new Quaternionf(rotQuat); mapToSphere(x,y, this.startPoint); }
public GameItem() { position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; }
public GameItem() { position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; }
public GameItem() { selected = false; position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; insideFrustum = true; disableFrustumCulling = false; }
public GameItem() { selected = false; position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; insideFrustum = true; }
public GameItem() { position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; }
public GameItem() { selected = false; position = new Vector3f(0, 0, 0); scale = 1; rotation = new Quaternionf(); textPos = 0; insideFrustum = true; disableFrustumCulling = false; }
/** * Resets this arcball. */ public void reset() { rotMat.identity(); rotQuat = new Quaternionf(); currentRot = new Quaternionf(); startPoint = new Vector3f(); endPoint = new Vector3f(); dragging = false; setBounds(1.f,1.f); }