Class ObjectCPtr


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

      • ObjectCPtr

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

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

        public ObjectCPtr​(Object ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(ObjectCPtr obj)
      • delete

        public void delete()
      • deref

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

        public Object __ref__()
        Dereferencing operator.
      • getDeref

        public Object getDeref()
        Member access operator.
      • equals

        public boolean equals​(Object 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
      • getGeometry

        public VectorGeometryPtr getGeometry()
        get default geometries
        Returns:
        geometry for collision detection
      • getGeometry

        public VectorGeometryPtr getGeometry​(State state)
        get geometry of this object
        Returns:
        geometry for collision detection.
      • getModels

        public Model3DPtrVector getModels()
        get the default models
        Returns:
        models for vizualization
      • getModels

        public Model3DPtrVector getModels​(State state)
        get visualization models of this object
        Returns:
        models for visualization
      • getMass

        public double getMass​(State state)
        get mass in Kg of this object
        Parameters:
        state - [in] the state in which the mass should be gotten from
        Returns:
        mass in kilo grams
      • getCOM

        public Vector3D getCOM​(State state)
        get center of mass of this object
        Parameters:
        state - [in] the state in which to get center of mass
        Returns:
      • getInertia

        public InertiaMatrixd getInertia​(State state)
        returns the inertia matrix of this body calculated around COM with the orientation
        of the base frame.