aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-11-11 05:01:56 +0100
committerSven Gothel <[email protected]>2012-11-11 05:01:56 +0100
commit5fafc1ac360333645b807dcd8dff0c0a655ea439 (patch)
treec3c0af31dc6cc9a10e381151e5461bb2e033488a /src/jogl/classes/com/jogamp/opengl/util
parent0edb45f11cd034c4937e6941b7a3e5d9f7edbd2f (diff)
Reorganize math code into: com.jogamp.opengl.math and com.jogamp.opengl.math.geom packages
Note: WIP - We may relocate / reorg math package. Public relocations: com.jogamp.opengl.util -> com.jogamp.opengl.math - FixedPoint - FloatUtil com.jogamp.graph.math -> com.jogamp.opengl.math - Quaternion - VectorUtil com.jogamp.graph.geom -> com.jogamp.opengl.math.geom - AABBox VectorUtil: Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances to be used 'graph' agnostic and to document 2d/3d use-cases.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java61
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java2
2 files changed, 1 insertions, 62 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java b/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java
deleted file mode 100644
index 6412db5ef..000000000
--- a/src/jogl/classes/com/jogamp/opengl/util/FixedPoint.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * - Redistribution of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * - Redistribution in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * Neither the name of Sun Microsystems, Inc. or the names of
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * This software is provided "AS IS," without a warranty of any kind. ALL
- * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
- * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
- * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
- * MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
- * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
- * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR
- * ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
- * DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
- * DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
- * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
- * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- *
- */
-
-package com.jogamp.opengl.util;
-
-public class FixedPoint {
- public static final int toFixed(int value) {
- if (value < -32768) value = -32768;
- if (value > 32767) value = 32767;
- return value * 65536;
- }
-
- public static final int toFixed(float value) {
- if (value < -32768) value = -32768;
- if (value > 32767) value = 32767;
- return (int)(value * 65536.0f);
- }
-
- public static final float toFloat(int value) {
- return (float)value/65536.0f;
- }
-
- public static final int mult(int x1, int x2) {
- return (int) ( ((long)x1*(long)x2)/65536 );
- }
-
- public static final int div(int x1, int x2) {
- return (int) ( (((long)x1)<<16)/x2 );
- }
-}
-
diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
index 80df9cd94..34971a9af 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java
@@ -46,9 +46,9 @@ import javax.media.opengl.fixedfunc.GLMatrixFunc;
import jogamp.opengl.ProjectFloat;
-import com.jogamp.opengl.FloatUtil;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.os.Platform;
+import com.jogamp.opengl.math.FloatUtil;
/**
* PMVMatrix implements a subset of the fixed function pipeline