![]() |
RDB 2
|
Point update query. More...
#include <queryUpdate.hpp>
Public Member Functions | |
| QueryUpdate () | |
| Default constructor. More... | |
| QueryUpdate (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) |
| Update points. More... | |
Point update query.
This class can be used to update (modify) attributes of existing points.
Definition at line 66 of file queryUpdate.hpp.
|
explicit |
Default constructor.
Creates a null query - i.e. the query cannot be used to update points.
|
explicit |
Constructor.
Creates a query prepared for updating points.
| void riegl::rdb::pointcloud::QueryUpdate::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).
You can but don't need to define a buffer for each attribute. If no buffer is defined for an attribute, it remains unchanged.
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).
| [in] | attribute | attribute name |
| [in] | dataType | buffer data type |
| [in] | buffer | buffer location |
| [in] | stride | bytes between beginnings of successive elements (0: auto) |
|
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).
You can but don't need to define a buffer for each attribute. If no buffer is defined for an attribute, it remains unchanged.
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).
| [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) |
Definition at line 141 of file queryUpdate.hpp.
|
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.
| [in] | attribute | attribute name |
| [in] | object | e.g. first object of container |
| [in] | member | object member variable pointer |
Definition at line 161 of file queryUpdate.hpp.
|
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.
| [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 175 of file queryUpdate.hpp.
| void riegl::rdb::pointcloud::QueryUpdate::close | ( | ) |
Finish query.
Call this function when done with updating points.
| std::uint32_t riegl::rdb::pointcloud::QueryUpdate::next | ( | std::uint32_t | count | ) |
Update points.
Use this function to actually read the point attributes from all defined buffers and update the points in the database.
Afterwards you may re-fill the buffers or define new buffers with bind() and call next() again until all points have been updated.
length is 3, minimumValue is -1, maximumValue is 1, resolution is not 1, scaleFactor is 1, unitSymbol is empty, invalidValue is undefined and tags contains the "direction" tag but not the "do-not-normalize" tag.| [in] | count | size of source buffers in terms of points |
| riegl::rdb::pointcloud::QueryUpdate::operator bool | ( | ) | const |
Check if query is not null.
| bool riegl::rdb::pointcloud::QueryUpdate::valid | ( | ) | const |
Check if query is not null.
A null query cannot be used to update points.
1.8.13