Package org.robwork.sdurw_geometry
Class GeometryData
- java.lang.Object
-
- org.robwork.sdurw_geometry.GeometryData
-
- Direct Known Subclasses:
BREP
,ImplicitBREP
,ImplicitShell
,PointCloud
,Primitive
,QuadraticBREP
,QuadraticFace
,Shell
,TriMesh
public class GeometryData extends java.lang.Object
an interface for geometry data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeometryData.GeometryType
geometry data types
-
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 primitiveboolean
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
-
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. 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. 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
-
isConvex
public boolean isConvex()
test if this geometry data is convex- Returns:
- true if convex
-
toString
public static java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type
-
-
-