Package org.lwjgl.util.glu
Class Util
java.lang.Object
org.lwjgl.util.glu.Util
Util.java
Created 7-jan-2004
- Author:
- Erik Duijs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static int
bytesPerPixel
(int format, int type) Method bytesPerPixel.protected static int
ceil
(int a, int b) Return ceiling of integer divisionprotected static int
compPerPix
(int format) Method compPerPix.protected static void
cross
(float[] v1, float[] v2, float[] result) Calculate cross-productprotected static int
glGetIntegerv
(int what) Convenience method for returning an int, rather than getting it out of a buffer yourself.protected static int
nearestPower
(int value) Method nearestPower.protected static float[]
normalize
(float[] v) Normalize vector
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
ceil
protected static int ceil(int a, int b) Return ceiling of integer division- Parameters:
a
-b
-- Returns:
- int
-
normalize
protected static float[] normalize(float[] v) Normalize vector- Parameters:
v
-- Returns:
- float[]
-
cross
protected static void cross(float[] v1, float[] v2, float[] result) Calculate cross-product- Parameters:
v1
-v2
-result
-
-
compPerPix
protected static int compPerPix(int format) Method compPerPix.- Parameters:
format
-- Returns:
- int
-
nearestPower
protected static int nearestPower(int value) Method nearestPower. Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well.- Parameters:
value
-- Returns:
- int
-
bytesPerPixel
protected static int bytesPerPixel(int format, int type) Method bytesPerPixel.- Parameters:
format
-type
-- Returns:
- int
-
glGetIntegerv
protected static int glGetIntegerv(int what) Convenience method for returning an int, rather than getting it out of a buffer yourself.- Parameters:
what
-- Returns:
- int
-