Developer Documentation
SplatCloud.hh
1/*===========================================================================*\
2* *
3* OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39* *
40\*===========================================================================*/
41
42
43
44//================================================================
45//
46// CLASS SplatCloud
47//
48// SplatCloud stores the actual data for a SplatCloud.
49//
50//================================================================
51
52
53#ifndef SPLATCLOUD_HH
54#define SPLATCLOUD_HH
55
56
57//== INCLUDES ====================================================
58
59
61
62#include <typeinfo>
63#include <string>
64#include <map>
65#include <vector>
66#include <algorithm>
67
68#include <ACG/Math/VectorT.hh>
69
70
71//== CLASS DEFINITION ============================================
72
73
79class OBJECTTYPEDLLEXPORT SplatCloud
80{
81
82 // == DECLARATIONS =====================================================
83
84public:
85
87 inline SplatCloud() : numSplats_( 0 )
88 {
89 resetPredefinedSplatPropertyPointers();
90 resetPredefinedCloudPropertyPointers();
91 }
92
94 SplatCloud( const SplatCloud &_splatCloud );
95
97 inline ~SplatCloud() { clear(); }
98
100 inline SplatCloud &operator=( const SplatCloud &_splatCloud ) { SplatCloud temp( _splatCloud ); swap( temp ); return *this; }
101
103 void clear();
104
106 void swap( SplatCloud &_splatCloud );
107
108 //----------------
109
114 void clearSplats();
115
116 //----------------
117
122 void pushbackSplat();
123
124 //----------------
125
132 void resizeSplats( unsigned int _num );
133
134 //----------------
135
145 template <typename T> unsigned int eraseSplatsByIndex( const T &_indices );
146
147 //----------------
148
159 template <typename T> unsigned int eraseSplatsByFlag( const std::vector<T> &_flags );
160
161 //----------------
162
171 template <typename T> void cropSplats( const T &_indices );
172
173 //----------------
174
179 inline unsigned int numSplats() const { return numSplats_; }
180
181 // == MEMBERS =====================================================
182
183private:
184
186 unsigned int numSplats_;
187
188 //----------------------------------------------------------------
189
190
191
192 // +------------------------+
193 // | |
194 // | General Properties |
195 // | |
196 // +------------------------+
197
198 // == TYPEDEFS =====================================================
199
200public:
201
203 typedef std::string BasePropertyHandle;
204
205 //----------------
206
209 {
210 friend class SplatCloud;
211 public:
212 virtual size_t sizeOf() const = 0;
213 virtual const std::type_info &typeId() const = 0;
214 private:
215 virtual inline ~SplatPropertyInterface() { }
216 virtual SplatPropertyInterface *clone() const = 0;
217 virtual void clear() = 0;
218 virtual void pushback() = 0;
219 virtual void resize( unsigned int _num ) = 0;
220 virtual void crop( const std::vector<int> &_indices ) = 0;
221 private:
222 void operator=( const SplatPropertyInterface & ) = delete;
223 };
224
225 //----------------
226
229 {
230 friend class SplatCloud;
231 public:
232 virtual size_t sizeOf() const = 0;
233 virtual const std::type_info &typeId() const = 0;
234 private:
235 virtual inline ~CloudPropertyInterface() { }
236 virtual CloudPropertyInterface *clone() const = 0;
237 private:
238 void operator=( const CloudPropertyInterface & ) = delete;
239 };
240
241 //----------------
242
245 {
246 public:
247 SplatPropertyMapEntry() : property_( 0 ), numRequests_( 0 ) { }
248 SplatPropertyMapEntry( SplatPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { }
249 public:
251 unsigned int numRequests_;
252 };
253
254 //----------------
255
258 {
259 public:
260 CloudPropertyMapEntry() : property_( 0 ), numRequests_( 0 ) { }
261 CloudPropertyMapEntry( CloudPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { }
262 public:
264 unsigned int numRequests_;
265 };
266
267 //----------------
268
270 typedef std::map<BasePropertyHandle, SplatPropertyMapEntry> SplatPropertyMap;
271
272 //----------------
273
275 typedef std::map<BasePropertyHandle, CloudPropertyMapEntry> CloudPropertyMap;
276
277 //----------------
278
279public:
280
282 template <typename T>
284 {
285 public:
286 explicit inline PropertyHandleT( const BasePropertyHandle &_handle ) : BasePropertyHandle( _handle ) { }
287 };
288
289 //----------------
290
292 template <typename T>
294 {
295 friend class SplatCloud;
296 public:
297 typedef T Value;
298 typedef typename std::vector<T>:: reference Reference;
299 typedef typename std::vector<T>::const_reference ConstReference;
300 public:
301 explicit inline SplatPropertyT( const PropertyHandleT<T> &_handle, unsigned int _num ) : data_( _num ) { }
302 inline Reference data( int _idx ) { return data_[ _idx ]; }
303 inline ConstReference data( int _idx ) const { return data_[ _idx ]; }
304 public:
305 virtual inline size_t sizeOf() const override { return sizeof( T ); }
306 virtual inline const std::type_info &typeId() const override { return typeid( T ); }
307 private:
308 virtual inline ~SplatPropertyT() { }
309 virtual inline SplatPropertyT *clone() const override { return new SplatPropertyT<T>( *this ); }
310 virtual inline void clear() override { std::vector<T>().swap( data_ ); }
311 virtual inline void pushback() override { data_.push_back( T() ); }
312 virtual inline void resize( unsigned int _num ) override { data_.resize( _num ); }
313 virtual void crop( const std::vector<int> &_indices ) override;
314 private:
315 void operator=( const SplatPropertyT<T> & ) = delete;
316 private:
317 std::vector<T> data_;
318 };
319
320 //----------------
321
323 template <typename T>
325 {
326 friend class SplatCloud;
327 public:
328 typedef T Value;
329 typedef T & Reference;
330 typedef const T & ConstReference;
331 public:
332 explicit inline CloudPropertyT( const PropertyHandleT<T> &_handle ) { }
333 inline Reference data() { return data_; }
334 inline ConstReference data() const { return data_; }
335 public:
336 virtual inline size_t sizeOf() const override { return sizeof( T ); }
337 virtual inline const std::type_info &typeId() const override { return typeid( T ); }
338 private:
339 virtual inline ~CloudPropertyT() { }
340 virtual inline CloudPropertyT *clone() const override { return new CloudPropertyT<T>( *this ); }
341 private:
342 void operator=( const CloudPropertyT<T> & ) = delete;
343 private:
345 };
346
347 //-- DECLARATIONS ------------------------------------------------
348
349public:
350
353
356
357 //----------------
358
361
375 template <typename T> SplatPropertyT<T> *requestSplatProperty( const PropertyHandleT<T> &_handle );
376 template <typename T> CloudPropertyT<T> *requestCloudProperty( const PropertyHandleT<T> &_handle );
377 template <typename T> inline SplatPropertyT<T> *requestSplatProperty( const BasePropertyHandle &_handle ) { return requestSplatProperty( PropertyHandleT<T>( _handle ) ); }
378 template <typename T> inline CloudPropertyT<T> *requestCloudProperty( const BasePropertyHandle &_handle ) { return requestCloudProperty( PropertyHandleT<T>( _handle ) ); }
380
382
383 //----------------
384
387
400 template <typename T> SplatPropertyT<T> *releaseSplatProperty( const PropertyHandleT<T> &_handle );
401 template <typename T> CloudPropertyT<T> *releaseCloudProperty( const PropertyHandleT<T> &_handle );
402 template <typename T> inline SplatPropertyT<T> *releaseSplatProperty( const BasePropertyHandle &_handle ) { return releaseSplatProperty( PropertyHandleT<T>( _handle ) ); }
403 template <typename T> inline CloudPropertyT<T> *releaseCloudProperty( const BasePropertyHandle &_handle ) { return releaseCloudProperty( PropertyHandleT<T>( _handle ) ); }
405
407
408 //----------------
409
412
422 template <typename T> SplatPropertyT<T> *getSplatProperty( const PropertyHandleT<T> &_handle );
423 template <typename T> const SplatPropertyT<T> *getSplatProperty( const PropertyHandleT<T> &_handle ) const;
424 template <typename T> CloudPropertyT<T> *getCloudProperty( const PropertyHandleT<T> &_handle );
425 template <typename T> const CloudPropertyT<T> *getCloudProperty( const PropertyHandleT<T> &_handle ) const;
426 template <typename T> inline SplatPropertyT<T> *getSplatProperty( const BasePropertyHandle &_handle ) { return getSplatProperty( PropertyHandleT<T>( _handle ) ); }
427 template <typename T> inline const SplatPropertyT<T> *getSplatProperty( const BasePropertyHandle &_handle ) const { return getSplatProperty( PropertyHandleT<T>( _handle ) ); }
428 template <typename T> inline CloudPropertyT<T> *getCloudProperty( const BasePropertyHandle &_handle ) { return getCloudProperty( PropertyHandleT<T>( _handle ) ); }
429 template <typename T> inline const CloudPropertyT<T> *getCloudProperty( const BasePropertyHandle &_handle ) const { return getCloudProperty( PropertyHandleT<T>( _handle ) ); }
431
433
434 //----------------
435
438
447 inline const SplatPropertyMap &splatProperties() const { return splatProperties_; }
448
457 inline const CloudPropertyMap &cloudProperties() const { return cloudProperties_; }
458
460
461 //----------------
462
463private:
464
466 void copySplatProperties( const SplatCloud &_splatCloud );
467
469 void copyCloudProperties( const SplatCloud &_splatCloud );
470
471 // == MEMBERS =====================================================
472
473private:
474
477
480
481 //----------------------------------------------------------------
482
483
484
485 // +---------------------------+
486 // | |
487 // | Predefined Properties |
488 // | |
489 // +---------------------------+
490
491 // == TYPEDEFS =====================================================
492
493public:
494
496 typedef struct
497 {
500 float x_;
501 float y_;
502 } View;
503
504 //----------------
505
508 typedef ACG::Vec3f Position;
509 typedef ACG::Vec3uc Color;
510 typedef ACG::Vec3f Normal;
511 typedef float Pointsize;
512 typedef int Index;
513 typedef std::vector<View> Viewlist;
514 typedef unsigned char Selection; // Do *not* use bool to prevent further trouble because a std::vector<bool>::reference is *not* the same as a reference to bool.
516
517 //----------------
518
521 typedef std::vector<Position > PositionVector;
522 typedef std::vector<Color > ColorVector;
523 typedef std::vector<Normal > NormalVector;
524 typedef std::vector<Pointsize> PointsizeVector;
525 typedef std::vector<Index > IndexVector;
526 typedef std::vector<Viewlist > ViewlistVector;
527 typedef std::vector<Selection> SelectionVector;
529
530 //----------------
531
532private:
533
544
545 //-- DECLARATIONS ------------------------------------------------
546
547public:
548
551
561 inline bool requestPositions() { positionsProperty_ = requestSplatProperty( POSITIONS_HANDLE ); return (positionsProperty_ != 0); }
562 inline bool requestColors() { colorsProperty_ = requestSplatProperty( COLORS_HANDLE ); return (colorsProperty_ != 0); }
563 inline bool requestNormals() { normalsProperty_ = requestSplatProperty( NORMALS_HANDLE ); return (normalsProperty_ != 0); }
564 inline bool requestPointsizes() { pointsizesProperty_ = requestSplatProperty( POINTSIZES_HANDLE ); return (pointsizesProperty_ != 0); }
565 inline bool requestIndices() { indicesProperty_ = requestSplatProperty( INDICES_HANDLE ); return (indicesProperty_ != 0); }
566 inline bool requestViewlists() { viewlistsProperty_ = requestSplatProperty( VIEWLISTS_HANDLE ); return (viewlistsProperty_ != 0); }
567 inline bool requestSelections() { selectionsProperty_ = requestSplatProperty( SELECTIONS_HANDLE ); return (selectionsProperty_ != 0); }
569
571
572 //----------------
573
576
584 inline void releasePositions() { positionsProperty_ = releaseSplatProperty( POSITIONS_HANDLE ); }
585 inline void releaseColors() { colorsProperty_ = releaseSplatProperty( COLORS_HANDLE ); }
586 inline void releaseNormals() { normalsProperty_ = releaseSplatProperty( NORMALS_HANDLE ); }
587 inline void releasePointsizes() { pointsizesProperty_ = releaseSplatProperty( POINTSIZES_HANDLE ); }
588 inline void releaseIndices() { indicesProperty_ = releaseSplatProperty( INDICES_HANDLE ); }
589 inline void releaseViewlists() { viewlistsProperty_ = releaseSplatProperty( VIEWLISTS_HANDLE ); }
590 inline void releaseSelections() { selectionsProperty_ = releaseSplatProperty( SELECTIONS_HANDLE ); }
592
594
595 //----------------
596
599
607 inline bool hasPositions() const { return (positionsProperty_ != 0); }
608 inline bool hasColors() const { return (colorsProperty_ != 0); }
609 inline bool hasNormals() const { return (normalsProperty_ != 0); }
610 inline bool hasPointsizes() const { return (pointsizesProperty_ != 0); }
611 inline bool hasIndices() const { return (indicesProperty_ != 0); }
612 inline bool hasViewlists() const { return (viewlistsProperty_ != 0); }
613 inline bool hasSelections() const { return (selectionsProperty_ != 0); }
615
617
618 //----------------
619
622
631 inline Position &positions ( int _idx ) { return positionsProperty_-> data( _idx ); }
632 inline const Position &positions ( int _idx ) const { return positionsProperty_-> data( _idx ); }
633 inline Color &colors ( int _idx ) { return colorsProperty_-> data( _idx ); }
634 inline const Color &colors ( int _idx ) const { return colorsProperty_-> data( _idx ); }
635 inline Normal &normals ( int _idx ) { return normalsProperty_-> data( _idx ); }
636 inline const Normal &normals ( int _idx ) const { return normalsProperty_-> data( _idx ); }
637 inline Pointsize &pointsizes( int _idx ) { return pointsizesProperty_->data( _idx ); }
638 inline const Pointsize &pointsizes( int _idx ) const { return pointsizesProperty_->data( _idx ); }
639 inline Index &indices ( int _idx ) { return indicesProperty_-> data( _idx ); }
640 inline const Index &indices ( int _idx ) const { return indicesProperty_-> data( _idx ); }
641 inline Viewlist &viewlists ( int _idx ) { return viewlistsProperty_-> data( _idx ); }
642 inline const Viewlist &viewlists ( int _idx ) const { return viewlistsProperty_-> data( _idx ); }
643 inline Selection &selections( int _idx ) { return selectionsProperty_->data( _idx ); }
644 inline const Selection &selections( int _idx ) const { return selectionsProperty_->data( _idx ); }
646
648
649 //----------------
650
651private:
652
655 {
656 positionsProperty_ = 0;
657 colorsProperty_ = 0;
658 normalsProperty_ = 0;
659 pointsizesProperty_ = 0;
660 indicesProperty_ = 0;
661 viewlistsProperty_ = 0;
662 selectionsProperty_ = 0;
663 }
664
667
670 {
671 positionsProperty_ = getSplatProperty( POSITIONS_HANDLE );
672 colorsProperty_ = getSplatProperty( COLORS_HANDLE );
673 normalsProperty_ = getSplatProperty( NORMALS_HANDLE );
674 pointsizesProperty_ = getSplatProperty( POINTSIZES_HANDLE );
675 indicesProperty_ = getSplatProperty( INDICES_HANDLE );
676 viewlistsProperty_ = getSplatProperty( VIEWLISTS_HANDLE );
677 selectionsProperty_ = getSplatProperty( SELECTIONS_HANDLE );
678 }
679
682
685 {
686 std::swap( positionsProperty_, _splatCloud.positionsProperty_ );
687 std::swap( colorsProperty_, _splatCloud.colorsProperty_ );
688 std::swap( normalsProperty_, _splatCloud.normalsProperty_ );
689 std::swap( pointsizesProperty_, _splatCloud.pointsizesProperty_ );
690 std::swap( indicesProperty_, _splatCloud.indicesProperty_ );
691 std::swap( viewlistsProperty_, _splatCloud.viewlistsProperty_ );
692 std::swap( selectionsProperty_, _splatCloud.selectionsProperty_ );
693 }
694
696 inline void swapPredefinedCloudPropertyPointers( SplatCloud &_splatCloud ) { }
697
698 //-- MEMBERS -----------------------------------------------------
699
700private:
701
704 SplatPropertyT<Position> *positionsProperty_;
705 SplatPropertyT<Color> *colorsProperty_;
706 SplatPropertyT<Normal> *normalsProperty_;
707 SplatPropertyT<Pointsize> *pointsizesProperty_;
708 SplatPropertyT<Index> *indicesProperty_;
709 SplatPropertyT<Viewlist> *viewlistsProperty_;
710 SplatPropertyT<Selection> *selectionsProperty_;
712
713 //----------------
714
717 static const PositionsHandle POSITIONS_HANDLE;
718 static const ColorsHandle COLORS_HANDLE;
719 static const NormalsHandle NORMALS_HANDLE;
720 static const PointsizesHandle POINTSIZES_HANDLE;
721 static const IndicesHandle INDICES_HANDLE;
722 static const ViewlistsHandle VIEWLISTS_HANDLE;
723 static const SelectionsHandle SELECTIONS_HANDLE;
725
726 //----------------------------------------------------------------
727
728};
729
730
731//================================================================
732
733
734#if defined(INCLUDE_TEMPLATES) && !defined(SPLATCLOUDT_CC)
735# include "SplatCloudT_impl.hh"
736#endif
737
738
739//================================================================
740
741
742#endif // SPLATCLOUD_HH
The property handle, use it to access the properties.
Definition: Properties.hh:68
void operator=(const CloudPropertyInterface &)=delete
Disallow the assign operator. (private and not implemented)
virtual size_t sizeOf() const =0
Get the size of type.
virtual const std::type_info & typeId() const =0
Get the runtime type information.
virtual ~CloudPropertyInterface()
Destructor.
Definition: SplatCloud.hh:235
virtual CloudPropertyInterface * clone() const =0
Return a deep copy of this.
CloudPropertyMapEntry()
Standard constructor.
Definition: SplatCloud.hh:260
unsigned int numRequests_
The number of times requestCloudProperty() was called and has not been released yet.
Definition: SplatCloud.hh:264
CloudPropertyInterface * property_
A valid pointer to a cloud-property.
Definition: SplatCloud.hh:263
CloudPropertyMapEntry(CloudPropertyInterface *_prop, unsigned int _num)
Constructor.
Definition: SplatCloud.hh:261
virtual ~CloudPropertyT()
Destructor.
Definition: SplatCloud.hh:339
virtual CloudPropertyT * clone() const override
Return a deep copy of this.
Definition: SplatCloud.hh:340
virtual const std::type_info & typeId() const override
Get the runtime type information.
Definition: SplatCloud.hh:337
virtual size_t sizeOf() const override
Get the size of type.
Definition: SplatCloud.hh:336
T data_
The actual stored data.
Definition: SplatCloud.hh:344
const T & ConstReference
These are used only out of a consistency reason to the class SplatPropertyT<T>.
Definition: SplatCloud.hh:330
T & Reference
These are references to T, not to CloudPropertyT<T>.
Definition: SplatCloud.hh:329
void operator=(const CloudPropertyT< T > &)=delete
Disallow the assign operator. (private and not implemented)
CloudPropertyT(const PropertyHandleT< T > &_handle)
Constructor.
Definition: SplatCloud.hh:332
ConstReference data() const
Access the data as const reference.
Definition: SplatCloud.hh:334
Reference data()
Access the data as reference.
Definition: SplatCloud.hh:333
PropertyHandleT(const BasePropertyHandle &_handle)
Constructor.
Definition: SplatCloud.hh:286
virtual ~SplatPropertyInterface()
Destructor.
Definition: SplatCloud.hh:215
virtual void clear()=0
Clear the data vector.
virtual void pushback()=0
Add one element at the end of the data vector.
virtual void resize(unsigned int _num)=0
Resize the data vector.
virtual SplatPropertyInterface * clone() const =0
Return a deep copy of this.
virtual const std::type_info & typeId() const =0
Get the runtime type information.
virtual void crop(const std::vector< int > &_indices)=0
Keep only the elements with given indices in the data vector. The indices have to be valid,...
virtual size_t sizeOf() const =0
Get the size of type.
SplatPropertyInterface * property_
A valid pointer to a splat-property.
Definition: SplatCloud.hh:250
SplatPropertyMapEntry(SplatPropertyInterface *_prop, unsigned int _num)
Constructor.
Definition: SplatCloud.hh:248
SplatPropertyMapEntry()
Standard constructor.
Definition: SplatCloud.hh:247
unsigned int numRequests_
The number of times requestSplatProperty() was called and has not been released yet.
Definition: SplatCloud.hh:251
virtual void resize(unsigned int _num) override
Resize the data vector.
Definition: SplatCloud.hh:312
std::vector< T >::const_reference ConstReference
These are used because a std::vector<bool>::reference is not the same as a reference to bool.
Definition: SplatCloud.hh:299
ConstReference data(int _idx) const
Access the data as const reference.
Definition: SplatCloud.hh:303
Reference data(int _idx)
Access the data as reference.
Definition: SplatCloud.hh:302
virtual void clear() override
Clear the data vector.
Definition: SplatCloud.hh:310
virtual void pushback() override
Add one element at the end of the data vector.
Definition: SplatCloud.hh:311
virtual size_t sizeOf() const override
Get the size of type.
Definition: SplatCloud.hh:305
virtual SplatPropertyT * clone() const override
Return a deep copy of this.
Definition: SplatCloud.hh:309
std::vector< T > data_
The actual stored data (one element per splat)
Definition: SplatCloud.hh:317
virtual ~SplatPropertyT()
Destructor.
Definition: SplatCloud.hh:308
virtual const std::type_info & typeId() const override
Get the runtime type information.
Definition: SplatCloud.hh:306
std::vector< T >::reference Reference
These are references to T, not to SplatPropertyT<T>.
Definition: SplatCloud.hh:298
SplatPropertyT(const PropertyHandleT< T > &_handle, unsigned int _num)
Constructor.
Definition: SplatCloud.hh:301
void getPredefinedSplatPropertyPointers()
Get pointers to predefined splat-properties.
Definition: SplatCloud.hh:669
void releaseColors()
Release the predefined property.
Definition: SplatCloud.hh:585
CloudPropertyT< T > * getCloudProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.
bool hasPointsizes() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:610
SplatPropertyT< T > * releaseSplatProperty(const BasePropertyHandle &_handle)
Release a property.
Definition: SplatCloud.hh:402
Selection & selections(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:643
const CloudPropertyT< T > * getCloudProperty(const BasePropertyHandle &_handle) const
Get a pointer to a property.
Definition: SplatCloud.hh:429
void copyCloudProperties(const SplatCloud &_splatCloud)
Deep copy all cloud-properties.
Definition: SplatCloud.cc:104
void releasePositions()
Release the predefined property.
Definition: SplatCloud.hh:584
void releaseIndices()
Release the predefined property.
Definition: SplatCloud.hh:588
const CloudPropertyMap & cloudProperties() const
Get all cloud-properties.
Definition: SplatCloud.hh:457
void releaseViewlists()
Release the predefined property.
Definition: SplatCloud.hh:589
Pointsize & pointsizes(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:637
void swapPredefinedSplatPropertyPointers(SplatCloud &_splatCloud)
Swap pointers to predefined splat-properties.
Definition: SplatCloud.hh:684
SplatPropertyT< T > * releaseSplatProperty(const PropertyHandleT< T > &_handle)
Release a property.
CloudPropertyT< T > * requestCloudProperty(const BasePropertyHandle &_handle)
Request a new property.
Definition: SplatCloud.hh:378
const Normal & normals(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:636
Viewlist & viewlists(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:641
SplatPropertyMap splatProperties_
Splat-property map.
Definition: SplatCloud.hh:476
CloudPropertyT< T > * requestCloudProperty(const PropertyHandleT< T > &_handle)
Request a new property.
const Position & positions(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:632
CloudPropertyMap cloudProperties_
Cloud-property map.
Definition: SplatCloud.hh:479
void getPredefinedCloudPropertyPointers()
Get pointers to predefined cloud-properties.
Definition: SplatCloud.hh:681
SplatPropertyT< T > * requestSplatProperty(const PropertyHandleT< T > &_handle)
Request a new property.
unsigned int numSplats() const
Get the number of splats.
Definition: SplatCloud.hh:179
void releaseNormals()
Release the predefined property.
Definition: SplatCloud.hh:586
CloudPropertyT< T > * releaseCloudProperty(const BasePropertyHandle &_handle)
Release a property.
Definition: SplatCloud.hh:403
~SplatCloud()
Destructor.
Definition: SplatCloud.hh:97
void resetPredefinedSplatPropertyPointers()
Reset pointers to predefined splat-properties.
Definition: SplatCloud.hh:654
bool hasIndices() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:611
const SplatPropertyT< T > * getSplatProperty(const BasePropertyHandle &_handle) const
Get a pointer to a property.
Definition: SplatCloud.hh:427
const SplatPropertyMap & splatProperties() const
Get all splat-properties.
Definition: SplatCloud.hh:447
bool requestNormals()
Request the predefined property.
Definition: SplatCloud.hh:563
const Viewlist & viewlists(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:642
bool requestPointsizes()
Request the predefined property.
Definition: SplatCloud.hh:564
bool hasPositions() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:607
bool requestViewlists()
Request the predefined property.
Definition: SplatCloud.hh:566
CloudPropertyT< T > * releaseCloudProperty(const PropertyHandleT< T > &_handle)
Release a property.
void resetPredefinedCloudPropertyPointers()
Reset pointers to predefined cloud-properties.
Definition: SplatCloud.hh:666
Position & positions(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:631
std::string BasePropertyHandle
Definition: SplatCloud.hh:203
const Index & indices(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:640
CloudPropertyT< T > * getCloudProperty(const BasePropertyHandle &_handle)
Get a pointer to a property.
Definition: SplatCloud.hh:428
std::map< BasePropertyHandle, SplatPropertyMapEntry > SplatPropertyMap
Definition: SplatCloud.hh:270
void releasePointsizes()
Release the predefined property.
Definition: SplatCloud.hh:587
unsigned int numSplats_
Number of splats.
Definition: SplatCloud.hh:186
bool hasSelections() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:613
bool requestColors()
Request the predefined property.
Definition: SplatCloud.hh:562
const Pointsize & pointsizes(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:638
void clearSplatProperties()
Clear all splat-properties.
Definition: SplatCloud.cc:148
const Color & colors(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:634
bool requestIndices()
Request the predefined property.
Definition: SplatCloud.hh:565
Index & indices(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:639
void clearCloudProperties()
Clear all cloud-properties.
Definition: SplatCloud.cc:166
SplatPropertyT< T > * getSplatProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.
Normal & normals(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:635
void releaseSelections()
Release the predefined property.
Definition: SplatCloud.hh:590
SplatCloud()
Standard constructor.
Definition: SplatCloud.hh:87
void copySplatProperties(const SplatCloud &_splatCloud)
Deep copy all splat-properties.
Definition: SplatCloud.cc:74
SplatPropertyT< T > * requestSplatProperty(const BasePropertyHandle &_handle)
Request a new property.
Definition: SplatCloud.hh:377
SplatCloud & operator=(const SplatCloud &_splatCloud)
Assign operator.
Definition: SplatCloud.hh:100
bool hasNormals() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:609
SplatPropertyT< T > * getSplatProperty(const BasePropertyHandle &_handle)
Get a pointer to a property.
Definition: SplatCloud.hh:426
Color & colors(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:633
std::map< BasePropertyHandle, CloudPropertyMapEntry > CloudPropertyMap
Definition: SplatCloud.hh:275
bool requestPositions()
Request the predefined property.
Definition: SplatCloud.hh:561
void swapPredefinedCloudPropertyPointers(SplatCloud &_splatCloud)
Swap pointers to predefined cloud-properties.
Definition: SplatCloud.hh:696
bool hasColors() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:608
const Selection & selections(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:644
bool hasViewlists() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:612
bool requestSelections()
Request the predefined property.
Definition: SplatCloud.hh:567
@ Color
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:83
float y_
y-coordinate of pixel position
Definition: SplatCloud.hh:501
int featureIdx_
SIFT-feature index.
Definition: SplatCloud.hh:499
float x_
x-coordinate of pixel position
Definition: SplatCloud.hh:500
int cameraObjectId_
Camera-object id.
Definition: SplatCloud.hh:498