com.bulletphysics.demos.applet
Class Utils

java.lang.Object
  extended by com.bulletphysics.demos.applet.Utils

public class Utils
extends java.lang.Object


Method Summary
static void mulOrtho(javax.vecmath.Matrix4f mat, float left, float right, float bottom, float top, float near, float far)
           
static void mulPerspective(javax.vecmath.Matrix4f mat, float fovy, float aspect, float zNear, float zFar)
           
static void mulPickMatrix(javax.vecmath.Matrix4f mat, float x, float y, float deltaX, float deltaY, java.awt.Rectangle viewport)
           
static boolean project(float objx, float objy, float objz, javax.vecmath.Matrix4f modelMatrix, javax.vecmath.Matrix4f projMatrix, java.awt.Rectangle viewport, javax.vecmath.Tuple3f win_pos)
           
static void scale(javax.vecmath.Matrix4f mat, float x, float y, float z)
           
static void setFrustum(javax.vecmath.Matrix4f mat, float left, float right, float bottom, float top, float near, float far)
           
static void setLookAt(javax.vecmath.Matrix4f mat, float eyex, float eyey, float eyez, float centerx, float centery, float centerz, float upx, float upy, float upz)
           
static void setOrtho(javax.vecmath.Matrix4f mat, float left, float right, float bottom, float top, float near, float far)
           
static void setPerspective(javax.vecmath.Matrix4f mat, float fovy, float aspect, float zNear, float zFar)
           
static void translate(javax.vecmath.Matrix4f mat, float x, float y, float z)
           
static boolean unproject(float winx, float winy, float winz, javax.vecmath.Matrix4f modelMatrix, javax.vecmath.Matrix4f projMatrix, java.awt.Rectangle viewport, javax.vecmath.Tuple3f obj_pos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setFrustum

public static void setFrustum(javax.vecmath.Matrix4f mat,
                              float left,
                              float right,
                              float bottom,
                              float top,
                              float near,
                              float far)

setPerspective

public static void setPerspective(javax.vecmath.Matrix4f mat,
                                  float fovy,
                                  float aspect,
                                  float zNear,
                                  float zFar)

mulPerspective

public static void mulPerspective(javax.vecmath.Matrix4f mat,
                                  float fovy,
                                  float aspect,
                                  float zNear,
                                  float zFar)

setOrtho

public static void setOrtho(javax.vecmath.Matrix4f mat,
                            float left,
                            float right,
                            float bottom,
                            float top,
                            float near,
                            float far)

mulOrtho

public static void mulOrtho(javax.vecmath.Matrix4f mat,
                            float left,
                            float right,
                            float bottom,
                            float top,
                            float near,
                            float far)

translate

public static void translate(javax.vecmath.Matrix4f mat,
                             float x,
                             float y,
                             float z)

scale

public static void scale(javax.vecmath.Matrix4f mat,
                         float x,
                         float y,
                         float z)

setLookAt

public static void setLookAt(javax.vecmath.Matrix4f mat,
                             float eyex,
                             float eyey,
                             float eyez,
                             float centerx,
                             float centery,
                             float centerz,
                             float upx,
                             float upy,
                             float upz)

mulPickMatrix

public static void mulPickMatrix(javax.vecmath.Matrix4f mat,
                                 float x,
                                 float y,
                                 float deltaX,
                                 float deltaY,
                                 java.awt.Rectangle viewport)

project

public static boolean project(float objx,
                              float objy,
                              float objz,
                              javax.vecmath.Matrix4f modelMatrix,
                              javax.vecmath.Matrix4f projMatrix,
                              java.awt.Rectangle viewport,
                              javax.vecmath.Tuple3f win_pos)

unproject

public static boolean unproject(float winx,
                                float winy,
                                float winz,
                                javax.vecmath.Matrix4f modelMatrix,
                                javax.vecmath.Matrix4f projMatrix,
                                java.awt.Rectangle viewport,
                                javax.vecmath.Tuple3f obj_pos)