Class Simulator

  • Direct Known Subclasses:
    DynamicSimulator

    public class Simulator
    extends java.lang.Object

    interface of a general simulator
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Simulator.UpdateInfo
      step info is used when updating controllers, devices and bodies.
    • Constructor Summary

      Constructors 
      Constructor Description
      Simulator​(long cPtr, boolean cMemoryOwn)  
    • Constructor Detail

      • Simulator

        public Simulator​(long cPtr,
                         boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(Simulator obj)
      • delete

        public void delete()
      • step

        public void step​(double dt)
        take a step forward in time with timestep dt.
        Parameters:
        dt - [in] the time step
      • reset

        public void reset​(State state)
        reset velocity and acceleration of all bodies to 0. And sets the position of all
        bodies to that described in state
      • init

        public void init​(State state)
        initialize simulator with state variables
      • getTime

        public double getTime()
        gets the the current simulated time
      • getState

        public State getState()
        get current state of simulator
        Returns:
        current state of simulator
      • setEnabled

        public void setEnabled​(FramePtr frame,
                               boolean enabled)
        Enables or disables simulation of a frame
        Conditional comment:
        Parameters:
        frame - [in]
        enabled - [in]
        End of conditional comment.
      • getPropertyMap

        public PropertyMap getPropertyMap()
        get propertymap of this simulator
      • getSensor

        public SensorPtr getSensor​(java.lang.String name)
        get sensor with specific name
      • getController

        public ControllerPtr getController​(java.lang.String name)
        get controller with specific name