Package org.robwork.sdurw_geometry
Class TriMeshSurfaceSamplerPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.TriMeshSurfaceSamplerPtr
-
public class TriMeshSurfaceSamplerPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description TriMeshSurfaceSamplerPtr()
Default constructor yielding a NULL-pointer.TriMeshSurfaceSamplerPtr(long cPtr, boolean cMemoryOwn)
TriMeshSurfaceSamplerPtr(TriMeshSurfaceSampler 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 TriMeshSurfaceSampler
__ref__()
Dereferencing operator.void
add(GeometryPtr geom)
add surface representing geometry to this samplervoid
add(TriMeshPtr mesh)
add surface mesh.TriMeshSurfaceSamplerCPtr
cptr()
void
delete()
TriMeshSurfaceSampler
deref()
The pointer stored in the object.boolean
equals(TriMeshSurfaceSampler p)
static long
getCPtr(TriMeshSurfaceSamplerPtr obj)
TriMeshSurfaceSampler
getDeref()
Member access operator.TriMeshPtr
getMesh()
return the mesh that is being sampledboolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipTransform3D
sample()
sample a pose on the surface of the object.Vector3D
samplePoint()
sample point on surface of object
Conditional comment:
End of conditional comment.void
setBoundsD(double minD, double maxD)
set the bounds to which the random position around the sampled surface
point will be generated.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.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.void
setZAxisDirection(Vector3D dir)
sets the direction that the z-axis must point into.void
setZAxisDirectionEnabled(boolean enabled)
enable z-axis direction filtering.
-
-
-
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
-
getCPtr
public static long getCPtr(TriMeshSurfaceSamplerPtr obj)
-
delete
public void delete()
-
deref
public TriMeshSurfaceSampler deref()
The pointer stored in the object.
-
__ref__
public TriMeshSurfaceSampler __ref__()
Dereferencing operator.
-
getDeref
public TriMeshSurfaceSampler getDeref()
Member access operator.
-
equals
public boolean equals(TriMeshSurfaceSampler 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
-
cptr
public TriMeshSurfaceSamplerCPtr cptr()
-
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 distancemaxD
- [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
-
-