Package org.robwork.sdurw_geometry
Class PointCloudPtr
- java.lang.Object
-
- org.robwork.sdurw_geometry.PointCloudPtr
-
public class PointCloudPtr extends java.lang.Object
Ptr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description PointCloudPtr()
Default constructor yielding a NULL-pointer.PointCloudPtr(long cPtr, boolean cMemoryOwn)
PointCloudPtr(PointCloud 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 PointCloud
__ref__()
Dereferencing operator.PointCloudCPtr
cptr()
void
delete()
PointCloud
deref()
The pointer stored in the object.boolean
equals(PointCloud p)
Vector3Df
get(long row, long column)
static long
getCPtr(PointCloudPtr obj)
SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_float_t_t
getData()
returns a char pointer to the image dataTransform3Df
getDataTransform()
PointCloud
getDeref()
Member access operator.int
getHeight()
TriMeshPtr
getTriMesh()
TriMeshPtr
getTriMesh(boolean forceCopy)
GeometryData.GeometryType
getType()
int
getWidth()
width of the point cloud data.boolean
isConvex()
test if this geometry data is convexboolean
isNull()
checks if the pointer is nullboolean
isOrdered()
boolean
isShared()
check if this Ptr has shared ownership or none
ownershipPointCloudPtr
loadPCD(java.lang.String filename)
load point cloud from PCD filevoid
resize(int w, int h)
set width of point cloud.void
savePCD(PointCloud cloud, java.lang.String filename)
save point cloud in PCD file format (PCL library format)void
savePCD(PointCloud cloud, java.lang.String filename, Transform3Df t3d)
save point cloud in PCD file format (PCL library format)void
set(long row, long column, Vector3Df d)
long
size()
gets the number of points in the point cloud.java.lang.String
toString(GeometryData.GeometryType type)
format GeometryType to string
-
-
-
Constructor Detail
-
PointCloudPtr
public PointCloudPtr(long cPtr, boolean cMemoryOwn)
-
PointCloudPtr
public PointCloudPtr()
Default constructor yielding a NULL-pointer.
-
PointCloudPtr
public PointCloudPtr(PointCloud ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(PointCloudPtr obj)
-
delete
public void delete()
-
deref
public PointCloud deref()
The pointer stored in the object.
-
__ref__
public PointCloud __ref__()
Dereferencing operator.
-
getDeref
public PointCloud getDeref()
Member access operator.
-
equals
public boolean equals(PointCloud 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 PointCloudCPtr cptr()
-
getType
public GeometryData.GeometryType getType()
-
size
public long size()
gets the number of points in the point cloud.
-
isOrdered
public boolean isOrdered()
-
getData
public SWIGTYPE_p_std__vectorT_rw__math__Vector3DT_float_t_t getData()
returns a char pointer to the image data- Returns:
- char pointer to the image data
-
get
public Vector3Df get(long row, long column)
-
set
public void set(long row, long column, Vector3Df d)
-
getWidth
public int getWidth()
width of the point cloud data. If the data is unordered then this
will be equal to the number of points.- Returns:
- width of data points
-
getHeight
public int getHeight()
- Returns:
- height
-
resize
public void resize(int w, int h)
set width of point cloud. Data elements are accessed as [x+y*width].
If the current data array cannot contain the elements then it will be resized to
be able to it.- Parameters:
w
- [in] new widthh
- [in] new height
-
getTriMesh
public TriMeshPtr getTriMesh(boolean forceCopy)
-
getTriMesh
public TriMeshPtr getTriMesh()
-
getDataTransform
public Transform3Df getDataTransform()
-
loadPCD
public PointCloudPtr loadPCD(java.lang.String filename)
load point cloud from PCD file- Parameters:
filename
- [in] name of PCD file- Returns:
- a point cloud
-
savePCD
public void savePCD(PointCloud cloud, java.lang.String filename, Transform3Df t3d)
save point cloud in PCD file format (PCL library format)- Parameters:
cloud
- [in] the point cloud to savefilename
- [in] the name of the file to save tot3d
- [in] the transformation of the point cloud
-
savePCD
public void savePCD(PointCloud cloud, java.lang.String filename)
save point cloud in PCD file format (PCL library format)- Parameters:
cloud
- [in] the point cloud to savefilename
- [in] the name of the file to save to
-
isConvex
public boolean isConvex()
test if this geometry data is convex- Returns:
- true if convex
-
toString
public java.lang.String toString(GeometryData.GeometryType type)
format GeometryType to string- Parameters:
type
-
-
-