Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.exit4.lavaball; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import javax.microedition.khronos.opengles.GL10; public class Quarternion { public float w,x,y,z; public Quarternion () { w = 1; x = 0; y = 0; z = 0; } // Note angle is in radians public Quarternion(float angle, float[] axis) { set(angle,axis); } // Note that angle is in radians public void set (float angle, float[] axis) { w = (float) Math.cos(angle/2); float temp = (float) Math.sin(angle/2); x = axis[0] * temp; y = axis[1] * temp; z = axis[2] * temp; } public float magnitude() { float mag = (float) Math.sqrt(w*w + x*x + y*y + z*z); return mag; } public void normalize() { float mag = magnitude(); w = w/mag; x = x/mag; y = y/mag; z = z/mag; } // multiplication is in the order other*this with result stored in // this. public void multiply(Quarternion other) { float tw,tx,ty,tz; tw = other.w*w - other.x*x - other.y*y - other.z*z; tx = other.w*x + other.x*w + other.y*z - other.z*y; ty = other.w*y - other.x*z + other.y*w + other.z*x; tz = other.w*z + other.x*y - other.y*x + other.z*w; w = tw; x = tx; y = ty; z = tz; } float[] M = null; public void fill_matrix() { if (M == null) M = new float[16]; // Column one M[0] = 1 - 2*y*y - 2*z*z; M[1] = 2*x*y + 2*w*z; M[2] = 2*x*z - 2*w*y; M[3] = 0.0f; // Column two M[4] = 2*x*y - 2*w*z; M[5] = 1 - 2*x*x - 2*z*z; M[6] = 2*y*z + 2*w*x; M[7] = 0.0f; // Column three M[8] = 2*x*z + 2*w*y; M[9] = 2*y*z - 2*w*x; M[10] = 1 - 2*x*x - 2*y*y; M[11] = 0; // Column four M[12] = 0; M[13] = 0; M[14] = 0; M[15] = 1; } public void glRotate(GL10 gl) { fill_matrix(); FloatBuffer buf = makeFloatBuffer(M); gl.glMultMatrixf(buf); } protected static FloatBuffer makeFloatBuffer(float[] arr) { ByteBuffer bb = ByteBuffer.allocateDirect(arr.length*4); bb.order(ByteOrder.nativeOrder()); FloatBuffer fb = bb.asFloatBuffer(); fb.put(arr); fb.position(0); return fb; } }