Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49
50 //================================================================
51 //
52 // CLASS SplatCloud
53 //
54 // SplatCloud stores the actual data for a SplatCloud.
55 //
56 //================================================================
57
58
59 #ifndef SPLATCLOUD_HH
60 #define SPLATCLOUD_HH
61
62
63 //== INCLUDES ====================================================
64
65
66 #include <OpenFlipper/common/GlobalDefines.hh>
67
68 #include <typeinfo>
69 #include <string>
70 #include <map>
71 #include <vector>
72 #include <algorithm>
73
74 #include <ACG/Math/VectorT.hh>
75
76
77 //== CLASS DEFINITION ============================================
78
79
85 class DLLEXPORT SplatCloud
86 {
87
88 // == DECLARATIONS =====================================================
89
90 public:
91
93 inline SplatCloud() : numSplats_( 0 )
94 {
95 resetPredefinedSplatPropertyPointers();
96 resetPredefinedCloudPropertyPointers();
97 }
98
100 SplatCloud( const SplatCloud &_splatCloud );
101
103 inline ~SplatCloud() { clear(); }
104
106 inline SplatCloud &operator=( const SplatCloud &_splatCloud ) { SplatCloud temp( _splatCloud ); swap( temp ); return *this; }
107
109 void clear();
110
112 void swap( SplatCloud &_splatCloud );
113
114 //----------------
115
120 void clearSplats();
121
122 //----------------
123
128 void pushbackSplat();
129
130 //----------------
131
138 void resizeSplats( unsigned int _num );
139
140 //----------------
141
151 template <typename T> unsigned int eraseSplatsByIndex( const T &_indices );
152
153 //----------------
154
165 template <typename T> unsigned int eraseSplatsByFlag( const std::vector<T> &_flags );
166
167 //----------------
168
177 template <typename T> void cropSplats( const T &_indices );
178
179 //----------------
180
185 inline unsigned int numSplats() const { return numSplats_; }
186
187 // == MEMBERS =====================================================
188
189 private:
190
192 unsigned int numSplats_;
193
194 //----------------------------------------------------------------
195
196
197
198 // +------------------------+
199 // | |
200 // | General Properties |
201 // | |
202 // +------------------------+
203
204 // == TYPEDEFS =====================================================
205
206 public:
207
209 typedef std::string BasePropertyHandle;
210
211 //----------------
212
214 class SplatPropertyInterface
215 {
216 friend class SplatCloud;
217 public:
218 virtual size_t sizeOf() const = 0;
219 virtual const std::type_info &typeId() const = 0;
220 private:
221 virtual inline ~SplatPropertyInterface() { }
222 virtual SplatPropertyInterface *clone() const = 0;
223 virtual void clear() = 0;
224 virtual void pushback() = 0;
225 virtual void resize( unsigned int _num ) = 0;
226 virtual void crop( const std::vector<int> &_indices ) = 0;
227 private:
228 void operator=( const SplatPropertyInterface & );
229 };
230
231 //----------------
232
234 class CloudPropertyInterface
235 {
236 friend class SplatCloud;
237 public:
238 virtual size_t sizeOf() const = 0;
239 virtual const std::type_info &typeId() const = 0;
240 private:
241 virtual inline ~CloudPropertyInterface() { }
242 virtual CloudPropertyInterface *clone() const = 0;
243 private:
244 void operator=( const CloudPropertyInterface & );
245 };
246
247 //----------------
248
250 class SplatPropertyMapEntry
251 {
252 public:
253 SplatPropertyMapEntry() : property_( 0 ), numRequests_( 0 ) { }
254 SplatPropertyMapEntry( SplatPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { }
255 public:
256 SplatPropertyInterface *property_;
257 unsigned int numRequests_;
258 };
259
260 //----------------
261
263 class CloudPropertyMapEntry
264 {
265 public:
266 CloudPropertyMapEntry() : property_( 0 ), numRequests_( 0 ) { }
267 CloudPropertyMapEntry( CloudPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { }
268 public:
269 CloudPropertyInterface *property_;
270 unsigned int numRequests_;
271 };
272
273 //----------------
274
276 typedef std::map<BasePropertyHandle, SplatPropertyMapEntry> SplatPropertyMap;
277
278 //----------------
279
281 typedef std::map<BasePropertyHandle, CloudPropertyMapEntry> CloudPropertyMap;
282
283 //----------------
284
285 public:
286
288 template <typename T>
289 class PropertyHandleT : public BasePropertyHandle
290 {
291 public:
292 explicit inline PropertyHandleT<T>( const BasePropertyHandle &_handle ) : BasePropertyHandle( _handle ) { }
293 };
294
295 //----------------
296
298 template <typename T>
299 class SplatPropertyT : public SplatPropertyInterface
300 {
301 friend class SplatCloud;
302 public:
303 typedef T Value;
304 typedef typename std::vector<T>:: reference Reference;
305 typedef typename std::vector<T>::const_reference ConstReference;
306 public:
307 explicit inline SplatPropertyT<T>( const PropertyHandleT<T> &_handle, unsigned int _num ) : data_( _num ) { }
308 inline Reference data( int _idx ) { return data_[ _idx ]; }
309 inline ConstReference data( int _idx ) const { return data_[ _idx ]; }
310 public:
311 virtual inline size_t sizeOf() const { return sizeof( T ); }
312 virtual inline const std::type_info &typeId() const { return typeid( T ); }
313 private:
314 virtual inline ~SplatPropertyT<T>() { }
315 virtual inline SplatPropertyT<T> *clone() const { return new SplatPropertyT<T>( *this ); }
316 virtual inline void clear() { std::vector<T>().swap( data_ ); }
317 virtual inline void pushback() { data_.push_back( T() ); }
318 virtual inline void resize( unsigned int _num ) { data_.resize( _num ); }
319 virtual void crop( const std::vector<int> &_indices );
320 private:
321 void operator=( const SplatPropertyT<T> & );
322 private:
323 std::vector<T> data_;
324 };
325
326 //----------------
327
329 template <typename T>
330 class CloudPropertyT : public CloudPropertyInterface
331 {
332 friend class SplatCloud;
333 public:
334 typedef T Value;
335 typedef T & Reference;
336 typedef const T & ConstReference;
337 public:
338 explicit inline CloudPropertyT<T>( const PropertyHandleT<T> &_handle ) { }
339 inline Reference data() { return data_; }
340 inline ConstReference data() const { return data_; }
341 public:
342 virtual inline size_t sizeOf() const { return sizeof( T ); }
343 virtual inline const std::type_info &typeId() const { return typeid( T ); }
344 private:
345 virtual inline ~CloudPropertyT<T>() { }
346 virtual inline CloudPropertyT<T> *clone() const { return new CloudPropertyT<T>( *this ); }
347 private:
348 void operator=( const CloudPropertyT<T> & );
349 private:
350 T data_;
351 };
352
353 //-- DECLARATIONS ------------------------------------------------
354
355 public:
356
358 void clearSplatProperties();
359
361 void clearCloudProperties();
362
363 //----------------
364
366
380 template <typename T> SplatPropertyT<T> *requestSplatProperty( const PropertyHandleT<T> &_handle );
382 template <typename T> CloudPropertyT<T> *requestCloudProperty( const PropertyHandleT<T> &_handle );
383 template <typename T> inline SplatPropertyT<T> *requestSplatProperty( const BasePropertyHandle &_handle ) { return requestSplatProperty( PropertyHandleT<T>( _handle ) ); }
384 template <typename T> inline CloudPropertyT<T> *requestCloudProperty( const BasePropertyHandle &_handle ) { return requestCloudProperty( PropertyHandleT<T>( _handle ) ); }
386
388
389 //----------------
390
392
405 template <typename T> SplatPropertyT<T> *releaseSplatProperty( const PropertyHandleT<T> &_handle );
407 template <typename T> CloudPropertyT<T> *releaseCloudProperty( const PropertyHandleT<T> &_handle );
408 template <typename T> inline SplatPropertyT<T> *releaseSplatProperty( const BasePropertyHandle &_handle ) { return releaseSplatProperty( PropertyHandleT<T>( _handle ) ); }
409 template <typename T> inline CloudPropertyT<T> *releaseCloudProperty( const BasePropertyHandle &_handle ) { return releaseCloudProperty( PropertyHandleT<T>( _handle ) ); }
411
413
414 //----------------
415
417
427 template <typename T> SplatPropertyT<T> *getSplatProperty( const PropertyHandleT<T> &_handle );
429 template <typename T> const SplatPropertyT<T> *getSplatProperty( const PropertyHandleT<T> &_handle ) const;
430 template <typename T> CloudPropertyT<T> *getCloudProperty( const PropertyHandleT<T> &_handle );
431 template <typename T> const CloudPropertyT<T> *getCloudProperty( const PropertyHandleT<T> &_handle ) const;
432 template <typename T> inline SplatPropertyT<T> *getSplatProperty( const BasePropertyHandle &_handle ) { return getSplatProperty( PropertyHandleT<T>( _handle ) ); }
433 template <typename T> inline const SplatPropertyT<T> *getSplatProperty( const BasePropertyHandle &_handle ) const { return getSplatProperty( PropertyHandleT<T>( _handle ) ); }
434 template <typename T> inline CloudPropertyT<T> *getCloudProperty( const BasePropertyHandle &_handle ) { return getCloudProperty( PropertyHandleT<T>( _handle ) ); }
435 template <typename T> inline const CloudPropertyT<T> *getCloudProperty( const BasePropertyHandle &_handle ) const { return getCloudProperty( PropertyHandleT<T>( _handle ) ); }
437
439
440 //----------------
441
443
453 inline const SplatPropertyMap &splatProperties() const { return splatProperties_; }
454
463 inline const CloudPropertyMap &cloudProperties() const { return cloudProperties_; }
464
466
467 //----------------
468
469 private:
470
472 void copySplatProperties( const SplatCloud &_splatCloud );
473
475 void copyCloudProperties( const SplatCloud &_splatCloud );
476
477 // == MEMBERS =====================================================
478
479 private:
480
482 SplatPropertyMap splatProperties_;
483
485 CloudPropertyMap cloudProperties_;
486
487 //----------------------------------------------------------------
488
489
490
491 // +---------------------------+
492 // | |
493 // | Predefined Properties |
494 // | |
495 // +---------------------------+
496
497 // == TYPEDEFS =====================================================
498
499 public:
500
502 typedef struct
503 {
504 int cameraObjectId_;
505 int featureIdx_;
506 float x_;
507 float y_;
508 } View;
509
510 //----------------
511
513 typedef ACG::Vec3f Position;
515 typedef ACG::Vec3uc Color;
516 typedef ACG::Vec3f Normal;
517 typedef float Pointsize;
518 typedef int Index;
519 typedef std::vector<View> Viewlist;
520 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.
522
523 //----------------
524
526 typedef std::vector<Position > PositionVector;
528 typedef std::vector<Color > ColorVector;
529 typedef std::vector<Normal > NormalVector;
530 typedef std::vector<Pointsize> PointsizeVector;
531 typedef std::vector<Index > IndexVector;
532 typedef std::vector<Viewlist > ViewlistVector;
533 typedef std::vector<Selection> SelectionVector;
535
536 //----------------
537
538 private:
539
541 typedef PropertyHandleT<Position > PositionsHandle;
543 typedef PropertyHandleT<Color > ColorsHandle;
544 typedef PropertyHandleT<Normal > NormalsHandle;
545 typedef PropertyHandleT<Pointsize> PointsizesHandle;
546 typedef PropertyHandleT<Index > IndicesHandle;
547 typedef PropertyHandleT<Viewlist > ViewlistsHandle;
548 typedef PropertyHandleT<Selection> SelectionsHandle;
550
551 //-- DECLARATIONS ------------------------------------------------
552
553 public:
554
556
566 inline bool requestPositions() { positionsProperty_ = requestSplatProperty( POSITIONS_HANDLE ); return (positionsProperty_ != 0); }
568 inline bool requestColors() { colorsProperty_ = requestSplatProperty( COLORS_HANDLE ); return (colorsProperty_ != 0); }
569 inline bool requestNormals() { normalsProperty_ = requestSplatProperty( NORMALS_HANDLE ); return (normalsProperty_ != 0); }
570 inline bool requestPointsizes() { pointsizesProperty_ = requestSplatProperty( POINTSIZES_HANDLE ); return (pointsizesProperty_ != 0); }
571 inline bool requestIndices() { indicesProperty_ = requestSplatProperty( INDICES_HANDLE ); return (indicesProperty_ != 0); }
572 inline bool requestViewlists() { viewlistsProperty_ = requestSplatProperty( VIEWLISTS_HANDLE ); return (viewlistsProperty_ != 0); }
573 inline bool requestSelections() { selectionsProperty_ = requestSplatProperty( SELECTIONS_HANDLE ); return (selectionsProperty_ != 0); }
575
577
578 //----------------
579
581
589 inline void releasePositions() { positionsProperty_ = releaseSplatProperty( POSITIONS_HANDLE ); }
591 inline void releaseColors() { colorsProperty_ = releaseSplatProperty( COLORS_HANDLE ); }
592 inline void releaseNormals() { normalsProperty_ = releaseSplatProperty( NORMALS_HANDLE ); }
593 inline void releasePointsizes() { pointsizesProperty_ = releaseSplatProperty( POINTSIZES_HANDLE ); }
594 inline void releaseIndices() { indicesProperty_ = releaseSplatProperty( INDICES_HANDLE ); }
595 inline void releaseViewlists() { viewlistsProperty_ = releaseSplatProperty( VIEWLISTS_HANDLE ); }
596 inline void releaseSelections() { selectionsProperty_ = releaseSplatProperty( SELECTIONS_HANDLE ); }
598
600
601 //----------------
602
604
612 inline bool hasPositions() const { return (positionsProperty_ != 0); }
614 inline bool hasColors() const { return (colorsProperty_ != 0); }
615 inline bool hasNormals() const { return (normalsProperty_ != 0); }
616 inline bool hasPointsizes() const { return (pointsizesProperty_ != 0); }
617 inline bool hasIndices() const { return (indicesProperty_ != 0); }
618 inline bool hasViewlists() const { return (viewlistsProperty_ != 0); }
619 inline bool hasSelections() const { return (selectionsProperty_ != 0); }
621
623
624 //----------------
625
627
636 inline Position &positions ( int _idx ) { return positionsProperty_-> data( _idx ); }
638 inline const Position &positions ( int _idx ) const { return positionsProperty_-> data( _idx ); }
639 inline Color &colors ( int _idx ) { return colorsProperty_-> data( _idx ); }
640 inline const Color &colors ( int _idx ) const { return colorsProperty_-> data( _idx ); }
641 inline Normal &normals ( int _idx ) { return normalsProperty_-> data( _idx ); }
642 inline const Normal &normals ( int _idx ) const { return normalsProperty_-> data( _idx ); }
643 inline Pointsize &pointsizes( int _idx ) { return pointsizesProperty_->data( _idx ); }
644 inline const Pointsize &pointsizes( int _idx ) const { return pointsizesProperty_->data( _idx ); }
645 inline Index &indices ( int _idx ) { return indicesProperty_-> data( _idx ); }
646 inline const Index &indices ( int _idx ) const { return indicesProperty_-> data( _idx ); }
647 inline Viewlist &viewlists ( int _idx ) { return viewlistsProperty_-> data( _idx ); }
648 inline const Viewlist &viewlists ( int _idx ) const { return viewlistsProperty_-> data( _idx ); }
649 inline Selection &selections( int _idx ) { return selectionsProperty_->data( _idx ); }
650 inline const Selection &selections( int _idx ) const { return selectionsProperty_->data( _idx ); }
652
654
655 //----------------
656
657 private:
658
660 inline void resetPredefinedSplatPropertyPointers()
661 {
662 positionsProperty_ = 0;
663 colorsProperty_ = 0;
664 normalsProperty_ = 0;
665 pointsizesProperty_ = 0;
666 indicesProperty_ = 0;
667 viewlistsProperty_ = 0;
668 selectionsProperty_ = 0;
669 }
670
672 inline void resetPredefinedCloudPropertyPointers() { }
673
675 inline void getPredefinedSplatPropertyPointers()
676 {
677 positionsProperty_ = getSplatProperty( POSITIONS_HANDLE );
678 colorsProperty_ = getSplatProperty( COLORS_HANDLE );
679 normalsProperty_ = getSplatProperty( NORMALS_HANDLE );
680 pointsizesProperty_ = getSplatProperty( POINTSIZES_HANDLE );
681 indicesProperty_ = getSplatProperty( INDICES_HANDLE );
682 viewlistsProperty_ = getSplatProperty( VIEWLISTS_HANDLE );
683 selectionsProperty_ = getSplatProperty( SELECTIONS_HANDLE );
684 }
685
687 inline void getPredefinedCloudPropertyPointers() { }
688
690 inline void swapPredefinedSplatPropertyPointers( SplatCloud &_splatCloud )
691 {
692 std::swap( positionsProperty_, _splatCloud.positionsProperty_ );
693 std::swap( colorsProperty_, _splatCloud.colorsProperty_ );
694 std::swap( normalsProperty_, _splatCloud.normalsProperty_ );
695 std::swap( pointsizesProperty_, _splatCloud.pointsizesProperty_ );
696 std::swap( indicesProperty_, _splatCloud.indicesProperty_ );
697 std::swap( viewlistsProperty_, _splatCloud.viewlistsProperty_ );
698 std::swap( selectionsProperty_, _splatCloud.selectionsProperty_ );
699 }
700
702 inline void swapPredefinedCloudPropertyPointers( SplatCloud &_splatCloud ) { }
703
704 //-- MEMBERS -----------------------------------------------------
705
706 private:
707
709 SplatPropertyT<Position> *positionsProperty_;
711 SplatPropertyT<Color> *colorsProperty_;
712 SplatPropertyT<Normal> *normalsProperty_;
713 SplatPropertyT<Pointsize> *pointsizesProperty_;
714 SplatPropertyT<Index> *indicesProperty_;
715 SplatPropertyT<Viewlist> *viewlistsProperty_;
716 SplatPropertyT<Selection> *selectionsProperty_;
718
719 //----------------
720
722 static const PositionsHandle POSITIONS_HANDLE;
724 static const ColorsHandle COLORS_HANDLE;
725 static const NormalsHandle NORMALS_HANDLE;
726 static const PointsizesHandle POINTSIZES_HANDLE;
727 static const IndicesHandle INDICES_HANDLE;
728 static const ViewlistsHandle VIEWLISTS_HANDLE;
729 static const SelectionsHandle SELECTIONS_HANDLE;
731
732 //----------------------------------------------------------------
733
734 };
735
736
737 //================================================================
738
739
740 #if defined(INCLUDE_TEMPLATES) && !defined(SPLATCLOUDT_CC)
741 # include "SplatCloudT.cc"
742 #endif
743
744
745 //================================================================
746
747
748 #endif // SPLATCLOUD_HH
typeId
DLLEXPORT DataType typeId(QString _name)
Given a dataType Identifier string this function will return the id of the datatype.
Definition: Types.cc:150
SplatCloud::requestIndices
bool requestIndices()
Request the predefined property.
Definition: SplatCloud.hh:571
SplatCloud::cloudProperties_
CloudPropertyMap cloudProperties_
Cloud-property map.
Definition: SplatCloud.hh:485
SplatCloud::splatProperties_
SplatPropertyMap splatProperties_
Splat-property map.
Definition: SplatCloud.hh:482
OpenMesh::Attributes::Color
Add colors to mesh item (vertices/faces/edges)
Definition: Attributes.hh:88
SplatCloud::CloudPropertyMapEntry::numRequests_
unsigned int numRequests_
The number of times requestCloudProperty() was called and has not been released yet.
Definition: SplatCloud.hh:270
SplatCloud::hasPositions
bool hasPositions() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:613
SplatCloud::swapPredefinedSplatPropertyPointers
void swapPredefinedSplatPropertyPointers(SplatCloud &_splatCloud)
Swap pointers to predefined splat-properties.
Definition: SplatCloud.hh:690
SplatCloud::releaseViewlists
void releaseViewlists()
Release the predefined property.
Definition: SplatCloud.hh:595
SplatCloud::CloudPropertyT::sizeOf
virtual size_t sizeOf() const
Get the size of type.
Definition: SplatCloud.hh:342
SplatCloud::releaseIndices
void releaseIndices()
Release the predefined property.
Definition: SplatCloud.hh:594
SplatCloud::requestViewlists
bool requestViewlists()
Request the predefined property.
Definition: SplatCloud.hh:572
SplatCloud::requestCloudProperty
CloudPropertyT< T > * requestCloudProperty(const PropertyHandleT< T > &_handle)
Request a new property.
Definition: SplatCloudT.cc:238
SplatCloud::View::x_
float x_
x-coordinate of pixel position
Definition: SplatCloud.hh:506
SplatCloud::requestSplatProperty
SplatPropertyT< T > * requestSplatProperty(const BasePropertyHandle &_handle)
Request a new property.
Definition: SplatCloud.hh:383
SplatCloud::CloudPropertyT::data_
T data_
The actual stored data.
Definition: SplatCloud.hh:350
SplatCloud::indices
Index & indices(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:645
SplatCloud::SplatPropertyT::clear
virtual void clear()
Clear the data vector.
Definition: SplatCloud.hh:316
SplatCloud::clearCloudProperties
void clearCloudProperties()
Clear all cloud-properties.
Definition: SplatCloud.cc:172
SplatCloud::viewlists
const Viewlist & viewlists(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:648
SplatCloud::CloudPropertyT::ConstReference
const T & ConstReference
These are used only out of a consistency reason to the class SplatPropertyT.
Definition: SplatCloud.hh:336
SplatCloud::SplatPropertyT::data
Reference data(int _idx)
Access the data as reference.
Definition: SplatCloud.hh:308
SplatCloud::SplatPropertyInterface::~SplatPropertyInterface
virtual ~SplatPropertyInterface()
Destructor.
Definition: SplatCloud.hh:221
SplatCloud::requestSelections
bool requestSelections()
Request the predefined property.
Definition: SplatCloud.hh:573
SplatCloud::SplatPropertyMap
std::map< BasePropertyHandle, SplatPropertyMapEntry > SplatPropertyMap
Definition: SplatCloud.hh:276
SplatCloud::SplatPropertyMapEntry::SplatPropertyMapEntry
SplatPropertyMapEntry(SplatPropertyInterface *_prop, unsigned int _num)
Constructor.
Definition: SplatCloud.hh:254
SplatCloud::pointsizes
Pointsize & pointsizes(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:643
SplatCloud::normals
Normal & normals(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:641
SplatCloud::hasNormals
bool hasNormals() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:615
SplatCloud::releaseNormals
void releaseNormals()
Release the predefined property.
Definition: SplatCloud.hh:592
SplatCloud::splatProperties
const SplatPropertyMap & splatProperties() const
Get all splat-properties.
Definition: SplatCloud.hh:453
SplatCloud::CloudPropertyT::clone
virtual CloudPropertyT< T > * clone() const
Return a deep copy of this.
Definition: SplatCloud.hh:346
SplatCloud::colors
Color & colors(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:639
GlobalDefines.hh
SplatCloud::SplatPropertyT
Definition: SplatCloud.hh:299
SplatCloud::clearSplatProperties
void clearSplatProperties()
Clear all splat-properties.
Definition: SplatCloud.cc:154
SplatCloud::selections
Selection & selections(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:649
SplatCloud::releaseSplatProperty
SplatPropertyT< T > * releaseSplatProperty(const PropertyHandleT< T > &_handle)
Release a property.
Definition: SplatCloudT.cc:273
SplatCloud::BasePropertyHandle
std::string BasePropertyHandle
Definition: SplatCloud.hh:209
SplatCloud::getSplatProperty
const SplatPropertyT< T > * getSplatProperty(const BasePropertyHandle &_handle) const
Get a pointer to a property.
Definition: SplatCloud.hh:433
SplatCloud::copySplatProperties
void copySplatProperties(const SplatCloud &_splatCloud)
Deep copy all splat-properties.
Definition: SplatCloud.cc:80
SplatCloud::getSplatProperty
SplatPropertyT< T > * getSplatProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.
Definition: SplatCloudT.cc:351
SplatCloud::PropertyHandleT
Definition: SplatCloud.hh:289
SplatCloud::SplatPropertyT::sizeOf
virtual size_t sizeOf() const
Get the size of type.
Definition: SplatCloud.hh:311
SplatCloud::clear
void clear()
Remove all properties and reset the number of splats.
Definition: SplatCloud.cc:190
SplatCloud::pointsizes
const Pointsize & pointsizes(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:644
SplatCloud::numSplats
unsigned int numSplats() const
Get the number of splats.
Definition: SplatCloud.hh:185
SplatCloud::resetPredefinedCloudPropertyPointers
void resetPredefinedCloudPropertyPointers()
Reset pointers to predefined cloud-properties.
Definition: SplatCloud.hh:672
SplatCloud::requestNormals
bool requestNormals()
Request the predefined property.
Definition: SplatCloud.hh:569
SplatCloud::releaseSelections
void releaseSelections()
Release the predefined property.
Definition: SplatCloud.hh:596
SplatCloud::CloudPropertyMap
std::map< BasePropertyHandle, CloudPropertyMapEntry > CloudPropertyMap
Definition: SplatCloud.hh:281
SplatCloud::colors
const Color & colors(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:640
SplatCloud::CloudPropertyT::typeId
virtual const std::type_info & typeId() const
Get the runtime type information.
Definition: SplatCloud.hh:343
SplatCloud::getPredefinedCloudPropertyPointers
void getPredefinedCloudPropertyPointers()
Get pointers to predefined cloud-properties.
Definition: SplatCloud.hh:687
SplatCloud::getPredefinedSplatPropertyPointers
void getPredefinedSplatPropertyPointers()
Get pointers to predefined splat-properties.
Definition: SplatCloud.hh:675
SplatCloud::SplatPropertyT::resize
virtual void resize(unsigned int _num)
Resize the data vector.
Definition: SplatCloud.hh:318
SplatCloud::SplatPropertyT::clone
virtual SplatPropertyT< T > * clone() const
Return a deep copy of this.
Definition: SplatCloud.hh:315
SplatCloud::releasePointsizes
void releasePointsizes()
Release the predefined property.
Definition: SplatCloud.hh:593
SplatCloud::releaseSplatProperty
SplatPropertyT< T > * releaseSplatProperty(const BasePropertyHandle &_handle)
Release a property.
Definition: SplatCloud.hh:408
SplatCloud::hasViewlists
bool hasViewlists() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:618
SplatCloud::CloudPropertyMapEntry::property_
CloudPropertyInterface * property_
A valid pointer to a cloud-property.
Definition: SplatCloud.hh:269
SplatCloud::CloudPropertyMapEntry::CloudPropertyMapEntry
CloudPropertyMapEntry(CloudPropertyInterface *_prop, unsigned int _num)
Constructor.
Definition: SplatCloud.hh:267
SplatCloud::releaseCloudProperty
CloudPropertyT< T > * releaseCloudProperty(const BasePropertyHandle &_handle)
Release a property.
Definition: SplatCloud.hh:409
SplatCloud::positions
Position & positions(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:637
SplatCloud::CloudPropertyT::Reference
T & Reference
These are references to T, not to CloudPropertyT.
Definition: SplatCloud.hh:335
SplatCloud::CloudPropertyMapEntry
Definition: SplatCloud.hh:263
SplatCloud::View::featureIdx_
int featureIdx_
SIFT-feature index.
Definition: SplatCloud.hh:505
SplatCloud::resetPredefinedSplatPropertyPointers
void resetPredefinedSplatPropertyPointers()
Reset pointers to predefined splat-properties.
Definition: SplatCloud.hh:660
SplatCloud::SplatCloud
SplatCloud()
Standard constructor.
Definition: SplatCloud.hh:93
SplatCloud::hasPointsizes
bool hasPointsizes() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:616
SplatCloud::SplatPropertyT::pushback
virtual void pushback()
Add one element at the end of the data vector.
Definition: SplatCloud.hh:317
SplatCloud::CloudPropertyMapEntry::CloudPropertyMapEntry
CloudPropertyMapEntry()
Standard constructor.
Definition: SplatCloud.hh:266
SplatCloud::CloudPropertyT::Value
T Value
Value type.
Definition: SplatCloud.hh:334
OpenMesh::VectorT
Definition: Vector11T.hh:83
SplatCloud::SplatPropertyMapEntry
Definition: SplatCloud.hh:250
SplatCloud::SplatPropertyT::Value
T Value
Value type.
Definition: SplatCloud.hh:303
SplatCloud::getCloudProperty
const CloudPropertyT< T > * getCloudProperty(const BasePropertyHandle &_handle) const
Get a pointer to a property.
Definition: SplatCloud.hh:435
SplatCloud::CloudPropertyT::data
Reference data()
Access the data as reference.
Definition: SplatCloud.hh:339
SplatCloud::requestPositions
bool requestPositions()
Request the predefined property.
Definition: SplatCloud.hh:567
SplatCloud::releaseCloudProperty
CloudPropertyT< T > * releaseCloudProperty(const PropertyHandleT< T > &_handle)
Release a property.
Definition: SplatCloudT.cc:312
SplatCloud::copyCloudProperties
void copyCloudProperties(const SplatCloud &_splatCloud)
Deep copy all cloud-properties.
Definition: SplatCloud.cc:110
SplatCloud::getCloudProperty
CloudPropertyT< T > * getCloudProperty(const BasePropertyHandle &_handle)
Get a pointer to a property.
Definition: SplatCloud.hh:434
SplatCloud::SplatPropertyMapEntry::numRequests_
unsigned int numRequests_
The number of times requestSplatProperty() was called and has not been released yet.
Definition: SplatCloud.hh:257
SplatCloud::swap
void swap(SplatCloud &_splatCloud)
Swap the content.
Definition: SplatCloud.cc:204
SplatCloud::getSplatProperty
SplatPropertyT< T > * getSplatProperty(const BasePropertyHandle &_handle)
Get a pointer to a property.
Definition: SplatCloud.hh:432
SplatCloud::CloudPropertyInterface::~CloudPropertyInterface
virtual ~CloudPropertyInterface()
Destructor.
Definition: SplatCloud.hh:241
SplatCloud::selections
const Selection & selections(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:650
DLLEXPORT
#define DLLEXPORT
Definition: GlobalDefines.hh:107
SplatCloud::CloudPropertyT
Definition: SplatCloud.hh:330
SplatCloud::normals
const Normal & normals(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:642
SplatCloud::operator=
SplatCloud & operator=(const SplatCloud &_splatCloud)
Assign operator.
Definition: SplatCloud.hh:106
SplatCloud::SplatPropertyMapEntry::property_
SplatPropertyInterface * property_
A valid pointer to a splat-property.
Definition: SplatCloud.hh:256
SplatCloud::requestPointsizes
bool requestPointsizes()
Request the predefined property.
Definition: SplatCloud.hh:570
SplatCloud::CloudPropertyInterface
Definition: SplatCloud.hh:234
SplatCloud::SplatPropertyMapEntry::SplatPropertyMapEntry
SplatPropertyMapEntry()
Standard constructor.
Definition: SplatCloud.hh:253
OpenMesh::Attributes::Normal
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:87
SplatCloud::View
Definition: SplatCloud.hh:502
SplatCloud::CloudPropertyT::data
ConstReference data() const
Access the data as const reference.
Definition: SplatCloud.hh:340
SplatCloud::SplatPropertyInterface
Definition: SplatCloud.hh:214
SplatCloud::SplatPropertyT::data
ConstReference data(int _idx) const
Access the data as const reference.
Definition: SplatCloud.hh:309
SplatCloud::requestCloudProperty
CloudPropertyT< T > * requestCloudProperty(const BasePropertyHandle &_handle)
Request a new property.
Definition: SplatCloud.hh:384
SplatCloud::viewlists
Viewlist & viewlists(int _idx)
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:647
SplatCloud
Definition: SplatCloud.hh:85
SplatCloud::swapPredefinedCloudPropertyPointers
void swapPredefinedCloudPropertyPointers(SplatCloud &_splatCloud)
Swap pointers to predefined cloud-properties.
Definition: SplatCloud.hh:702
SplatCloud::indices
const Index & indices(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:646
SplatCloud::~SplatCloud
~SplatCloud()
Destructor.
Definition: SplatCloud.hh:103
SplatCloud::SplatPropertyT::ConstReference
std::vector< T >::const_reference ConstReference
These are used because a std::vector::reference is not the same as a reference to bool...
Definition: SplatCloud.hh:305
SplatCloud::requestColors
bool requestColors()
Request the predefined property.
Definition: SplatCloud.hh:568
SplatCloud::SplatPropertyT::data_
std::vector< T > data_
The actual stored data (one element per splat)
Definition: SplatCloud.hh:323
SplatCloud::getCloudProperty
CloudPropertyT< T > * getCloudProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.
Definition: SplatCloudT.cc:379
SplatCloud::View::y_
float y_
y-coordinate of pixel position
Definition: SplatCloud.hh:507
SplatCloud::cloudProperties
const CloudPropertyMap & cloudProperties() const
Get all cloud-properties.
Definition: SplatCloud.hh:463
SplatCloud::SplatPropertyT::typeId
virtual const std::type_info & typeId() const
Get the runtime type information.
Definition: SplatCloud.hh:312
SplatCloud::hasColors
bool hasColors() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:614
PropertyHandleT
The property handle, use it to access the properties.
Definition: Properties.hh:75
SplatCloud::hasSelections
bool hasSelections() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:619
SplatCloud::numSplats_
unsigned int numSplats_
Number of splats.
Definition: SplatCloud.hh:192
SplatCloud::requestSplatProperty
SplatPropertyT< T > * requestSplatProperty(const PropertyHandleT< T > &_handle)
Request a new property.
Definition: SplatCloudT.cc:196
SplatCloud::hasIndices
bool hasIndices() const
Return the availability of the predefined property.
Definition: SplatCloud.hh:617
SplatCloud::positions
const Position & positions(int _idx) const
Get a reference of the predefined property's value.
Definition: SplatCloud.hh:638
SplatCloud::releasePositions
void releasePositions()
Release the predefined property.
Definition: SplatCloud.hh:590
SplatCloud::View::cameraObjectId_
int cameraObjectId_
Camera-object id.
Definition: SplatCloud.hh:504
SplatCloud::SplatPropertyT::Reference
std::vector< T >::reference Reference
These are references to T, not to SplatPropertyT.
Definition: SplatCloud.hh:304
SplatCloud::releaseColors
void releaseColors()
Release the predefined property.
Definition: SplatCloud.hh:591