![]() |
RDB 2
|
Point fill query. More...
#include <queryFill.hpp>
Public Member Functions | |
QueryFill () | |
Default constructor. More... | |
QueryFill (riegl::rdb::PointcloudData *pointcloud, const std::vector< GraphNode::ID > *nodes, const std::string &filter) | |
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) |
Bind attribute buffer. More... | |
template<typename ValueType > | |
void | bindBuffer (const std::string &attribute, const ValueType &buffer) |
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) |
Fill points. More... | |
std::uint32_t | progress () const |
Progress. More... | |
Point fill query.
This class can be used to set attributes of existing points to a (one) specific value (e.g. set "riegl.selected" to "1" for all points). This query is similar to using select() and update() except that it only accepts one value per point attribute and this value is copied to all points.
Definition at line 71 of file queryFill.hpp.
|
explicit |
Default constructor.
Creates a null query - i.e. the query cannot be used to modify points.
|
explicit |
Constructor.
Creates a query prepared for modifying points.
void riegl::rdb::pointcloud::QueryFill::bind | ( | const std::string & | attribute, |
const DataType | dataType, | ||
const void * | buffer | ||
) |
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 1*s*d bytes large, where 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 |
|
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 1*s*d bytes large, where 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) |
Definition at line 148 of file queryFill.hpp.
|
inline |
Bind attribute buffer.
This is a variant of bindBuffer() that allows to bind a member variable of an object as attribute buffer.
[in] | attribute | attribute name |
[in] | object | e.g. first object of container |
[in] | member | object member variable pointer |
Definition at line 165 of file queryFill.hpp.
|
inline |
Bind attribute buffer.
This is a variant of bindBuffer() that allows to bind a member variable of an object as attribute buffer.
[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 176 of file queryFill.hpp.
void riegl::rdb::pointcloud::QueryFill::close | ( | ) |
Finish query.
Call this function when done with modifying points.
std::uint32_t riegl::rdb::pointcloud::QueryFill::next | ( | std::uint32_t | count | ) |
Fill points.
Use this function to actually read the point attributes from all defined buffers and update the points in the database.
To process all points, you need to repeatedly call next() until it returns 0 (zero, see example 7). The number of points to process in one step is defined by 'count'. Please note that the actual number of processed points may be slightly different. To cancel processing just stop calling next() and cancel (rollback) the transaction.
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 | number of points to process |
riegl::rdb::pointcloud::QueryFill::operator bool | ( | ) | const |
Check if query is not null.
std::uint32_t riegl::rdb::pointcloud::QueryFill::progress | ( | ) | const |
Progress.
This function returns a coarse progress information in percent (0..100%). Since the total number of modified points is not known in advance, this value just reflects the progress of the (internal) index traversal.
bool riegl::rdb::pointcloud::QueryFill::valid | ( | ) | const |
Check if query is not null.
A null query cannot be used to read points.