HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator Struct Reference

Provides accelerated range and nearest-neighbor searches for particles that are partitioned using the ParticleAtlas. More...

#include <ParticleAtlas.h>

Public Types

using TreeType = typename PointIndexGridType::TreeType
 
using ConstAccessor = tree::ValueAccessor< const TreeType >
 
using ConstAccessorPtr = std::unique_ptr< ConstAccessor >
 

Public Member Functions

 Iterator (const ParticleAtlas &atlas)
 Construct an iterator from the given atlas. More...
 
template<typename ParticleArrayType >
void worldSpaceSearchAndUpdate (const Vec3d &center, double radius, const ParticleArrayType &particles)
 Clear the iterator and update it with the result of the given world-space radial query. More...
 
template<typename ParticleArrayType >
void worldSpaceSearchAndUpdate (const BBoxd &bbox, const ParticleArrayType &particles)
 Clear the iterator and update it with the result of the given world-space radial query. More...
 
size_t levels () const
 Returns the total number of resolution levels. More...
 
void updateFromLevel (size_t level)
 Clear the iterator and update it with all particles that reside at the given resolution level. More...
 
void reset ()
 Reset the iterator to point to the first item. More...
 
const IndexTypeoperator* () const
 Return a const reference to the item to which this iterator is pointing. More...
 
void increment ()
 Advance iterator to next item. More...
 
void operator++ ()
 Advance iterator to next item. More...
 
bool next ()
 Advance iterator to next item. More...
 
size_t size () const
 Return the number of point indices in the iterator range. More...
 
bool operator== (const Iterator &p) const
 Return true if both iterators point to the same element. More...
 
bool operator!= (const Iterator &p) const
 
bool test () const
 Return true if this iterator is not yet exhausted. More...
 
 operator bool () const
 Return true if this iterator is not yet exhausted. More...
 

Detailed Description

template<typename PointIndexGridType = PointIndexGrid>
struct openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator

Provides accelerated range and nearest-neighbor searches for particles that are partitioned using the ParticleAtlas.

Note
Prefer to construct the iterator object once and reuse it for subsequent queries.

Definition at line 151 of file ParticleAtlas.h.

Member Typedef Documentation

template<typename PointIndexGridType = PointIndexGrid>
using openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::ConstAccessor = tree::ValueAccessor<const TreeType>

Definition at line 154 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
using openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::ConstAccessorPtr = std::unique_ptr<ConstAccessor>

Definition at line 155 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
using openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::TreeType = typename PointIndexGridType::TreeType

Definition at line 153 of file ParticleAtlas.h.

Constructor & Destructor Documentation

template<typename PointIndexGridType = PointIndexGrid>
openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::Iterator ( const ParticleAtlas atlas)
explicit

Construct an iterator from the given atlas.

Member Function Documentation

template<typename PointIndexGridType = PointIndexGrid>
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::increment ( )
inline

Advance iterator to next item.

Definition at line 823 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
size_t openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::levels ( ) const
inline

Returns the total number of resolution levels.

Definition at line 179 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
bool openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::next ( )
inline

Advance iterator to next item.

Returns
true if this iterator is not yet exhausted.

Definition at line 840 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::operator bool ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 194 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
bool openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::operator!= ( const Iterator p) const
inline

Definition at line 212 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
const IndexType& openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::operator* ( ) const
inline

Return a const reference to the item to which this iterator is pointing.

Definition at line 189 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::operator++ ( )
inline

Advance iterator to next item.

Definition at line 201 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
bool openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::operator== ( const Iterator p) const
inline

Return true if both iterators point to the same element.

Definition at line 211 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::reset ( void  )
inline

Reset the iterator to point to the first item.

Definition at line 806 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
size_t openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::size ( void  ) const
inline

Return the number of point indices in the iterator range.

Definition at line 850 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
bool openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::test ( ) const
inline

Return true if this iterator is not yet exhausted.

Definition at line 193 of file ParticleAtlas.h.

template<typename PointIndexGridType = PointIndexGrid>
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::updateFromLevel ( size_t  level)
inline

Clear the iterator and update it with all particles that reside at the given resolution level.

Definition at line 879 of file ParticleAtlas.h.

template<typename PointIndexGridType >
template<typename ParticleArrayType >
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::worldSpaceSearchAndUpdate ( const Vec3d &  center,
double  radius,
const ParticleArrayType &  particles 
)
inline

Clear the iterator and update it with the result of the given world-space radial query.

Parameters
centerworld-space center
radiusworld-space search radius
particlescontainer conforming to the ParticleArray interface

Definition at line 913 of file ParticleAtlas.h.

template<typename PointIndexGridType >
template<typename ParticleArrayType >
void openvdb::OPENVDB_VERSION_NAME::tools::ParticleAtlas< PointIndexGridType >::Iterator::worldSpaceSearchAndUpdate ( const BBoxd bbox,
const ParticleArrayType &  particles 
)
inline

Clear the iterator and update it with the result of the given world-space radial query.

Parameters
bboxworld-space bounding box
particlescontainer conforming to the ParticleArray interface

Definition at line 982 of file ParticleAtlas.h.


The documentation for this struct was generated from the following file: