com.bulletphysics.demos.opengl
Class DemoApplication
java.lang.Object
com.bulletphysics.demos.opengl.DemoApplication
- Direct Known Subclasses:
- BasicDemo, BspDemo, ConcaveDemo, DynamicControlDemo, GenericJointDemo, VehicleDemo
public abstract class DemoApplication
- extends java.lang.Object
Method Summary |
abstract void |
clientMoveAndDisplay()
|
void |
clientResetScene()
|
void |
destroy()
|
void |
displayCallback()
|
void |
drawString(java.lang.CharSequence s,
int x,
int y,
javax.vecmath.Color3f color)
|
float |
getCameraDistance()
|
javax.vecmath.Vector3f |
getCameraPosition()
|
javax.vecmath.Vector3f |
getCameraTargetPosition()
|
int |
getDebugMode()
|
float |
getDeltaTimeMicroseconds()
|
DynamicsWorld |
getDynamicsWorld()
|
javax.vecmath.Vector3f |
getRayTo(int x,
int y)
|
abstract void |
initPhysics()
|
boolean |
isIdle()
|
void |
keyboardCallback(char key,
int x,
int y)
|
RigidBody |
localCreateRigidBody(float mass,
Transform startTransform,
CollisionShape shape)
|
void |
mouseFunc(int button,
int state,
int x,
int y)
|
void |
mouseMotionFunc(int x,
int y)
|
void |
moveAndDisplay()
|
void |
myinit()
|
void |
renderme()
|
void |
resetPerspectiveProjection()
|
void |
reshape(int w,
int h)
|
void |
setCameraDistance(float dist)
|
void |
setCameraForwardAxis(int axis)
|
void |
setCameraUp(javax.vecmath.Vector3f camUp)
|
void |
setDebugMode(int mode)
|
void |
setIdle(boolean idle)
|
void |
setOrthographicProjection()
|
void |
shootBox(javax.vecmath.Vector3f destination)
|
protected float |
showProfileInfo(float xOffset,
float yStart,
float yIncr)
|
void |
specialKeyboard(int key,
int x,
int y)
|
void |
specialKeyboardUp(int key,
int x,
int y)
|
void |
stepBack()
|
void |
stepFront()
|
void |
stepLeft()
|
void |
stepRight()
|
void |
toggleIdle()
|
void |
updateCamera()
|
void |
zoomIn()
|
void |
zoomOut()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numObjects
public static int numObjects
maxNumObjects
public static final int maxNumObjects
- See Also:
- Constant Field Values
startTransforms
public static Transform[] startTransforms
gShapePtr
public static CollisionShape[] gShapePtr
pickedBody
public static RigidBody pickedBody
gl
protected IGL gl
clock
protected Clock clock
dynamicsWorld
protected DynamicsWorld dynamicsWorld
pickConstraint
protected TypedConstraint pickConstraint
shootBoxShape
protected CollisionShape shootBoxShape
cameraDistance
protected float cameraDistance
debugMode
protected int debugMode
ele
protected float ele
azi
protected float azi
cameraPosition
protected final javax.vecmath.Vector3f cameraPosition
cameraTargetPosition
protected final javax.vecmath.Vector3f cameraTargetPosition
scaleBottom
protected float scaleBottom
scaleFactor
protected float scaleFactor
cameraUp
protected final javax.vecmath.Vector3f cameraUp
forwardAxis
protected int forwardAxis
glutScreenWidth
protected int glutScreenWidth
glutScreenHeight
protected int glutScreenHeight
ShootBoxInitialSpeed
protected float ShootBoxInitialSpeed
stepping
protected boolean stepping
singleStep
protected boolean singleStep
idle
protected boolean idle
lastKey
protected int lastKey
DemoApplication
public DemoApplication(IGL gl)
initPhysics
public abstract void initPhysics()
throws java.lang.Exception
- Throws:
java.lang.Exception
destroy
public void destroy()
myinit
public void myinit()
setCameraDistance
public void setCameraDistance(float dist)
getCameraDistance
public float getCameraDistance()
toggleIdle
public void toggleIdle()
updateCamera
public void updateCamera()
stepLeft
public void stepLeft()
stepRight
public void stepRight()
stepFront
public void stepFront()
stepBack
public void stepBack()
zoomIn
public void zoomIn()
zoomOut
public void zoomOut()
reshape
public void reshape(int w,
int h)
keyboardCallback
public void keyboardCallback(char key,
int x,
int y)
getDebugMode
public int getDebugMode()
setDebugMode
public void setDebugMode(int mode)
specialKeyboardUp
public void specialKeyboardUp(int key,
int x,
int y)
specialKeyboard
public void specialKeyboard(int key,
int x,
int y)
moveAndDisplay
public void moveAndDisplay()
displayCallback
public void displayCallback()
shootBox
public void shootBox(javax.vecmath.Vector3f destination)
getRayTo
public javax.vecmath.Vector3f getRayTo(int x,
int y)
mouseFunc
public void mouseFunc(int button,
int state,
int x,
int y)
mouseMotionFunc
public void mouseMotionFunc(int x,
int y)
localCreateRigidBody
public RigidBody localCreateRigidBody(float mass,
Transform startTransform,
CollisionShape shape)
setOrthographicProjection
public void setOrthographicProjection()
resetPerspectiveProjection
public void resetPerspectiveProjection()
showProfileInfo
protected float showProfileInfo(float xOffset,
float yStart,
float yIncr)
renderme
public void renderme()
clientResetScene
public void clientResetScene()
getDynamicsWorld
public DynamicsWorld getDynamicsWorld()
setCameraUp
public void setCameraUp(javax.vecmath.Vector3f camUp)
setCameraForwardAxis
public void setCameraForwardAxis(int axis)
getCameraPosition
public javax.vecmath.Vector3f getCameraPosition()
getCameraTargetPosition
public javax.vecmath.Vector3f getCameraTargetPosition()
getDeltaTimeMicroseconds
public float getDeltaTimeMicroseconds()
clientMoveAndDisplay
public abstract void clientMoveAndDisplay()
isIdle
public boolean isIdle()
setIdle
public void setIdle(boolean idle)
drawString
public void drawString(java.lang.CharSequence s,
int x,
int y,
javax.vecmath.Color3f color)