|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.javagl.simplerenderer.RenderingUtils
public class RenderingUtils
Utility methods for rendering
| Method Summary | |
|---|---|
static java.nio.ByteBuffer |
createByteBuffer(int size)
Create a direct byte buffer with the given size |
static java.nio.ByteBuffer |
createDirectBuffer(byte[] a)
Create a direct byte buffer which has the contents of the given array. |
static java.nio.FloatBuffer |
createDirectBuffer(float[] a)
Create a direct float buffer which has the contents of the given array. |
static java.nio.IntBuffer |
createDirectBuffer(int[] a)
Create a direct int buffer which has the contents of the given array. |
static java.nio.FloatBuffer |
createFloatBuffer(int size)
Create a direct float buffer with the given size |
static java.nio.IntBuffer |
createIntBuffer(int size)
Create a direct int buffer with the given size |
static float[] |
identity()
Creates an identity matrix |
static float[] |
multiply(float[] m0,
float[] m1)
Multiplies the given matrices and returns the result |
static float[] |
perspective(float fovy,
float aspect,
float zNear,
float zFar)
Helper method that creates a perspective matrix |
static float[] |
rotationX(float angleDeg)
Creates a matrix describing a rotation around the x-axis |
static float[] |
rotationY(float angleDeg)
Creates a matrix describing a rotation around the y-axis |
static float[] |
translation(float x,
float y,
float z)
Creates a translation matrix |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.nio.ByteBuffer createByteBuffer(int size)
size - The size of the buffer
public static java.nio.FloatBuffer createFloatBuffer(int size)
size - The size of the buffer
public static java.nio.IntBuffer createIntBuffer(int size)
size - The size of the buffer
public static java.nio.ByteBuffer createDirectBuffer(byte[] a)
a - The array
public static java.nio.IntBuffer createDirectBuffer(int[] a)
a - The array
public static java.nio.FloatBuffer createDirectBuffer(float[] a)
a - The array
public static float[] perspective(float fovy,
float aspect,
float zNear,
float zFar)
fovy - The fov in y-direction, in degreesaspect - The aspect ratiozNear - The near clipping planezFar - The far clipping plane
public static float[] identity()
public static float[] multiply(float[] m0,
float[] m1)
m0 - The first matrixm1 - The second matrix
public static float[] translation(float x,
float y,
float z)
x - The x translationy - The y translationz - The z translation
public static float[] rotationX(float angleDeg)
angleDeg - The rotation angle, in degrees
public static float[] rotationY(float angleDeg)
angleDeg - The rotation angle, in degrees
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||