Package org.robwork.sdurw_geometry
Class IndexedFaceArrayPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.IndexedFaceArrayPtr
-
public class IndexedFaceArrayPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description IndexedFaceArrayPtr()Default constructor yielding a NULL-pointer.IndexedFaceArrayPtr(long cPtr, boolean cMemoryOwn)IndexedFaceArrayPtr(IndexedFaceArray 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 IndexedFaceArray__ref__()Dereferencing operator.IndexedFaceArrayCPtrcptr()voiddelete()IndexedFaceArrayderef()The pointer stored in the object.booleanequals(IndexedFaceArray p)pair_d_dextremums(Vector3D dir)Get the minimum and maximum values of the shell in a certain direction.static longgetCPtr(IndexedFaceArrayPtr obj)IndexedFaceArraygetDeref()Member access operator.FaceCPtrgetFace(long idx)Get a surface patch.voidgetFace(long idx, GenericFace face)Get a surface patch.longgetGlobalIndex(long idx)Get the original face index.IndexedFaceArray.IndexedFacegetIndexedFace(long idx)Get the indexed face.voidgetIndexedFace(long idx, IndexedFaceArray.IndexedFace dst)Get the indexed face.IndexedFaceArraygetSubRange(long first, long last)Take out a subrange of faces.TriMeshPtrgetTriMesh()TriMeshPtrgetTriMesh(boolean forceCopy)GeometryData.GeometryTypegetType()booleanisConvex()booleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipOBBobb()Create Oriented Bounding Box (OBB) as a bounding volume for the shell.longsize()voidsortAxis(int axis, Transform3D t3d)Sort the faces according to their extent in the direction along axis.java.lang.StringtoString(GeometryData.GeometryType type)format GeometryType to string
-
-
-
Constructor Detail
-
IndexedFaceArrayPtr
public IndexedFaceArrayPtr(long cPtr, boolean cMemoryOwn)
-
IndexedFaceArrayPtr
public IndexedFaceArrayPtr()
Default constructor yielding a NULL-pointer.
-
IndexedFaceArrayPtr
public IndexedFaceArrayPtr(IndexedFaceArray ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(IndexedFaceArrayPtr obj)
-
delete
public void delete()
-
deref
public IndexedFaceArray deref()
The pointer stored in the object.
-
__ref__
public IndexedFaceArray __ref__()
Dereferencing operator.
-
getDeref
public IndexedFaceArray getDeref()
Member access operator.
-
equals
public boolean equals(IndexedFaceArray 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 IndexedFaceArrayCPtr cptr()
-
getType
public GeometryData.GeometryType getType()
-
isConvex
public boolean isConvex()
-
size
public long size()
-
getIndexedFace
public IndexedFaceArray.IndexedFace getIndexedFace(long idx)
Get the indexed face.- Parameters:
idx- [in] index of indexed face.- Returns:
- the indexed face.
-
getIndexedFace
public void getIndexedFace(long idx, IndexedFaceArray.IndexedFace dst)Get the indexed face.- Parameters:
idx- [in] index of indexed face.dst- [out] existing object to copy data into.
-
sortAxis
public void sortAxis(int axis, Transform3D t3d)Sort the faces according to their extent in the direction along axis.- Parameters:
axis- [in] axis to sort.t3d- [in] transform giving the position and axis directions.
-
getSubRange
public IndexedFaceArray getSubRange(long first, long last)
Take out a subrange of faces.- Parameters:
first- [in] first index.last- [in] last index.- Returns:
- a new indexed face array.
-
getGlobalIndex
public long getGlobalIndex(long idx)
Get the original face index.- Parameters:
idx- [in] the indexed face index.- Returns:
- the original index.
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
-
getTriMesh
public TriMeshPtr getTriMesh()
-
getFace
public FaceCPtr getFace(long idx)
Get a surface patch.- Parameters:
idx- [in] index of patch.- Returns:
- a copy of the surface patch.
-
getFace
public void getFace(long idx, GenericFace face)Get a surface patch.- Parameters:
idx- [in] index of patch.face- [out] existing face to copy data into.
-
extremums
public pair_d_d extremums(Vector3D dir)
Get the minimum and maximum values of the shell in a certain direction.- Parameters:
dir- [in] the direction to find extremums for.- Returns:
- the minimum and maximum as a pair of values.
-
obb
public OBB obb()
Create Oriented Bounding Box (OBB) as a bounding volume for the shell.- Returns:
- the OBB.
-
toString
public java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type-
-
-