Partio::ParticlesData Class Reference

Particle Data Interface. More...

#include <Partio.h>

Inheritance diagram for Partio::ParticlesData:
Partio::ParticlesInfo Partio::ParticlesDataMutable

List of all members.

Public Types

typedef ParticleIterator< true > const_iterator

Public Member Functions

template<class T >
void data (const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, T *values)
template<class T >
const T * data (const ParticleAttribute &attribute, const ParticleIndex particleIndex) const
virtual void dataAsFloat (const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, float *values) const =0
virtual void findPoints (const float bboxMin[3], const float bboxMax[3], std::vector< ParticleIndex > &points) const =0
virtual float findNPoints (const float center[3], int nPoints, const float maxRadius, std::vector< ParticleIndex > &points, std::vector< float > &pointDistancesSquared) const =0
virtual int findNPoints (const float center[3], int nPoints, const float maxRadius, ParticleIndex *points, float *pointDistancesSquared, float *finalRadius2) const =0
virtual const_iterator setupConstIterator () const =0
 Produce a const iterator.
const_iterator begin () const
 Produce a beginning iterator for the particles.
const_iterator end () const
 Produce a ending iterator for the particles.

Protected Member Functions

virtual ~ParticlesData ()

Private Member Functions

virtual void * dataInternal (const ParticleAttribute &attribute, const ParticleIndex particleIndex) const =0
virtual void dataInternalMultiple (const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, char *values) const =0

Detailed Description

Particle Data Interface.

This interface provides the ability to read data attributes for given particles and search for nearest neighbors using KD-Trees.


Member Typedef Documentation


Constructor & Destructor Documentation

virtual Partio::ParticlesData::~ParticlesData (  )  [inline, protected, virtual]

Member Function Documentation

const_iterator Partio::ParticlesData::begin (  )  const [inline]

Produce a beginning iterator for the particles.

References setupConstIterator().

template<class T >
const T* Partio::ParticlesData::data ( const ParticleAttribute attribute,
const ParticleIndex  particleIndex 
) const [inline]

References dataInternal().

template<class T >
void Partio::ParticlesData::data ( const ParticleAttribute attribute,
const int  indexCount,
const ParticleIndex particleIndices,
const bool  sorted,
T *  values 
) [inline]

Fill the user supplied values array with data corresponding to the given list of particles. Specify whether or not your indices are sorted. note if T is void, then type checking is disabled.

References dataInternalMultiple(), and Partio::ParticleAttribute::type.

virtual void Partio::ParticlesData::dataAsFloat ( const ParticleAttribute attribute,
const int  indexCount,
const ParticleIndex particleIndices,
const bool  sorted,
float *  values 
) const [pure virtual]

Fill the user supplied values array with data corresponding to the given list of particles. Specify whether or not your indices are sorted. Attributes that are not floating types are automatically casted before being placed in values.

virtual void* Partio::ParticlesData::dataInternal ( const ParticleAttribute attribute,
const ParticleIndex  particleIndex 
) const [private, pure virtual]

Implemented in Partio::ParticlesDataMutable.

Referenced by data().

virtual void Partio::ParticlesData::dataInternalMultiple ( const ParticleAttribute attribute,
const int  indexCount,
const ParticleIndex particleIndices,
const bool  sorted,
char *  values 
) const [private, pure virtual]

Referenced by data().

const_iterator Partio::ParticlesData::end (  )  const [inline]

Produce a ending iterator for the particles.

virtual int Partio::ParticlesData::findNPoints ( const float  center[3],
int  nPoints,
const float  maxRadius,
ParticleIndex points,
float *  pointDistancesSquared,
float *  finalRadius2 
) const [pure virtual]

Find the N nearest neighbors that are within maxRadius distance using POD types NOTE: returns the number of found points and leaves in finalRadius2 the square of the final search radius used

virtual float Partio::ParticlesData::findNPoints ( const float  center[3],
int  nPoints,
const float  maxRadius,
std::vector< ParticleIndex > &  points,
std::vector< float > &  pointDistancesSquared 
) const [pure virtual]

Find the N nearest neighbors that are within maxRadius distance using STL types (measured in standard 2-norm). If less than N are found within the radius, the search radius is not increased. NOTE: points/pointsDistancesSquared are cleared before use. Must call sort() before using this function

virtual void Partio::ParticlesData::findPoints ( const float  bboxMin[3],
const float  bboxMax[3],
std::vector< ParticleIndex > &  points 
) const [pure virtual]

Find the points within the bounding box specified. Must call sort() before using this function NOTE: points array is not pre-cleared.

virtual const_iterator Partio::ParticlesData::setupConstIterator (  )  const [pure virtual]

Produce a const iterator.

Referenced by begin().


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

Generated on 5 Apr 2011 for Partio by  doxygen 1.6.1