Package org.robwork.sdurw_geometry
Class OBBFactoryPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.OBBFactoryPtr
-
public class OBBFactoryPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description OBBFactoryPtr()
Default constructor yielding a NULL-pointer.OBBFactoryPtr(long cPtr, boolean cMemoryOwn)
OBBFactoryPtr(OBBFactory 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 OBBFactory
__ref__()
Dereferencing operator.OBBFactoryCPtr
cptr()
void
delete()
OBBFactory
deref()
The pointer stored in the object.boolean
equals(OBBFactory p)
static long
getCPtr(OBBFactoryPtr obj)
OBBFactory
getDeref()
Member access operator.boolean
isNull()
checks if the pointer is nullboolean
isShared()
check if this Ptr has shared ownership or none
ownershipOBB
makeBV(GeometryData geom)
&)OBB
makeBV(Primitive geom)
&)OBB
makeBV(Shell geom)
&)OBB
makeBV(TriMesh geom)
&)OBB
makeDITO(TriMesh mesh)
OBB
makePCA(TriMesh mesh)
computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding boxOBB
makePCAHull(TriMesh mesh)
computes covariance over the vertices of the convex hull
of the mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box
-
-
-
Constructor Detail
-
OBBFactoryPtr
public OBBFactoryPtr(long cPtr, boolean cMemoryOwn)
-
OBBFactoryPtr
public OBBFactoryPtr()
Default constructor yielding a NULL-pointer.
-
OBBFactoryPtr
public OBBFactoryPtr(OBBFactory ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(OBBFactoryPtr obj)
-
delete
public void delete()
-
deref
public OBBFactory deref()
The pointer stored in the object.
-
__ref__
public OBBFactory __ref__()
Dereferencing operator.
-
getDeref
public OBBFactory getDeref()
Member access operator.
-
equals
public boolean equals(OBBFactory 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 OBBFactoryCPtr cptr()
-
makeBV
public OBB makeBV(GeometryData geom)
&)
-
makePCA
public OBB makePCA(TriMesh mesh)
computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box- Parameters:
mesh
- [in] the triangle mesh to create oriented bounding box for.- Returns:
- a tight fitting bounding box
-
makePCAHull
public OBB makePCAHull(TriMesh mesh)
computes covariance over the vertices of the convex hull
of the mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding box- Parameters:
mesh
- [in] the triangle mesh to create oriented bounding box for.- Returns:
- a tight fitting bounding box
-
-