Class GenericFacePtr


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

      • GenericFacePtr

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

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

        public GenericFacePtr​(GenericFace 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 GenericFace deref()
        The pointer stored in the object.
      • __ref__

        public GenericFace __ref__()
        Dereferencing operator.
      • getDeref

        public GenericFace getDeref()
        Member access operator.
      • 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
      • surface

        public Surface surface()
      • curveCount

        public long curveCount()
      • getCurve

        public Curve getCurve​(long i)
      • transform

        public void transform​(Vector3D P)
        rw::math::Vector3D<double>&)
      • transform

        public void transform​(Transform3D T)
        rw::math::Transform3D<>&)
      • setSurface

        public void setSurface​(SurfaceCPtr surface)
        Set surface.
        Parameters:
        surface - [in] the surface.
      • setSurface

        public void setSurface​(Surface surface)
        Set surface.
        Parameters:
        surface - [in] the surface.
      • setCurve

        public void setCurve​(long vertex,
                             CurveCPtr curve)
        Set curve (a curve has direction)
        Parameters:
        vertex - [in] the start vertex.
        curve - [in] the curve.
      • setVertex

        public void setVertex​(long index,
                              Vector3D vertex)
        Set vertex.
        Parameters:
        index - [in] vertex index to set.
        vertex - [in] the vertex point.
      • getTriMesh

        public TriMeshPtr getTriMesh​(boolean forceCopy)
        Create a TriMesh representation of the face.

        This function relies on the resolution set with setMeshResolution.
        The resolution is passed on to Curve::discretizeAdaptive and
        Surface::setDiscretizationResolution.

        Parameters:
        forceCopy - [in] (not currently used in default implementation)
        Returns:
        a new TriMesh.
      • getTriMesh

        public TriMeshPtr getTriMesh()
        Create a TriMesh representation of the face.

        This function relies on the resolution set with setMeshResolution.
        The resolution is passed on to Curve::discretizeAdaptive and
        Surface::setDiscretizationResolution.


        Returns:
        a new TriMesh.
      • extremums

        public pair_d_d extremums​(Vector3D dir)
        Find the extent of the surface along a specific direction.
        Parameters:
        dir - [in] a normalized direction vector.
        Returns:
        the minimum and maximum values along the given direction.
      • obb

        public OBB obb()
        Create Oriented Bounding Box.

        The default implementation forms a TriMesh in order to estimate the directions for the
        OBB.

        Returns:
        an OBB around the Face.
      • setMeshResolution

        public void setMeshResolution​(double resolution)
        Set the resolution used for discretization in the getTriMesh and faceTriMesh
        functions.

        The meaning of this parameter depends on the type of surface.

        Parameters:
        resolution - [in] the resolution parameter.