Package org.robwork.sdurw_geometry
Class OBBFactoryCPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.OBBFactoryCPtr
-
public class OBBFactoryCPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description OBBFactoryCPtr()
Default constructor yielding a NULL-pointer.OBBFactoryCPtr(long cPtr, boolean cMemoryOwn)
OBBFactoryCPtr(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.void
delete()
OBBFactory
deref()
The pointer stored in the object.boolean
equals(OBBFactory p)
static long
getCPtr(OBBFactoryCPtr 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
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
-
OBBFactoryCPtr
public OBBFactoryCPtr(long cPtr, boolean cMemoryOwn)
-
OBBFactoryCPtr
public OBBFactoryCPtr()
Default constructor yielding a NULL-pointer.
-
OBBFactoryCPtr
public OBBFactoryCPtr(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(OBBFactoryCPtr 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
-
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
-
-