YARP
Yet Another Robot Platform
yarp::sig::PointCloudBase Class Referenceabstract

The PointCloudBase class. More...

#include <yarp/sig/PointCloudBase.h>

+ Inheritance diagram for yarp::sig::PointCloudBase:

Public Member Functions

virtual ~PointCloudBase ()=default
 
virtual size_t wireSizeBytes () const =0
 Get the size of the data + the header in terms of number of bytes. More...
 
virtual size_t dataSizeBytes () const =0
 Get the size of the data in terms of number of bytes. More...
 
virtual size_t size () const =0
 
virtual const char * getRawData () const =0
 Get the pointer to the data. More...
 
bool read (yarp::os::ConnectionReader &connection) override=0
 Read this object from a network connection. More...
 
bool write (yarp::os::ConnectionWriter &writer) const override=0
 Write this object to a network connection. More...
 
virtual int getBottleTag () const =0
 
virtual size_t height () const
 
virtual size_t width () const
 
virtual int getPointType () const
 
yarp::os::Type getType () const override
 
virtual bool isOrganized () const
 
virtual bool isDense () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations. More...
 
virtual yarp::os::Type getWriteType () const
 

Protected Member Functions

 PointCloudBase ()=default
 
virtual void copyFromRawData (const char *dst, const char *source, std::vector< int > &recipe)
 
virtual std::vector< int > getComposition (int type_composite) const
 
virtual size_t pointType2Size (int type) const
 
virtual size_t getOffset (int type_composite, int type_basic) const
 

Protected Attributes

yarp::sig::PointCloudNetworkHeader header
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (const PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...
 

Detailed Description

The PointCloudBase class.

A Base class for a yarp::sig::PointCloud<T>, provide default implementation for some methods and hides some internal implementation to the user. It can't be instantiated, only inherited.

Definition at line 28 of file PointCloudBase.h.

Constructor & Destructor Documentation

◆ ~PointCloudBase()

virtual yarp::sig::PointCloudBase::~PointCloudBase ( )
virtualdefault

◆ PointCloudBase()

yarp::sig::PointCloudBase::PointCloudBase ( )
protecteddefault

Member Function Documentation

◆ copyFromRawData()

void PointCloudBase::copyFromRawData ( const char *  dst,
const char *  source,
std::vector< int > &  recipe 
)
protectedvirtual

Definition at line 117 of file PointCloudBase.cpp.

◆ dataSizeBytes()

virtual size_t yarp::sig::PointCloudBase::dataSizeBytes ( ) const
pure virtual

Get the size of the data in terms of number of bytes.

Returns
the size of the data

Implemented in yarp::sig::PointCloud< T >.

◆ getBottleTag()

virtual int yarp::sig::PointCloudBase::getBottleTag ( ) const
pure virtual

Implemented in yarp::sig::PointCloud< T >.

◆ getComposition()

std::vector< int > PointCloudBase::getComposition ( int  type_composite) const
protectedvirtual

Definition at line 143 of file PointCloudBase.cpp.

◆ getOffset()

size_t PointCloudBase::getOffset ( int  type_composite,
int  type_basic 
) const
protectedvirtual

Definition at line 167 of file PointCloudBase.cpp.

◆ getPointType()

int PointCloudBase::getPointType ( ) const
virtual
Returns
the enum representing the point type.

Definition at line 102 of file PointCloudBase.cpp.

◆ getRawData()

virtual const char* yarp::sig::PointCloudBase::getRawData ( ) const
pure virtual

Get the pointer to the data.

Returns
the pointer to the data.

Implemented in yarp::sig::PointCloud< T >.

◆ getType()

yarp::os::Type PointCloudBase::getType ( ) const
overridevirtual

Reimplemented from yarp::os::Portable.

Definition at line 107 of file PointCloudBase.cpp.

◆ height()

size_t PointCloudBase::height ( ) const
virtual
Returns
the height specified in the yarp::sig::PointCloudNetworkHeader.

Definition at line 92 of file PointCloudBase.cpp.

◆ isDense()

virtual bool yarp::sig::PointCloudBase::isDense ( ) const
inlinevirtual
Returns
true if the point cloud doesn't contain NaN or Inf values

Definition at line 90 of file PointCloudBase.h.

◆ isOrganized()

bool PointCloudBase::isOrganized ( ) const
virtual
Returns
true if the point cloud is organized in an image-like structure

Definition at line 112 of file PointCloudBase.cpp.

◆ pointType2Size()

size_t PointCloudBase::pointType2Size ( int  type) const
protectedvirtual

Definition at line 155 of file PointCloudBase.cpp.

◆ read()

bool yarp::sig::PointCloudBase::read ( yarp::os::ConnectionReader reader)
overridepure virtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::Portable.

Implemented in yarp::sig::PointCloud< T >.

◆ size()

virtual size_t yarp::sig::PointCloudBase::size ( ) const
pure virtual
Returns
the number of points of the PointCloud

Implemented in yarp::sig::PointCloud< T >.

◆ width()

size_t PointCloudBase::width ( ) const
virtual
Returns
the width specified int the yarp::sig::PointCloudNetworkHeader.

Definition at line 97 of file PointCloudBase.cpp.

◆ wireSizeBytes()

virtual size_t yarp::sig::PointCloudBase::wireSizeBytes ( ) const
pure virtual

Get the size of the data + the header in terms of number of bytes.

Returns
the size of the data sent through the network

Implemented in yarp::sig::PointCloud< T >.

◆ write()

bool yarp::sig::PointCloudBase::write ( yarp::os::ConnectionWriter writer) const
overridepure virtual

Write this object to a network connection.

Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write

Parameters
writeran interface to the network connection for writing
Returns
true iff the object is successfully written

Implements yarp::os::Portable.

Implemented in yarp::sig::PointCloud< T >.

Member Data Documentation

◆ header

yarp::sig::PointCloudNetworkHeader yarp::sig::PointCloudBase::header
protected

Definition at line 106 of file PointCloudBase.h.


The documentation for this class was generated from the following files: