Package physx.physics

Class PxSimulationEventCallback

java.lang.Object
physx.NativeObject
physx.physics.PxSimulationEventCallback
Direct Known Subclasses:
SimpleSimulationEventCallback

public class PxSimulationEventCallback extends NativeObject
An interface class that the user can implement in order to receive simulation events.

With the exception of onAdvance(), the events get sent during the call to either #PxScene::fetchResults() or #PxScene::flushSimulation() with sendPendingReports=true. onAdvance() gets called while the simulation is running (that is between PxScene::simulate() or PxScene::advance() and PxScene::fetchResults()).

Note: SDK state should not be modified from within the callbacks. In particular objects should not be created or destroyed. If state modification is needed then the changes should be stored to a buffer and performed after the simulation step.

Threading: With the exception of onAdvance(), it is not necessary to make these callbacks thread safe as they will only be called in the context of the user thread.

See Also:
  • Field Details

    • SIZEOF

      public static final int SIZEOF
    • ALIGNOF

      public static final int ALIGNOF
      See Also:
  • Constructor Details

    • PxSimulationEventCallback

      protected PxSimulationEventCallback()
    • PxSimulationEventCallback

      protected PxSimulationEventCallback(long address)
  • Method Details