Package org.robwork.sdurw
Class GeometryData
- java.lang.Object
-
- org.robwork.sdurw.GeometryData
-
- Direct Known Subclasses:
PointCloud
,Primitive
,TriMesh
public class GeometryData extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeometryData.GeometryType
-
Constructor Summary
Constructors Constructor Description GeometryData(long cPtr, boolean cMemoryOwn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
static long
getCPtr(GeometryData obj)
TriMeshPtr
getTriMesh()
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means
ownership is transfered to the caller.TriMeshPtr
getTriMesh(boolean forceCopy)
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means
ownership is transfered to the caller.GeometryData.GeometryType
getType()
the type of this primitive
boolean
isConvex()
test if this geometry data is convexstatic java.lang.String
toString(GeometryData.GeometryType type)
format GeometryType to string
-
-
-
Method Detail
-
getCPtr
public static long getCPtr(GeometryData obj)
-
delete
public void delete()
-
getType
public GeometryData.GeometryType getType()
the type of this primitive
- Returns:
- the type of primitive.
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means
ownership is transfered to the caller.- Parameters:
forceCopy
- Specifying forceCopy to false will enable copy by reference and
ownership is not necesarilly transfered.
This is more efficient, though pointer is only alive as long as this
GeometryData is alive.- Returns:
- TriMesh representation of this GeometryData
-
getTriMesh
public TriMeshPtr getTriMesh()
gets a trimesh representation of this geometry data.
The trimesh that is returned is by default a copy, which means
ownership is transfered to the caller.
- Returns:
- TriMesh representation of this GeometryData
-
isConvex
public boolean isConvex()
test if this geometry data is convex- Returns:
-
toString
public static java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type
- [in] the type of geometry to convert to string.- Returns:
- a string.
-
-