Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
icl::geom::PointCloudObject Class Reference

Base implementation of the SceneObjectBase interface for compability with common icl::SceneObjects. More...

#include <PointCloudObject.h>

Inheritance diagram for icl::geom::PointCloudObject:
icl::geom::PointCloudObjectBase icl::geom::SceneObject

List of all members.

Public Member Functions

 PointCloudObject (int numPoints, bool withNormals=false, bool withColors=true)
 create an un-organizied point cloud with N points
 PointCloudObject (int width, int height, bool organized=true, bool withNormals=false, bool withColors=true)
 creates a new organized or un-organized SimplePointCloudObject instance
virtual bool supports (FeatureType t) const
 returns which features are supported (only XYZ and RGBA32f)
virtual bool isOrganized () const
 returns whether the points are 2D-ordered
virtual utils::Size getSize () const throw (utils::ICLException)
 returns the 2D size of the pointcloud (throws exception if not ordered)
virtual int getDim () const
 return the linearily ordered number of point in the point cloud
virtual void setSize (const utils::Size &size)
 adapts the point cloud size
virtual DataSegment< float, 3 > selectXYZ ()
 returns XYZ data segment
virtual DataSegment< float, 4 > selectXYZH ()
 returns XYZH data segment
virtual DataSegment< float, 4 > selectRGBA32f ()
 returns the RGBA data segment (4-floats)
virtual DataSegment< float, 4 > selectNormal ()
 returns the Normals data segment (4-floats)
virtual void customRender ()
 important, this is again, reimplemented in order to NOT draw the stuff manually here
virtual PointCloudObjectcopy () const
 deep copy function
void push_back (const Vec &point)
 just a simple wrapper for top-top level classe's addVertex method
void push_back (const Vec &point, const GeomColor &color)
 adds xyz point with given color
void push_back (const Vec &point, const Vec &normal, const GeomColor &color)
 adds xyz point with given normal and color

Protected Attributes

bool m_organized
 internal 2D organized flag
utils::Size m_dim2D
 2D dimension
bool m_hasNormals
 flag whether normals are given
bool m_hasColors
 flag whether the point cloud has colors

Detailed Description

Base implementation of the SceneObjectBase interface for compability with common icl::SceneObjects.

This class replaces the former implementations

Normals

The PointCloudObject can be set up to have also normals in the constructor.

ToDo


Constructor & Destructor Documentation

icl::geom::PointCloudObject::PointCloudObject ( int  numPoints,
bool  withNormals = false,
bool  withColors = true 
)

create an un-organizied point cloud with N points

icl::geom::PointCloudObject::PointCloudObject ( int  width,
int  height,
bool  organized = true,
bool  withNormals = false,
bool  withColors = true 
)

creates a new organized or un-organized SimplePointCloudObject instance

Parameters:
widthnumber of points per line (if unordered, number of points)
heightnumber of points per row (if unordered, height is not used)
organizedspecifies whether there is a 2D data order or not withNormals if true, also normals will be created for each point

Member Function Documentation

virtual PointCloudObject* icl::geom::PointCloudObject::copy ( ) const [inline, virtual]

deep copy function

Reimplemented from icl::geom::PointCloudObjectBase.

virtual void icl::geom::PointCloudObject::customRender ( ) [virtual]

important, this is again, reimplemented in order to NOT draw the stuff manually here

Reimplemented from icl::geom::PointCloudObjectBase.

virtual int icl::geom::PointCloudObject::getDim ( ) const [virtual]

return the linearily ordered number of point in the point cloud

Implements icl::geom::PointCloudObjectBase.

returns the 2D size of the pointcloud (throws exception if not ordered)

Implements icl::geom::PointCloudObjectBase.

virtual bool icl::geom::PointCloudObject::isOrganized ( ) const [virtual]

returns whether the points are 2D-ordered

Implements icl::geom::PointCloudObjectBase.

void icl::geom::PointCloudObject::push_back ( const Vec point) [inline]

just a simple wrapper for top-top level classe's addVertex method

This method does not work for organized point cloud objects. The organized flag is not checked for performance reason. The behaviour of calling push_back on ordered point clouds is undefined

void icl::geom::PointCloudObject::push_back ( const Vec point,
const GeomColor color 
) [inline]

adds xyz point with given color

See also:
push_back(const Vec&)
void icl::geom::PointCloudObject::push_back ( const Vec point,
const Vec normal,
const GeomColor color 
) [inline]

adds xyz point with given normal and color

See also:
push_back(const Vec&)

returns the Normals data segment (4-floats)

Only available if the constructor was called with "withNormals" set to true

Reimplemented from icl::geom::PointCloudObjectBase.

returns the RGBA data segment (4-floats)

Reimplemented from icl::geom::PointCloudObjectBase.

virtual DataSegment<float,3> icl::geom::PointCloudObject::selectXYZ ( ) [virtual]

returns XYZ data segment

Reimplemented from icl::geom::PointCloudObjectBase.

virtual DataSegment<float,4> icl::geom::PointCloudObject::selectXYZH ( ) [virtual]

returns XYZH data segment

Reimplemented from icl::geom::PointCloudObjectBase.

virtual void icl::geom::PointCloudObject::setSize ( const utils::Size size) [virtual]

adapts the point cloud size

if the sizes height is smaller than 1, the cloud becomes un-organized

Implements icl::geom::PointCloudObjectBase.

virtual bool icl::geom::PointCloudObject::supports ( FeatureType  t) const [virtual]

returns which features are supported (only XYZ and RGBA32f)

Implements icl::geom::PointCloudObjectBase.


Member Data Documentation

2D dimension

flag whether the point cloud has colors

flag whether normals are given

internal 2D organized flag


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines