Partio
Classes | Typedefs | Enumerations | Functions
Partio Namespace Reference

Classes

class  AttribVar
 
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...
 
class  PartioSe
 NOTE: This class is experimental and may be deleted/modified in future versions. More...
 
struct  PROVIDER
 
struct  Provider
 
struct  PROVIDER< true >
 
struct  SimpleVar
 
class  VarToPartio
 Class that maps back to the partio data. More...
 
class  Vec3
 

Typedefs

typedef uint64_t ParticleIndex
 Opaque random access method to a single particle. No number is implied or guaranteed. More...
 
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
}
 

Functions

ParticlesDataMutablecreate ()
 Provides an empty particle instance, freed with p->release() More...
 
ParticlesDataMutablecreateInterleave ()
 
ParticlesDataMutablecloneSchema (const ParticlesData &)
 
ParticlesDataMutableclone (const ParticlesData &, bool particles=true)
 
ParticlesDataMutableread (const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
 
ParticlesInforeadHeaders (const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
 
void write (const char *filename, const ParticlesData &, const bool forceCompressed=false, bool verbose=true, std::ostream &errorStream=std::cerr)
 
ParticlesDatareadCached (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. More...
 
void beginCachedAccess (ParticlesData *particles)
 Begin accessing data in a cached file. More...
 
void endCachedAccess (ParticlesData *particles)
 End accessing data in a cached file. More...
 
void print (const ParticlesData *particles)
 Prints a subset of particle data in a textual form. More...
 
ParticlesDataMutablecomputeClustering (ParticlesDataMutable *particles, const int numNeighbors, const double radiusSearch, const double radiusInside, const int connections, const double density)
 
void merge (ParticlesDataMutable &base, const ParticlesData &delta, const std::string &identifier=std::string())
 Merges one particle set into another. More...
 
template<class T >
bool typeCheck (const ParticleAttributeType &type)
 
int TypeSize (ParticleAttributeType attrType)
 
std::string TypeName (ParticleAttributeType attrType)
 
template<class T , int d>
std::ostream & operator<< (std::ostream &output, const Data< T, d > &v)
 
std::ostream & operator<< (std::ostream &stream, const Vec3 &v)
 
Vec3 operator* (const float a, const Vec3 &v)
 

Detailed Description

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

PARTIO SOFTWARE Copyright 202 Disney Enterprises, Inc. All rights reserved

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

The names "Disney", "Walt Disney Pictures", "Walt Disney Animation Studios" or the names of its contributors may NOT be used to endorse or promote products derived from this software without specific prior written permission from Walt Disney Pictures.

Disclaimer: THIS SOFTWARE IS PROVIDED BY WALT DISNEY PICTURES AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT AND TITLE ARE DISCLAIMED. IN NO EVENT SHALL WALT DISNEY PICTURES, THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND BASED ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Typedef Documentation

◆ DataF

typedef Data<float,1> Partio::DataF

◆ DataI

typedef Data<int,1> Partio::DataI

◆ DataV

typedef Data<float,3> Partio::DataV

◆ ParticleIndex

typedef uint64_t Partio::ParticleIndex

Opaque random access method to a single particle. No number is implied or guaranteed.

Enumeration Type Documentation

◆ ParticleAttributeType

Enumerator
NONE 
VECTOR 
FLOAT 
INT 
INDEXEDSTR 

Function Documentation

◆ beginCachedAccess()

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.

◆ clone()

ParticlesDataMutable* Partio::clone ( const ParticlesData ,
bool  particles = true 
)

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.

◆ cloneSchema()

ParticlesDataMutable* Partio::cloneSchema ( const ParticlesData )

Clone a ParticlesData instance into a new ParticlesDataMutable instance. This does not copy data, it only copies the attribute schema.

◆ computeClustering()

ParticlesDataMutable* Partio::computeClustering ( ParticlesDataMutable particles,
const int  numNeighbors,
const double  radiusSearch,
const double  radiusInside,
const int  connections,
const double  density 
)

◆ create()

ParticlesDataMutable* Partio::create ( )

Provides an empty particle instance, freed with p->release()

◆ createInterleave()

ParticlesDataMutable* Partio::createInterleave ( )

◆ endCachedAccess()

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.

◆ merge()

void Partio::merge ( ParticlesDataMutable base,
const ParticlesData delta,
const std::string &  identifier = 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.

◆ operator*()

Vec3 Partio::operator* ( const float  a,
const Vec3 v 
)
inline

◆ operator<<() [1/2]

std::ostream& Partio::operator<< ( std::ostream &  stream,
const Vec3 v 
)
inline

◆ operator<<() [2/2]

template<class T , int d>
std::ostream& Partio::operator<< ( std::ostream &  output,
const Data< T, d > &  v 
)

◆ print()

void Partio::print ( const ParticlesData particles)

Prints a subset of particle data in a textual form.

◆ read()

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()

◆ readCached()

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 releasedwith p->release(); (will not be deleted if others are also holding). If you want to do finding neighbors give true to sort

◆ readHeaders()

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

◆ typeCheck()

template<class T >
bool Partio::typeCheck ( const ParticleAttributeType type)

References FLOAT, INDEXEDSTR, INT, and VECTOR.

◆ TypeName()

std::string Partio::TypeName ( ParticleAttributeType  attrType)

◆ TypeSize()

int Partio::TypeSize ( ParticleAttributeType  attrType)
inline

References FLOAT, INDEXEDSTR, INT, NONE, and VECTOR.

◆ write()

void Partio::write ( const char *  filename,
const ParticlesData ,
const bool  forceCompressed = false,
bool  verbose = true,
std::ostream &  errorStream = std::cerr 
)

Provides access to a particle set stored in a file if filename ends with .gz or forceCompressed is true, the file is compressed.