Package org.robwork.sdurw_geometry
Class IndexedFaceArray
- java.lang.Object
-
- org.robwork.sdurw_geometry.GeometryData
-
- org.robwork.sdurw_geometry.Shell
-
- org.robwork.sdurw_geometry.IndexedFaceArray
-
public class IndexedFaceArray extends Shell
An indexed face array is a proxy to a Shell, that makes it possible to easily sort
faces and take subsets without modifying the underlying Shell.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndexedFaceArray.IndexedFace
Structure that holds information for each face.-
Nested classes/interfaces inherited from class org.robwork.sdurw_geometry.GeometryData
GeometryData.GeometryType
-
-
Constructor Summary
Constructors Constructor Description IndexedFaceArray(long cPtr, boolean cMemoryOwn)
IndexedFaceArray(ShellCPtr shell)
Construct new indexed face array.IndexedFaceArray(ShellCPtr shell, SWIGTYPE_p_std__vectorT_rw__geometry__IndexedFaceArray__IndexedFace_t faces, long first, long last)
Construct new indexed face array.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(IndexedFaceArray obj)
long
getGlobalIndex(long idx)
Get the original face index.IndexedFaceArray.IndexedFace
getIndexedFace(long idx)
Get the indexed face.void
getIndexedFace(long idx, IndexedFaceArray.IndexedFace dst)
Get the indexed face.IndexedFaceArray
getSubRange(long first, long last)
Take out a subrange of faces.GeometryData.GeometryType
getType()
the type of this primitiveboolean
isConvex()
test if this geometry data is convexlong
size()
Get the number of surface patches in this shell.void
sortAxis(int axis, Transform3D t3d)
Sort the faces according to their extent in the direction along axis.-
Methods inherited from class org.robwork.sdurw_geometry.Shell
extremums, getCPtr, getFace, getFace, getTriMesh, getTriMesh, obb
-
Methods inherited from class org.robwork.sdurw_geometry.GeometryData
getCPtr, toString
-
-
-
-
Constructor Detail
-
IndexedFaceArray
public IndexedFaceArray(long cPtr, boolean cMemoryOwn)
-
IndexedFaceArray
public IndexedFaceArray(ShellCPtr shell)
Construct new indexed face array.- Parameters:
shell
- [in] the underlying Shell.
-
IndexedFaceArray
public IndexedFaceArray(ShellCPtr shell, SWIGTYPE_p_std__vectorT_rw__geometry__IndexedFaceArray__IndexedFace_t faces, long first, long last)
Construct new indexed face array.- Parameters:
shell
- [in] the underlying Shell.faces
- [in] the faces to include in the proxy.first
- [in] skip the first faces.last
- [in] last index of faces to include.
-
-
Method Detail
-
getCPtr
public static long getCPtr(IndexedFaceArray obj)
-
getType
public GeometryData.GeometryType getType()
Description copied from class:GeometryData
the type of this primitive
-
isConvex
public boolean isConvex()
Description copied from class:GeometryData
test if this geometry data is convex
-
size
public long size()
Description copied from class:Shell
Get the number of surface patches in this shell.
-
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.
-
-