Class TriMeshSurfaceSamplerPtr


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

      • TriMeshSurfaceSamplerPtr

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

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

        public TriMeshSurfaceSamplerPtr​(TriMeshSurfaceSampler ptr)
        Do not take ownership of ptr.

        ptr can be null.

        The constructor is implicit on purpose.
    • Method Detail

      • delete

        public void delete()
      • 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
      • add

        public void add​(GeometryPtr geom)
        add surface representing geometry to this sampler
        Parameters:
        geom - [in] geometry representing surface to be sampled
      • add

        public void add​(TriMeshPtr mesh)
        add surface mesh.
        Parameters:
        mesh - [in] mesh to add to sampler.
      • sample

        public Transform3D sample()
        sample a pose on the surface of the object.
        Returns:
        transform3d of the sampled pose
      • samplePoint

        public Vector3D samplePoint()
        sample point on surface of object
        Conditional comment:

        End of conditional comment.
      • setBoundsD

        public void setBoundsD​(double minD,
                               double maxD)
        set the bounds to which the random position around the sampled surface
        point will be generated. See setRandomPositionEnabled
        Parameters:
        minD - [in] minimum distance
        maxD - [in] maximum distance.
      • setRandomRotationEnabled

        public void setRandomRotationEnabled​(boolean enabled)
        enable the generation of a random rotation instead of a rotation with
        the z-axis pointing in the surface normal direction.
        Parameters:
        enabled - [in]
      • setRandomPositionEnabled

        public void setRandomPositionEnabled​(boolean enabled)
        enables generation of a random position within the sampled surface position.
        The local point will be generated within a min and max distance from the sampled
        surface point. See setBoundsD
        Parameters:
        enabled - [in] true to enable local random generation around sampled surface point.
        False otherwise.
      • setZAxisDirectionEnabled

        public void setZAxisDirectionEnabled​(boolean enabled)
        enable z-axis direction filtering. See setZAxisDirection for information
        on setting the direction.

        Parameters:
        enabled -
      • setZAxisDirection

        public void setZAxisDirection​(Vector3D dir)
        sets the direction that the z-axis must point into. this is equal
        to testing if the z-axis of the generated pose lies on the right side of
        the plane defined by the plane normal dir and (0,0,0).

        Setting this also sets setZAxisDirectionEnabled( true )

        Parameters:
        dir - [in]
      • getMesh

        public TriMeshPtr getMesh()
        return the mesh that is being sampled
        Returns:
        mesh