Package org.robwork.sdurw_geometry
Class OBBFactoryPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.OBBFactoryPtr
-
public class OBBFactoryPtr extends java.lang.ObjectPtr 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.OBBFactoryCPtrcptr()voiddelete()OBBFactoryderef()The pointer stored in the object.booleanequals(OBBFactory p)static longgetCPtr(OBBFactoryPtr obj)OBBFactorygetDeref()Member access operator.booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipOBBmakeBV(GeometryData geom)&)OBBmakeBV(Primitive geom)&)OBBmakeBV(Shell geom)&)OBBmakeBV(TriMesh geom)&)OBBmakeDITO(TriMesh mesh)OBBmakePCA(TriMesh mesh)computes covariance over vertices in mesh and calculates the
eigen vectors of the covariance and use this as axes in the bounding boxOBBmakePCAHull(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
-
-