51 #define SPLATCLOUDT_CC 72 typename T::const_iterator idxIter;
73 for( idxIter = _indices.begin(); idxIter != _indices.end(); ++idxIter )
76 int idx =
static_cast<int>( *idxIter );
79 if( (idx >= 0) && (idx <= maxIdx) )
109 indices.push_back( i );
113 unsigned int numDelete = numSplats_ - indices.size();
119 SplatPropertyMap::const_iterator splatPropertyIter;
121 splatPropertyIter->second.property_->crop( indices );
124 numSplats_ = indices.size();
135 template <
typename T>
141 std::vector<int> validIndices;
142 validIndices.reserve( _indices.size() );
145 typename T::const_iterator idxIter;
146 for( idxIter = _indices.begin(); idxIter != _indices.end(); ++idxIter )
149 int idx =
static_cast<int>( *idxIter );
152 if( (idx >= 0) && (idx <= maxIdx) )
153 validIndices.push_back( idx );
157 SplatPropertyMap::const_iterator splatPropertyIter;
159 splatPropertyIter->second.property_->crop( validIndices );
169 template <
typename T>
173 std::vector<T> newData;
174 newData.reserve( _indices.size() );
177 std::vector<int>::const_iterator idxIter;
178 for( idxIter = _indices.begin(); idxIter != _indices.end(); ++idxIter )
179 newData.push_back( data_[ *idxIter ] );
182 data_.swap( newData );
189 template <
typename T>
203 ++iter->second.numRequests_;
231 template <
typename T>
245 ++iter->second.numRequests_;
266 template <
typename T>
283 --iter->second.numRequests_;
286 if( iter->second.numRequests_ == 0 )
305 template <
typename T>
322 --iter->second.numRequests_;
325 if( iter->second.numRequests_ == 0 )
344 template <
typename T>
358 template <
typename T>
372 template <
typename T>
386 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.
CloudPropertyT< T > * getCloudProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.
CloudPropertyT< T > * requestCloudProperty(const PropertyHandleT< T > &_handle)
Request a new property.
CloudPropertyMap cloudProperties_
Cloud-property map.
Index & indices(int _idx)
Get a reference of the predefined property's value.
SplatPropertyT< T > * releaseSplatProperty(const PropertyHandleT< T > &_handle)
Release a property.
unsigned int numSplats_
Number of splats.
SplatPropertyT< T > * requestSplatProperty(const PropertyHandleT< T > &_handle)
Request a new property.
CloudPropertyT< T > * releaseCloudProperty(const PropertyHandleT< T > &_handle)
Release a property.
std::vector< T > data_
The actual stored data (one element per splat)
unsigned int eraseSplatsByIndex(const T &_indices)
Delete the elements with given indices from the data vector of all splat-properties.
virtual void crop(const std::vector< int > &_indices)
Keep only the elements with given indices in the data vector. The indices have to be valid...
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.
SplatPropertyMap splatProperties_
Splat-property map.
SplatPropertyT< T > * getSplatProperty(const PropertyHandleT< T > &_handle)
Get a pointer to a property.