com.jme3.bullet
クラス BulletAppState

java.lang.Object
  上位を拡張 com.jme3.bullet.BulletAppState
すべての実装されたインタフェース:
AppState, PhysicsTickListener

public class BulletAppState
extends java.lang.Object
implements AppState, PhysicsTickListener

BulletAppState allows using bullet physics in an Application.


入れ子のクラスの概要
static class BulletAppState.ThreadingType
           
 
コンストラクタの概要
BulletAppState()
          Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application.
BulletAppState(PhysicsSpace.BroadphaseType broadphaseType)
          Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application.
BulletAppState(Vector3f worldMin, Vector3f worldMax)
          Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application.
BulletAppState(Vector3f worldMin, Vector3f worldMax, PhysicsSpace.BroadphaseType broadphaseType)
           
 
メソッドの概要
 void cleanup()
          Cleanup the game state.
 PhysicsSpace getPhysicsSpace()
           
 float getSpeed()
           
 BulletAppState.ThreadingType getThreadingType()
           
 void initialize(AppStateManager stateManager, Application app)
          Called to initialize the AppState.
 boolean isEnabled()
           
 boolean isInitialized()
           
 void physicsTick(PhysicsSpace space, float f)
          Called after the physics has been stepped, use to check for forces etc.
 void postRender()
          Called after all rendering commands are flushed.
 void prePhysicsTick(PhysicsSpace space, float f)
          Called before the physics is actually stepped, use to apply forces etc.
 void render(RenderManager rm)
          Render the state.
 void setBroadphaseType(PhysicsSpace.BroadphaseType broadphaseType)
          Use before attaching state
 void setEnabled(boolean enabled)
          Enable or disable the functionality of the AppState.
 void setSpeed(float speed)
           
 void setThreadingType(BulletAppState.ThreadingType threadingType)
          Use before attaching state
 void setWorldMax(Vector3f worldMax)
          Use before attaching state
 void setWorldMin(Vector3f worldMin)
          Use before attaching state
 void startPhysics()
          The physics system is started automatically on attaching, if you want to start it before for some reason, you can use this method.
 void stateAttached(AppStateManager stateManager)
          Called when the state was attached.
 void stateDetached(AppStateManager stateManager)
          Called when the state was detached.
 void update(float tpf)
          Called to update the state.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

BulletAppState

public BulletAppState()
Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application.


BulletAppState

public BulletAppState(PhysicsSpace.BroadphaseType broadphaseType)
Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application.

パラメータ:
broadphaseType - The type of broadphase collision detection, BroadphaseType.DVBT is the default

BulletAppState

public BulletAppState(Vector3f worldMin,
                      Vector3f worldMax)
Creates a new BulletAppState running a PhysicsSpace for physics simulation, use getStateManager().addState(bulletAppState) to enable physics for an Application. An AxisSweep broadphase is used.

パラメータ:
worldMin - The minimum world extent
worldMax - The maximum world extent

BulletAppState

public BulletAppState(Vector3f worldMin,
                      Vector3f worldMax,
                      PhysicsSpace.BroadphaseType broadphaseType)
メソッドの詳細

getPhysicsSpace

public PhysicsSpace getPhysicsSpace()

startPhysics

public void startPhysics()
The physics system is started automatically on attaching, if you want to start it before for some reason, you can use this method.


initialize

public void initialize(AppStateManager stateManager,
                       Application app)
インタフェース AppState の記述:
Called to initialize the AppState.

定義:
インタフェース AppState 内の initialize
パラメータ:
stateManager - The state manager

isInitialized

public boolean isInitialized()
定義:
インタフェース AppState 内の isInitialized
戻り値:
True if initialize() was called on the state, false otherwise.

setEnabled

public void setEnabled(boolean enabled)
インタフェース AppState の記述:
Enable or disable the functionality of the AppState. The effect of this call depends on implementation. An AppState starts as being enabled by default.

定義:
インタフェース AppState 内の setEnabled
パラメータ:
enabled - activate the AppState or not.

isEnabled

public boolean isEnabled()
定義:
インタフェース AppState 内の isEnabled
戻り値:
True if the AppState is enabled, false otherwise.
関連項目:
AppState.setEnabled(boolean)

stateAttached

public void stateAttached(AppStateManager stateManager)
インタフェース AppState の記述:
Called when the state was attached.

定義:
インタフェース AppState 内の stateAttached
パラメータ:
stateManager - State manager to which the state was attached to.

stateDetached

public void stateDetached(AppStateManager stateManager)
インタフェース AppState の記述:
Called when the state was detached.

定義:
インタフェース AppState 内の stateDetached
パラメータ:
stateManager - The state manager from which the state was detached from.

update

public void update(float tpf)
インタフェース AppState の記述:
Called to update the state.

定義:
インタフェース AppState 内の update
パラメータ:
tpf - Time per frame.

render

public void render(RenderManager rm)
インタフェース AppState の記述:
Render the state.

定義:
インタフェース AppState 内の render
パラメータ:
rm - RenderManager

postRender

public void postRender()
インタフェース AppState の記述:
Called after all rendering commands are flushed.

定義:
インタフェース AppState 内の postRender

cleanup

public void cleanup()
インタフェース AppState の記述:
Cleanup the game state.

定義:
インタフェース AppState 内の cleanup

getThreadingType

public BulletAppState.ThreadingType getThreadingType()
戻り値:
the threadingType

setThreadingType

public void setThreadingType(BulletAppState.ThreadingType threadingType)
Use before attaching state

パラメータ:
threadingType - the threadingType to set

setBroadphaseType

public void setBroadphaseType(PhysicsSpace.BroadphaseType broadphaseType)
Use before attaching state


setWorldMin

public void setWorldMin(Vector3f worldMin)
Use before attaching state


setWorldMax

public void setWorldMax(Vector3f worldMax)
Use before attaching state


getSpeed

public float getSpeed()

setSpeed

public void setSpeed(float speed)

prePhysicsTick

public void prePhysicsTick(PhysicsSpace space,
                           float f)
インタフェース PhysicsTickListener の記述:
Called before the physics is actually stepped, use to apply forces etc.

定義:
インタフェース PhysicsTickListener 内の prePhysicsTick

physicsTick

public void physicsTick(PhysicsSpace space,
                        float f)
インタフェース PhysicsTickListener の記述:
Called after the physics has been stepped, use to check for forces etc.

定義:
インタフェース PhysicsTickListener 内の physicsTick