Partio
|
Classes | |
struct | Data |
Data. More... | |
struct | ETYPE_TO_TYPE |
struct | ETYPE_TO_TYPE< FLOAT > |
struct | ETYPE_TO_TYPE< INDEXEDSTR > |
struct | ETYPE_TO_TYPE< INT > |
struct | ETYPE_TO_TYPE< VECTOR > |
class | FixedAttribute |
Fixed Attribute Interface. More... | |
struct | IS_SAME |
struct | IS_SAME< T, T > |
struct | ParticleAccessor |
class | ParticleAttribute |
Particle Collection Interface. More... | |
class | ParticleIterator |
class | ParticlesData |
Particle Data Interface. More... | |
class | ParticlesDataMutable |
Particle Mutable Data Interface. More... | |
class | ParticlesInfo |
Particle Collection Interface. More... | |
struct | Provider |
struct | PROVIDER |
struct | PROVIDER< true > |
class | Vec3 |
Typedefs | |
typedef uint64_t | ParticleIndex |
Opaque random access method to a single particle. No number is implied or guaranteed. | |
typedef Data< int, 1 > | DataI |
typedef Data< float, 1 > | DataF |
typedef Data< float, 3 > | DataV |
Enumerations | |
enum | ParticleAttributeType { NONE =0 , VECTOR =1 , FLOAT =2 , INT =3 , INDEXEDSTR =4 } |
The interface of the particle API (Partio) what type the primitive is, how many instances of the primitive there, name of the attribute and an index which speeds lookups of data
Opaque random access method to a single particle. No number is implied or guaranteed.
void Partio::beginCachedAccess | ( | ParticlesData * | particles | ) |
Begin accessing data in a cached file.
Indicates to Partio that data access from a cached particle set will start. The sent in particles pointer must be from a readCached() call, not from read() or create(). Attributes can be read before this call.
ParticlesDataMutable * Partio::clone | ( | const ParticlesData & | , |
bool | particles = true, | ||
const std::map< std::string, std::string > * | attrNameMap = nullptr ) |
Copy a ParticlesData instance into a new ParticlesDataMutable instance. clone() copies the detail attributes and particle data by default. To copy only the detail attributes, pass particles=false. If attrNameMap is provided, it is used to rename attributes during cloning.
ParticlesDataMutable * Partio::cloneSchema | ( | const ParticlesData & | , |
const std::map< std::string, std::string > * | attrNameMap = nullptr ) |
Clone a ParticlesData instance into a new ParticlesDataMutable instance. This does not copy data, it only copies the attribute schema. If attrNameMap is provided, it is used to rename attributes during cloning.
ParticlesDataMutable * Partio::computeClustering | ( | ParticlesDataMutable * | particles, |
const int | numNeighbors, | ||
const double | radiusSearch, | ||
const double | radiusInside, | ||
const int | connections, | ||
const double | density ) |
ParticlesDataMutable * Partio::create | ( | ) |
Provides an empty particle instance, freed with p->release()
ParticlesDataMutable * Partio::createInterleave | ( | ) |
void Partio::endCachedAccess | ( | ParticlesData * | particles | ) |
End accessing data in a cached file.
Indicates to Partio that data from a cached particle read will end. The sent in particles pointer must be from a readCached() call, not from read() or create(). This allows the particle API to free all data pages, if they are needed.
void Partio::merge | ( | ParticlesDataMutable & | base, |
const ParticlesData & | delta, | ||
const std::string & | identifier0 = std::string(), | ||
const std::string & | identifier1 = std::string() ) |
Merges one particle set into another.
Given a ParticleSetMutable, merges it with a second ParticleSet, copying particles and attributes that align with the base particle set. If an identifier is provided, that will be used as a key to replace the particle in the base set with the particle in the second set with the same identifier attribute value. If the identifier is not provided or the particle's attribute value is not found in the base set, a new particle is added. If used, the identifier must be a single INT.
References typeCheck().
std::ostream & Partio::operator<< | ( | std::ostream & | output, |
const Data< T, d > & | v ) |
References typeCheck().
|
inline |
References typeCheck().
void Partio::print | ( | const ParticlesData * | particles | ) |
Prints a subset of particle data in a textual form.
ParticlesDataMutable * Partio::read | ( | const char * | filename, |
const bool | verbose = true, | ||
std::ostream & | errorStream = std::cerr ) |
Provides read/write access to a particle set stored in a file freed with p->release()
ParticlesData * Partio::readCached | ( | const char * | filename, |
const bool | sort, | ||
const bool | verbose = true, | ||
std::ostream & | errorStream = std::cerr ) |
Cached (only one copy) read only way to read a particle file.
Loads a file read-only if not already in memory, otherwise returns already loaded item. Pointer is owned by Partio and must be released with p->release(); (will not be deleted if others are also holding). If you want to do finding neighbors give true to sort
ParticlesInfo * Partio::readHeaders | ( | const char * | filename, |
const bool | verbose = true, | ||
std::ostream & | errorStream = std::cerr ) |
Provides read access to a particle headers (number of particles and attribute information, much cheapeer
bool Partio::typeCheck | ( | const ParticleAttributeType & | type | ) |
References FLOAT, INDEXEDSTR, INT, typeCheck(), and VECTOR.
Referenced by Partio::ParticleIterator< constant >::addAccessor(), Partio::Vec3::cross(), Partio::ParticlesData::data(), Partio::ParticlesData::data(), Partio::ParticleAccessor::data(), Partio::ParticleAccessor::data(), Partio::ParticlesDataMutable::dataWrite(), Partio::ParticlesData::fixedData(), Partio::ParticlesDataMutable::fixedDataWrite(), Partio::Vec3::max(), Partio::Vec3::min(), Partio::Vec3::normalize(), Partio::Vec3::normalized(), Partio::ParticleIterator< constant >::operator!=(), Partio::Vec3::operator*(), operator*(), Partio::Vec3::operator+(), Partio::ParticleIterator< constant >::operator++(), Partio::Vec3::operator+=(), Partio::Vec3::operator-(), operator<<(), operator<<(), Partio::ParticleIterator< constant >::operator=(), Partio::ParticleIterator< constant >::operator==(), Partio::Data< T, d >::operator[](), Partio::Data< T, d >::operator[](), Partio::ParticleAccessor::raw(), Partio::ParticleAccessor::raw(), Partio::ParticlesDataMutable::set(), Partio::ParticlesDataMutable::setFixed(), typeCheck(), and TypeSize().
std::string Partio::TypeName | ( | ParticleAttributeType | attrType | ) |
|
inline |
References FLOAT, INDEXEDSTR, INT, NONE, typeCheck(), and VECTOR.
Referenced by Partio::ParticlesDataMutable::set(), and Partio::ParticlesDataMutable::setFixed().