org.lwjgl.util.glu
Class Util

java.lang.Object
  extended by org.lwjgl.util.glu.Util
Direct Known Subclasses:
MipMap, Project, Registry

public class Util
extends java.lang.Object

Util.java

Created 7-jan-2004

Author:
Erik Duijs

Constructor Summary
Util()
           
 
Method Summary
protected static int bytesPerPixel(int format, int type)
          Method bytesPerPixel.
protected static int ceil(int a, int b)
          Return ceiling of integer division
protected static int compPerPix(int format)
          Method compPerPix.
protected static void cross(float[] v1, float[] v2, float[] result)
          Calculate cross-product
protected 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
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


Copyright © 2002-2009 lwjgl.org. All Rights Reserved.