Developer Documentation
|
#include <ObjectTypes/SplatCloud/SplatCloud/SplatCloud.hh>
Classes | |
class | CloudPropertyInterface |
class | CloudPropertyMapEntry |
class | CloudPropertyT |
class | PropertyHandleT |
class | SplatPropertyInterface |
class | SplatPropertyMapEntry |
class | SplatPropertyT |
struct | View |
Public Types | |
typedef std::string | BasePropertyHandle |
typedef std::map< BasePropertyHandle, SplatPropertyMapEntry > | SplatPropertyMap |
typedef std::map< BasePropertyHandle, CloudPropertyMapEntry > | CloudPropertyMap |
Value types for predefined properties | |
typedef ACG::Vec3f | Position |
typedef ACG::Vec3uc | Color |
typedef ACG::Vec3f | Normal |
typedef float | Pointsize |
typedef int | Index |
typedef std::vector< View > | Viewlist |
typedef unsigned char | Selection |
Vector types for predefined properties | |
typedef std::vector< Position > | PositionVector |
typedef std::vector< Color > | ColorVector |
typedef std::vector< Normal > | NormalVector |
typedef std::vector< Pointsize > | PointsizeVector |
typedef std::vector< Index > | IndexVector |
typedef std::vector< Viewlist > | ViewlistVector |
typedef std::vector< Selection > | SelectionVector |
Public Member Functions | |
SplatCloud () | |
Standard constructor. | |
SplatCloud (const SplatCloud &_splatCloud) | |
Copy constructor. | |
~SplatCloud () | |
Destructor. | |
SplatCloud & | operator= (const SplatCloud &_splatCloud) |
Assign operator. | |
void | clear () |
Remove all properties and reset the number of splats. | |
void | swap (SplatCloud &_splatCloud) |
Swap the content. | |
void | clearSplats () |
Clear the data vector of all splat-properties. More... | |
void | pushbackSplat () |
Add one element at the end of the data vector of all splat-properties. More... | |
void | resizeSplats (unsigned int _num) |
Resize the data vector of all splat-properties. More... | |
template<typename T > | |
unsigned int | eraseSplatsByIndex (const T &_indices) |
Delete the elements with given indices from the data vector of all splat-properties. More... | |
template<typename T > | |
unsigned int | eraseSplatsByFlag (const std::vector< T > &_flags) |
Delete the elements with flag != 0 from the data vector of all splat-properties. More... | |
template<typename T > | |
void | cropSplats (const T &_indices) |
Keep only the elements with given indices in the data vector of all splat-properties. The splats will be rearranged depending on the order of the indices. More... | |
unsigned int | numSplats () const |
Get the number of splats. More... | |
void | clearSplatProperties () |
Clear all splat-properties. | |
void | clearCloudProperties () |
Clear all cloud-properties. | |
Request properties. | |
template<typename T > | |
SplatPropertyT< T > * | requestSplatProperty (const PropertyHandleT< T > &_handle) |
Request a new property. More... | |
template<typename T > | |
CloudPropertyT< T > * | requestCloudProperty (const PropertyHandleT< T > &_handle) |
Request a new property. More... | |
template<typename T > | |
SplatPropertyT< T > * | requestSplatProperty (const BasePropertyHandle &_handle) |
Request a new property. More... | |
template<typename T > | |
CloudPropertyT< T > * | requestCloudProperty (const BasePropertyHandle &_handle) |
Request a new property. More... | |
Release properties. | |
template<typename T > | |
SplatPropertyT< T > * | releaseSplatProperty (const PropertyHandleT< T > &_handle) |
Release a property. More... | |
template<typename T > | |
CloudPropertyT< T > * | releaseCloudProperty (const PropertyHandleT< T > &_handle) |
Release a property. More... | |
template<typename T > | |
SplatPropertyT< T > * | releaseSplatProperty (const BasePropertyHandle &_handle) |
Release a property. More... | |
template<typename T > | |
CloudPropertyT< T > * | releaseCloudProperty (const BasePropertyHandle &_handle) |
Release a property. More... | |
Get properties. | |
template<typename T > | |
SplatPropertyT< T > * | getSplatProperty (const PropertyHandleT< T > &_handle) |
Get a pointer to a property. More... | |
template<typename T > | |
const SplatPropertyT< T > * | getSplatProperty (const PropertyHandleT< T > &_handle) const |
Get a pointer to a property. More... | |
template<typename T > | |
CloudPropertyT< T > * | getCloudProperty (const PropertyHandleT< T > &_handle) |
Get a pointer to a property. More... | |
template<typename T > | |
const CloudPropertyT< T > * | getCloudProperty (const PropertyHandleT< T > &_handle) const |
Get a pointer to a property. More... | |
template<typename T > | |
SplatPropertyT< T > * | getSplatProperty (const BasePropertyHandle &_handle) |
Get a pointer to a property. More... | |
template<typename T > | |
const SplatPropertyT< T > * | getSplatProperty (const BasePropertyHandle &_handle) const |
Get a pointer to a property. More... | |
template<typename T > | |
CloudPropertyT< T > * | getCloudProperty (const BasePropertyHandle &_handle) |
Get a pointer to a property. More... | |
template<typename T > | |
const CloudPropertyT< T > * | getCloudProperty (const BasePropertyHandle &_handle) const |
Get a pointer to a property. More... | |
Get property maps. | |
const SplatPropertyMap & | splatProperties () const |
Get all splat-properties. More... | |
const CloudPropertyMap & | cloudProperties () const |
Get all cloud-properties. More... | |
Request predefined properties. | |
bool | requestPositions () |
Request the predefined property. More... | |
bool | requestColors () |
Request the predefined property. More... | |
bool | requestNormals () |
Request the predefined property. More... | |
bool | requestPointsizes () |
Request the predefined property. More... | |
bool | requestIndices () |
Request the predefined property. More... | |
bool | requestViewlists () |
Request the predefined property. More... | |
bool | requestSelections () |
Request the predefined property. More... | |
Release predefined properties. | |
void | releasePositions () |
Release the predefined property. More... | |
void | releaseColors () |
Release the predefined property. More... | |
void | releaseNormals () |
Release the predefined property. More... | |
void | releasePointsizes () |
Release the predefined property. More... | |
void | releaseIndices () |
Release the predefined property. More... | |
void | releaseViewlists () |
Release the predefined property. More... | |
void | releaseSelections () |
Release the predefined property. More... | |
Get availability of predefined properties. | |
bool | hasPositions () const |
Return the availability of the predefined property. More... | |
bool | hasColors () const |
Return the availability of the predefined property. More... | |
bool | hasNormals () const |
Return the availability of the predefined property. More... | |
bool | hasPointsizes () const |
Return the availability of the predefined property. More... | |
bool | hasIndices () const |
Return the availability of the predefined property. More... | |
bool | hasViewlists () const |
Return the availability of the predefined property. More... | |
bool | hasSelections () const |
Return the availability of the predefined property. More... | |
Get predefined properties. | |
Position & | positions (int _idx) |
Get a reference of the predefined property's value. More... | |
const Position & | positions (int _idx) const |
Get a reference of the predefined property's value. More... | |
Color & | colors (int _idx) |
Get a reference of the predefined property's value. More... | |
const Color & | colors (int _idx) const |
Get a reference of the predefined property's value. More... | |
Normal & | normals (int _idx) |
Get a reference of the predefined property's value. More... | |
const Normal & | normals (int _idx) const |
Get a reference of the predefined property's value. More... | |
Pointsize & | pointsizes (int _idx) |
Get a reference of the predefined property's value. More... | |
const Pointsize & | pointsizes (int _idx) const |
Get a reference of the predefined property's value. More... | |
Index & | indices (int _idx) |
Get a reference of the predefined property's value. More... | |
const Index & | indices (int _idx) const |
Get a reference of the predefined property's value. More... | |
Viewlist & | viewlists (int _idx) |
Get a reference of the predefined property's value. More... | |
const Viewlist & | viewlists (int _idx) const |
Get a reference of the predefined property's value. More... | |
Selection & | selections (int _idx) |
Get a reference of the predefined property's value. More... | |
const Selection & | selections (int _idx) const |
Get a reference of the predefined property's value. More... | |
Private Types | |
Type specific property-handle types for predefined properties | |
typedef PropertyHandleT< Position > | PositionsHandle |
typedef PropertyHandleT< Color > | ColorsHandle |
typedef PropertyHandleT< Normal > | NormalsHandle |
typedef PropertyHandleT< Pointsize > | PointsizesHandle |
typedef PropertyHandleT< Index > | IndicesHandle |
typedef PropertyHandleT< Viewlist > | ViewlistsHandle |
typedef PropertyHandleT< Selection > | SelectionsHandle |
Private Member Functions | |
void | copySplatProperties (const SplatCloud &_splatCloud) |
Deep copy all splat-properties. | |
void | copyCloudProperties (const SplatCloud &_splatCloud) |
Deep copy all cloud-properties. | |
void | resetPredefinedSplatPropertyPointers () |
Reset pointers to predefined splat-properties. | |
void | resetPredefinedCloudPropertyPointers () |
Reset pointers to predefined cloud-properties. | |
void | getPredefinedSplatPropertyPointers () |
Get pointers to predefined splat-properties. | |
void | getPredefinedCloudPropertyPointers () |
Get pointers to predefined cloud-properties. | |
void | swapPredefinedSplatPropertyPointers (SplatCloud &_splatCloud) |
Swap pointers to predefined splat-properties. | |
void | swapPredefinedCloudPropertyPointers (SplatCloud &_splatCloud) |
Swap pointers to predefined cloud-properties. | |
Private Attributes | |
unsigned int | numSplats_ |
Number of splats. | |
SplatPropertyMap | splatProperties_ |
Splat-property map. | |
CloudPropertyMap | cloudProperties_ |
Cloud-property map. | |
Pointers to predefined properties | |
SplatPropertyT< Position > * | positionsProperty_ |
SplatPropertyT< Color > * | colorsProperty_ |
SplatPropertyT< Normal > * | normalsProperty_ |
SplatPropertyT< Pointsize > * | pointsizesProperty_ |
SplatPropertyT< Index > * | indicesProperty_ |
SplatPropertyT< Viewlist > * | viewlistsProperty_ |
SplatPropertyT< Selection > * | selectionsProperty_ |
Static Private Attributes | |
Type specific property-handles for predefined properties | |
static const PositionsHandle | POSITIONS_HANDLE |
static const ColorsHandle | COLORS_HANDLE |
static const NormalsHandle | NORMALS_HANDLE |
static const PointsizesHandle | POINTSIZES_HANDLE |
static const IndicesHandle | INDICES_HANDLE |
static const ViewlistsHandle | VIEWLISTS_HANDLE |
static const SelectionsHandle | SELECTIONS_HANDLE |
Storage of properties for each splat and for the whole splatcloud.
Definition at line 79 of file SplatCloud.hh.
typedef std::string SplatCloud::BasePropertyHandle |
Base class for all property-handles
Definition at line 203 of file SplatCloud.hh.
typedef std::map<BasePropertyHandle, CloudPropertyMapEntry> SplatCloud::CloudPropertyMap |
Cloud-property map type
Definition at line 275 of file SplatCloud.hh.
typedef std::map<BasePropertyHandle, SplatPropertyMapEntry> SplatCloud::SplatPropertyMap |
Splat-property map type
Definition at line 270 of file SplatCloud.hh.
void SplatCloud::clearSplats | ( | ) |
Clear the data vector of all splat-properties.
Definition at line 216 of file SplatCloud.cc.
|
inline |
Get all cloud-properties.
Definition at line 457 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 633 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 634 of file SplatCloud.hh.
void SplatCloud::cropSplats | ( | const T & | _indices | ) |
Keep only the elements with given indices in the data vector of all splat-properties. The splats will be rearranged depending on the order of the indices.
Use std::vector<T2> / std::list<T2> / std::deque<T2> / ... for T and int / unsigned int / ... for T2.
[in] | _indices | Indices of the elements to be kept in the order given by the indices. |
Definition at line 136 of file SplatCloudT_impl.hh.
unsigned int SplatCloud::eraseSplatsByFlag | ( | const std::vector< T > & | _flags | ) |
Delete the elements with flag != 0 from the data vector of all splat-properties.
Use bool / unsigned char / ... for T. _flags.size() has to be equal to numSplats().
[in] | _flags | Vector of flag bits, one for each element. |
Definition at line 92 of file SplatCloudT_impl.hh.
unsigned int SplatCloud::eraseSplatsByIndex | ( | const T & | _indices | ) |
Delete the elements with given indices from the data vector of all splat-properties.
Use std::vector<T2> / std::list<T2> / std::set<T2> / ... for T and int / unsigned int / ... for T2.
[in] | _indices | Indices of the elements to be erased. |
Definition at line 64 of file SplatCloudT_impl.hh.
SplatCloud::CloudPropertyT< T > * SplatCloud::getCloudProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 373 of file SplatCloudT_impl.hh.
const SplatCloud::CloudPropertyT< T > * SplatCloud::getCloudProperty | ( | const PropertyHandleT< T > & | _handle | ) | const |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 387 of file SplatCloudT_impl.hh.
|
inline |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 428 of file SplatCloud.hh.
|
inline |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 429 of file SplatCloud.hh.
SplatCloud::SplatPropertyT< T > * SplatCloud::getSplatProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 345 of file SplatCloudT_impl.hh.
const SplatCloud::SplatPropertyT< T > * SplatCloud::getSplatProperty | ( | const PropertyHandleT< T > & | _handle | ) | const |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 359 of file SplatCloudT_impl.hh.
|
inline |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 426 of file SplatCloud.hh.
|
inline |
Get a pointer to a property.
[in] | _handle | A handle of the desired property. return If the property is present, a pointer to the property is returned. Otherwise 0 is returned. |
Definition at line 427 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 608 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 611 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 609 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 610 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 607 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 613 of file SplatCloud.hh.
|
inline |
Return the availability of the predefined property.
Definition at line 612 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 639 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 640 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 635 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 636 of file SplatCloud.hh.
|
inline |
Get the number of splats.
Definition at line 179 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 637 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 638 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 631 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 632 of file SplatCloud.hh.
void SplatCloud::pushbackSplat | ( | ) |
Add one element at the end of the data vector of all splat-properties.
Definition at line 231 of file SplatCloud.cc.
SplatCloud::CloudPropertyT< T > * SplatCloud::releaseCloudProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Release a property.
Removes the property if present. Otherwise nothing is removed.
[in] | _handle | A handle of the property to remove. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 306 of file SplatCloudT_impl.hh.
|
inline |
Release a property.
Removes the property if present. Otherwise nothing is removed.
[in] | _handle | A handle of the property to remove. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 403 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 585 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 588 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 586 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 587 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 584 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 590 of file SplatCloud.hh.
SplatCloud::SplatPropertyT< T > * SplatCloud::releaseSplatProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Release a property.
Removes the property if present. Otherwise nothing is removed.
[in] | _handle | A handle of the property to remove. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 267 of file SplatCloudT_impl.hh.
|
inline |
Release a property.
Removes the property if present. Otherwise nothing is removed.
[in] | _handle | A handle of the property to remove. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 402 of file SplatCloud.hh.
|
inline |
Release the predefined property.
See the releaseSplatProperty() or releaseCloudProperty() method for more detail.
Definition at line 589 of file SplatCloud.hh.
SplatCloud::CloudPropertyT< T > * SplatCloud::requestCloudProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Request a new property.
Adds the new property if not already present. Otherwise nothing is added.
[in] | _handle | A handle of the desired property. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 232 of file SplatCloudT_impl.hh.
|
inline |
Request a new property.
Adds the new property if not already present. Otherwise nothing is added.
[in] | _handle | A handle of the desired property. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 378 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 562 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 565 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 563 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 564 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 561 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 567 of file SplatCloud.hh.
SplatCloud::SplatPropertyT< T > * SplatCloud::requestSplatProperty | ( | const PropertyHandleT< T > & | _handle | ) |
Request a new property.
Adds the new property if not already present. Otherwise nothing is added.
[in] | _handle | A handle of the desired property. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 190 of file SplatCloudT_impl.hh.
|
inline |
Request a new property.
Adds the new property if not already present. Otherwise nothing is added.
[in] | _handle | A handle of the desired property. Do not use handle-strings inbetween '<' and '>'. These are reserved for predefined properties. |
Definition at line 377 of file SplatCloud.hh.
|
inline |
Request the predefined property.
See the requestSplatProperty() or requestCloudProperty() method for more detail.
Definition at line 566 of file SplatCloud.hh.
void SplatCloud::resizeSplats | ( | unsigned int | _num | ) |
Resize the data vector of all splat-properties.
[in] | _num | The new size of all data vectors. |
Definition at line 246 of file SplatCloud.cc.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 643 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 644 of file SplatCloud.hh.
|
inline |
Get all splat-properties.
Definition at line 447 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 641 of file SplatCloud.hh.
|
inline |
Get a reference of the predefined property's value.
[in] | _idx | The index of the desired entry in the predefined property's data vector. This is the same as the index of the splat. |
Definition at line 642 of file SplatCloud.hh.