Class PointBuffer

Inheritance Relationships

Base Type

Derived Type

Class Documentation

class PointBuffer : public lvr2::BaseBuffer

A class to handle point information with an arbitrarily large number of attribute channels. The added channels should always have the same length as the point array to keep the mapping between geometry (channel ‘points’) and the associated layers like RGB colors or point normals consistent.

Subclassed by lvr2::WaveformBuffer

Public Functions

PointBuffer()
inline virtual ~PointBuffer()
PointBuffer(floatArr points, size_t n)
PointBuffer(floatArr points, floatArr normals, size_t n)
void setPointArray(floatArr points, size_t n)
void setNormalArray(floatArr normals, size_t n)
void setColorArray(ucharArr colors, size_t n, size_t width = 3)
floatArr getPointArray()

Returns the internal point array.

floatArr getNormalArray()

If the buffer stores normals, the call we return an empty array, i.e., the shared pointer contains a nullptr.

ucharArr getColorArray(size_t &w)

If the buffer stores color information, the call we return an empty array, i.e., the shared pointer contains a nullptr.

bool hasColors() const

True, if buffer contains colors.

bool hasNormals() const

True, if buffer has normals.

size_t numPoints() const

Returns the number of points in the buffer.

PointBuffer clone() const

Makes a clone.

template<typename V>
inline PointBuffer manipulate(V visitor)