Class Contact2DCPtr


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

      • Contact2DCPtr

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

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

        public Contact2DCPtr​(Contact2D ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • deref

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

        public Contact2D __ref__()
        Dereferencing operator.
      • getDeref

        public Contact2D getDeref()
        Member access operator.
      • equals

        public boolean equals​(Contact2D 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
      • getP

        public Vector2D getP()
        Contact position
      • getN

        public Vector2D getN()
        Surface contact normal
      • getCurvature

        public double getCurvature()
        surface curvature
      • getAvgCurvature

        public double getAvgCurvature()
        double moving average of the curvature
      • getMu

        public double getMu()
        coulomb friction coefficient