RDB 2: riegl::rdb::pointcloud::QueryRemove Class Reference

| RDB 2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
riegl::rdb::pointcloud::QueryRemove Class Reference

Point remove query. More...

`#include <queryRemove.hpp>`

## Public Member Functions
| QueryRemove ()
| Default constructor. More...
| QueryRemove (riegl::rdb::PointcloudData *pointcloud)
| Constructor. More...
| operator bool () const
| Check if query is not null. More...
bool | valid () const
| Check if query is not null. More...
void | close ()
| Finish query. More...
void | bind (const std::string &attribute, const DataType dataType, const void *buffer, const std::int32_t stride=0)
| Bind attribute buffer. More...
template<typename ValueType >
void | bindBuffer (const std::string &attribute, const ValueType &buffer, const std::int32_t stride=0)
| Bind attribute buffer. More...
template<typename ObjectType , typename MemberPointer >
void | bindMember (const std::string &attribute, const ObjectType &object, const MemberPointer member)
| Bind attribute buffer. More...
template<typename ObjectType , typename MemberPointer >
void | bindMember (const std::string &attribute, const ObjectType &object, const MemberPointer member, const std::size_t index)
| Bind attribute buffer. More...
std::uint32_t | next (std::uint32_t count)
| Remove points. More...

## Detailed Description

Point remove query.

This class can be used to remove (delete) existing points.

See Also
  riegl::rdb::Pointcloud::remove()

Note
  You either must delete the query object or call close() before the parent Pointcloud instance is closed/deleted!

Examples:
  rdb-example-05-remove-points.cpp.

Definition at line 65 of file queryRemove.hpp.

## Constructor & Destructor Documentation

riegl::rdb::pointcloud::QueryRemove::QueryRemove | ( |  | ) |
| explicit

Default constructor.

Creates a null query - i.e. the query cannot be used to remove points.

See Also
  riegl::rdb::Pointcloud::remove()

riegl::rdb::pointcloud::QueryRemove::QueryRemove | ( | riegl::rdb::PointcloudData * | pointcloud | ) |
| explicit

Constructor.

Creates a query prepared for removing points.

Note
  You cannot create new QueryRemove objects this way, use riegl::rdb::Pointcloud::remove() instead.

## Member Function Documentation

void riegl::rdb::pointcloud::QueryRemove::bind | ( | const std::string & | attribute,
|  | const DataType | dataType,
|  | const void * | buffer,
|  | const std::int32_t | stride = `0`
| ) |  |

Bind attribute buffer.

Use this function to define a source buffer for a point attribute. Exactly one buffer can be defined for an attribute (i.e. only the most recently defined buffer will be used).

The buffer is expected to be n*s*d bytes large, where n is the number of points defined in next(), s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Note
  This function just stores the buffer pointer - it does NOT copy the data contained in the buffer. So make sure that the buffer remains valid until you call next().
  This function expects a buffer for the point ID attribute.

See Also
  riegl::rdb::pointcloud::PointAttributes

Parameters

  [in] | attribute | attribute name
  [in] | dataType | buffer data type
  [in] | buffer | buffer location
  [in] | stride | bytes between beginnings of successive elements (0: auto)

template<typename ValueType >

void riegl::rdb::pointcloud::QueryRemove::bindBuffer | ( | const std::string & | attribute,
|  | const ValueType & | buffer,
|  | const std::int32_t | stride = `0`
| ) |  |
| inline

Bind attribute buffer.

Use this function to define a source buffer for a point attribute. Exactly one buffer can be defined for an attribute (i.e. only the most recently defined buffer will be used).

The buffer is expected to be n*s*d bytes large, where n is the number of points defined in next(), s is the size of one element as defined by 'dataType' and d is the number of attribute dimensions (elements).

Note
  This function just stores the buffer pointer - it does NOT copy the data contained in the buffer. So make sure that the buffer remains valid until you call next().
  This function expects a buffer for the point ID attribute.

See Also
  riegl::rdb::pointcloud::PointAttributes

Parameters

  [in] | attribute | attribute name
  [in] | buffer | buffer (data, pointer to data, std::array or std::vector)
  [in] | stride | bytes between beginnings of successive elements (0: auto)

Examples:
  rdb-example-05-remove-points.cpp.

Definition at line 137 of file queryRemove.hpp.

template<typename ObjectType , typename MemberPointer >

void riegl::rdb::pointcloud::QueryRemove::bindMember | ( | const std::string & | attribute,
|  | const ObjectType & | object,
|  | const MemberPointer | member
| ) |  |
| inline

Bind attribute buffer.

This is a variant of bindBuffer() that allows to bind a member variable of an object as attribute buffer. The object can be part of a container that stores the objects contiguously (e.g. std::vector, std::array) and the stride is automatically derived from the object size.

See Also
  bindBuffer()

Parameters

  [in] | attribute | attribute name
  [in] | object | e.g. first object of container
  [in] | member | object member variable pointer

Definition at line 157 of file queryRemove.hpp.

template<typename ObjectType , typename MemberPointer >

void riegl::rdb::pointcloud::QueryRemove::bindMember | ( | const std::string & | attribute,
|  | const ObjectType & | object,
|  | const MemberPointer | member,
|  | const std::size_t | index
| ) |  |
| inline

Bind attribute buffer.

This is a variant of bindBuffer() that allows to bind a member variable of an object as attribute buffer. The object can be part of a container that stores the objects contiguously (e.g. std::vector, std::array) and the stride is automatically derived from the object size.

See Also
  bindBuffer()

Parameters

  [in] | attribute | attribute name
  [in] | object | e.g. first object of container
  [in] | member | object member variable pointer
  [in] | index | index for array-like object members

Definition at line 171 of file queryRemove.hpp.

void riegl::rdb::pointcloud::QueryRemove::close | ( |  | ) |

Finish query.

Call this function when done with removing points.

std::uint32_t riegl::rdb::pointcloud::QueryRemove::next | ( | std::uint32_t | count | ) |

Remove points.

Use this function to actually remove (delete) the points. All points given by their point ID stored in the previously bound attribute buffer are removed from the database.

Afterwards you may re-fill the buffers or define a new buffer with bind() and call next() again until all points have been removed.

Note
  If no point ID buffer is given and 'count' is 0xDEADFEED, then all points are removed and next() always returns 1.

Returns
  the number of points removed

Parameters

  [in] | count | size of source buffers in terms of points

riegl::rdb::pointcloud::QueryRemove::operator bool | ( |  | ) | const

Check if query is not null.

See Also
  valid()

bool riegl::rdb::pointcloud::QueryRemove::valid | ( |  | ) | const

Check if query is not null.

A null query cannot be used to remove points.

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

- riegl/rdb/pointcloud/queryRemove.hpp