Package org.lwjgl.util.glu
Class Util
- java.lang.Object
-
- org.lwjgl.util.glu.Util
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
Method Detail
-
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
-
-