Class SimulatorPtr


  • public class SimulatorPtr
    extends java.lang.Object
    Ptr stores a pointer and optionally takes ownership of the value.
    • Constructor Detail

      • SimulatorPtr

        public SimulatorPtr​(long cPtr,
                            boolean cMemoryOwn)
      • SimulatorPtr

        public SimulatorPtr()
        Default constructor yielding a NULL-pointer.
      • SimulatorPtr

        public SimulatorPtr​(Simulator ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(SimulatorPtr obj)
      • delete

        public void delete()
      • deref

        public Simulator deref()
        The pointer stored in the object.
      • __ref__

        public Simulator __ref__()
        Dereferencing operator.
      • getDeref

        public Simulator getDeref()
        Member access operator.
      • equals

        public boolean equals​(Simulator p)
      • isShared

        public boolean isShared()
        check if this Ptr has shared ownership or none
        ownership
        Returns:
        true if Ptr has shared ownership, false if it has no ownership.
      • isNull

        public boolean isNull()
        checks if the pointer is null
        Returns:
        Returns true if the pointer is null
      • 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