Class SurfaceCPtr


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

      Constructors 
      Constructor Description
      SurfaceCPtr()
      Default constructor yielding a NULL-pointer.
      SurfaceCPtr​(long cPtr, boolean cMemoryOwn)  
      SurfaceCPtr​(Surface ptr)
      Do not take ownership of ptr.

      ptr can be null.

      The constructor is implicit on purpose.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Surface __ref__()
      Dereferencing operator.
      SurfacePtr clone()
      Clone the surface.
      void delete()  
      Surface deref()
      The pointer stored in the object.
      boolean equals​(Surface p)  
      pair_d_d extremums​(Vector3D direction)
      Find the extent of the surface along a specific direction.

      If the surface has no lower bound, the value -%std::numeric_limits<double>::%max() can
      be returned to indicate that the surface has unbounded minimum value in the given
      direction.

      If the surface has no upper bound, the value %std::numeric_limits<double>::%max() can
      be returned to indicate that the surface has unbounded maximum value in the given
      direction.

      static long getCPtr​(SurfaceCPtr obj)  
      Surface getDeref()
      Member access operator.
      TriMeshPtr getTriMesh()
      Discretize the surface into a triangle mesh representation.

      If the border of a trimmed surface must fit with other surface triangulations,
      a discretized border must be given to this triangulation function.

      If the same border points are used for different surfaces for their common edges, the
      triangulations will fit together.


      TriMeshPtr getTriMesh​(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
      Discretize the surface into a triangle mesh representation.

      If the border of a trimmed surface must fit with other surface triangulations,
      a discretized border must be given to this triangulation function.

      If the same border points are used for different surfaces for their common edges, the
      triangulations will fit together.

      boolean isNull()
      checks if the pointer is null
      boolean isShared()
      check if this Ptr has shared ownership or none
      ownership
      SurfacePtr scale​(double factor)
      Get a scaled version of the surface.
      boolean SurfaceEqual​(Surface surface, double threshold)
      Check if this surface is identical to other surface .
      SurfacePtr transform​(Transform3D T)  
      SurfacePtr transform​(Vector3D P)
      Move the surface without rotation.

      If there is no rotation, this function is better to use than #transform(const
      rw::math::Transform3D<>&) const for some surfaces.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SurfaceCPtr

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

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

        public SurfaceCPtr​(Surface ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • getCPtr

        public static long getCPtr​(SurfaceCPtr obj)
      • delete

        public void delete()
      • deref

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

        public Surface __ref__()
        Dereferencing operator.
      • getDeref

        public Surface getDeref()
        Member access operator.
      • equals

        public boolean equals​(Surface 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
      • transform

        public SurfacePtr transform​(Vector3D P)
        Move the surface without rotation.

        If there is no rotation, this function is better to use than #transform(const
        rw::math::Transform3D<>&) const for some surfaces. This is because certain properties can
        be preserved.

        Parameters:
        P - [in] the translation vector to the new surface.
        Returns:
        pointer to a new surface.
      • scale

        public SurfacePtr scale​(double factor)
        Get a scaled version of the surface.
        Parameters:
        factor - [in] the factor to scale with.
        Returns:
        a new scaled surface.
      • clone

        public SurfacePtr clone()
        Clone the surface.
        Returns:
        pointer to copy of surface.
      • extremums

        public pair_d_d extremums​(Vector3D direction)
        Find the extent of the surface along a specific direction.

        If the surface has no lower bound, the value -%std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded minimum value in the given
        direction.

        If the surface has no upper bound, the value %std::numeric_limits<double>::%max() can
        be returned to indicate that the surface has unbounded maximum value in the given
        direction.

        Parameters:
        direction - [in] a normalized direction vector.
        Returns:
        the minimum and maximum values along the given direction.
        Note: This function does not take trimming conditions into account.
        For trimmed surfaces, create a Face with the boundary curves and use Face::extremums.
      • getTriMesh

        public TriMeshPtr getTriMesh​(SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_double_t_t border)
        Discretize the surface into a triangle mesh representation.

        If the border of a trimmed surface must fit with other surface triangulations,
        a discretized border must be given to this triangulation function.

        If the same border points are used for different surfaces for their common edges, the
        triangulations will fit together.

        Parameters:
        border - [in] (optional) an ordered list of points on the surface, that forms the
        border of the patch to triangulate.
        Returns:
        a new TriMesh.
      • getTriMesh

        public TriMeshPtr getTriMesh()
        Discretize the surface into a triangle mesh representation.

        If the border of a trimmed surface must fit with other surface triangulations,
        a discretized border must be given to this triangulation function.

        If the same border points are used for different surfaces for their common edges, the
        triangulations will fit together.


        Returns:
        a new TriMesh.
      • SurfaceEqual

        public boolean SurfaceEqual​(Surface surface,
                                    double threshold)
        Check if this surface is identical to other surface .
        Parameters:
        surface - [in] other surface to compare to.
        threshold - [in] threshold for when surfaces can be considered
        identical.
        Returns:
        true if identical, false otherwise.