Go to the documentation of this file.
115 const int indexCount,
const ParticleIndex* particleIndices,
const bool sorted,T* values)
117 assert(typeCheck<T>(attribute.
type));
125 return static_cast<T*>(
dataInternal(attribute,particleIndex));
149 const ParticleIndex* particleIndices,
const bool sorted,
float* values)
const=0;
154 virtual void findPoints(
const float bboxMin[3],
const float bboxMax[3],
155 std::vector<ParticleIndex>& points)
const=0;
162 virtual float findNPoints(
const float center[3],
int nPoints,
const float maxRadius,
163 std::vector<ParticleIndex>& points,std::vector<float>& pointDistancesSquared)
const=0;
168 virtual int findNPoints(
const float center[3],
int nPoints,
const float maxRadius,
169 ParticleIndex *points,
float *pointDistancesSquared,
float *finalRadius2)
const=0;
186 const ParticleIndex* particleIndices,
const bool sorted,
char* values)
const=0;
210 return static_cast<T*>(
dataInternal(attribute,particleIndex));
224 T* ptr = static_cast<T*>(
dataInternal(attribute, particleIndex));
245 virtual void sort()=0;
279 ParticlesDataMutable*
create();
285 ParticlesDataMutable*
cloneSchema(
const ParticlesData&);
290 ParticlesDataMutable*
clone(
const ParticlesData&,
bool particles=
true);
294 ParticlesDataMutable*
read(
const char* filename,
const bool verbose=
true,std::ostream& errorStream=std::cerr);
298 ParticlesInfo*
readHeaders(
const char* filename,
const bool verbose=
true,std::ostream& errorStream=std::cerr);
302 void write(
const char* filename,
const ParticlesData&,
const bool forceCompressed=
false,
bool verbose=
true,std::ostream& errorStream=std::cerr);
311 ParticlesData*
readCached(
const char* filename,
const bool sort,
const bool verbose=
true,std::ostream& errorStream=std::cerr);
331 void print(
const ParticlesData* particles);
333 ParticlesDataMutable*
computeClustering(ParticlesDataMutable* particles,
const int numNeighbors,
const double radiusSearch,
const double radiusInside,
const int connections,
const double density);
345 void merge(ParticlesDataMutable& base,
const ParticlesData& delta,
const std::string& identifier=std::string());
virtual int numParticles() const =0
Number of particles in the structure.
find_package(Doxygen) configure_file($
Definition: CMakeLists.txt:34
virtual int lookupFixedIndexedStr(const FixedAttribute &attribute, const char *str) const =0
Looks up the index for a given string for a given attribute, returns -1 if not found.
void set(const ParticleAttribute &attribute, const ParticleIndex particleIndex, const T *data)
Set particle value for attribute.
Definition: Partio.h:222
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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
Definition: license.txt:3
friend void freeCached(ParticlesData *particles)
ParticlesDataMutable * read(const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
virtual void dataInternalMultiple(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, char *values) const =0
void data(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, T *values)
Definition: Partio.h:114
virtual void dataAsFloat(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, float *values) const =0
virtual iterator setupIterator(const int index=0)=0
Produce a const iterator.
ParticleAttributeType
Definition: PartioAttribute.h:47
ParticlesDataMutable * create()
Provides an empty particle instance, freed with p->release()
iterator begin()
Produce a beginning iterator for the particles.
Definition: Partio.h:263
const T * data(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const
Definition: Partio.h:121
ParticleAttributeType type
Type of attribute.
Definition: PartioAttribute.h:127
int count
Number of entries, should be 3 if type is VECTOR.
Definition: PartioAttribute.h:130
const_iterator end() const
Produce a ending iterator for the particles.
Definition: Partio.h:179
ParticlesDataMutable * clone(const ParticlesData &, bool particles=true)
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY 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
const T * fixedData(const FixedAttribute &attribute) const
Definition: Partio.h:128
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY INDIRECT
Definition: license.txt:3
ParticlesInfo * readHeaders(const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN CONTRACT
Definition: license.txt:31
ParticlesDataMutable * createInterleave()
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 INCLUDING
Definition: license.txt:3
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary forms
Definition: license.txt:3
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright notice
Definition: license.txt:3
Particle Mutable Data Interface.
Definition: Partio.h:195
void endCachedAccess(ParticlesData *particles)
End accessing data in a cached file.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY
Definition: license.txt:3
virtual void * fixedDataInternal(const FixedAttribute &attribute) const =0
virtual void * dataInternal(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const =0
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY INCIDENTAL
Definition: license.txt:3
const_iterator begin() const
Produce a beginning iterator for the particles.
Definition: Partio.h:175
virtual void * dataInternal(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const =0
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY SPECIAL
Definition: license.txt:3
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
int count
Number of entries, should be 3 if type is VECTOR.
Definition: PartioAttribute.h:103
virtual ~ParticlesDataMutable()
Definition: Partio.h:198
virtual bool attributeInfo(const char *attributeName, ParticleAttribute &attribute) const =0
Lookup an attribute by name and store a handle to the attribute.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Disney
Definition: license.txt:3
iterator end()
Produce a ending iterator for the particles.
Definition: Partio.h:267
virtual void setFixedIndexedStr(const FixedAttribute &attribute, int indexedStringToken, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
< pre > PARTIO SOFTWARE Copyright Disney Enterprises
Definition: license.txt:3
virtual int registerFixedIndexedStr(const FixedAttribute &attribute, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are met
Definition: license.txt:3
ParticlesData * 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.
uint64_t ParticleIndex
Opaque random access method to a single particle. No number is implied or guaranteed.
Definition: Partio.h:55
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney Pictures
Definition: license.txt:3
virtual int registerIndexedStr(const ParticleAttribute &attribute, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT
Definition: license.txt:3
T * dataWrite(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const
Definition: Partio.h:206
virtual int lookupIndexedStr(const ParticleAttribute &attribute, const char *str) const =0
Looks up the index for a given string for a given attribute, returns -1 if not found.
Particle Collection Interface.
Definition: PartioAttribute.h:96
ParticleIterator< false > iterator
Definition: Partio.h:202
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY EXEMPLARY
Definition: license.txt:3
virtual bool fixedAttributeInfo(const char *attributeName, FixedAttribute &attribute) const =0
Lookup an attribute by name and store a handle to the attribute.
virtual iterator addParticles(const int count)=0
void write(const char *filename, const ParticlesData &, const bool forceCompressed=false, bool verbose=true, std::ostream &errorStream=std::cerr)
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without modification
Definition: license.txt:3
void beginCachedAccess(ParticlesData *particles)
Begin accessing data in a cached file.
virtual const_iterator setupConstIterator(const int index=0) const =0
Produce a const iterator.
Particle Collection Interface.
Definition: Partio.h:66
virtual int numFixedAttributes() const =0
Number of fixed attributes.
virtual float findNPoints(const float center[3], int nPoints, const float maxRadius, std::vector< ParticleIndex > &points, std::vector< float > &pointDistancesSquared) const =0
ParticlesDataMutable * computeClustering(ParticlesDataMutable *particles, const int numNeighbors, const double radiusSearch, const double radiusInside, const int connections, const double density)
virtual ParticleIndex addParticle()=0
Add a particle to the particle set. Returns the offset to the particle.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT LIABILITY
Definition: license.txt:31
virtual void * fixedDataInternal(const FixedAttribute &attribute) const =0
virtual ~ParticlesData()
Definition: Partio.h:105
virtual ~ParticlesInfo()
Definition: Partio.h:69
virtual FixedAttribute addFixedAttribute(const char *attribute, ParticleAttributeType type, const int count)=0
Adds a fixed attribute with the provided name, type and count.
T * fixedDataWrite(const FixedAttribute &attribute) const
Definition: Partio.h:215
int TypeSize(ParticleAttributeType attrType)
Definition: PartioAttribute.h:75
virtual const std::vector< std::string > & fixedIndexedStrs(const FixedAttribute &attr) const =0
All indexed strings for an attribute.
virtual const std::vector< std::string > & indexedStrs(const ParticleAttribute &attr) const =0
All indexed strings for an attribute.
Particle Data Interface.
Definition: Partio.h:102
virtual void setIndexedStr(const ParticleAttribute &attribute, int indexedStringToken, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR NONINFRINGEMENT AND TITLE ARE DISCLAIMED IN NO EVENT SHALL WALT DISNEY PICTURES
Definition: license.txt:3
Definition: PartioIterator.h:66
virtual int numAttributes() const =0
Number of per-particle attributes.
Fixed Attribute Interface.
Definition: PartioAttribute.h:123
virtual ParticleAttribute addAttribute(const char *attribute, ParticleAttributeType type, const int count)=0
Adds an attribute to the particle with the provided name, type and count.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED TO
Definition: license.txt:3
ParticleAttributeType type
Type of attribute.
Definition: PartioAttribute.h:100
void setFixed(const FixedAttribute &attribute, const T *data)
Definition: Partio.h:228
ParticlesDataMutable * cloneSchema(const ParticlesData &)
virtual void findPoints(const float bboxMin[3], const float bboxMax[3], std::vector< ParticleIndex > &points) const =0
void print(const ParticlesData *particles)
Prints a subset of particle data in a textual form.
ParticleIterator< true > const_iterator
Definition: Partio.h:109
void merge(ParticlesDataMutable &base, const ParticlesData &delta, const std::string &identifier=std::string())
Merges one particle set into another.
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *The names Walt Disney 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 BUT NOT LIMITED THE IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE
Definition: license.txt:3