Partio
Partio.h
Go to the documentation of this file.
1 /*
2 PARTIO SOFTWARE
3 Copyright 2010 Disney Enterprises, Inc. All rights reserved
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are
7 met:
8 
9 * Redistributions of source code must retain the above copyright
10 notice, this list of conditions and the following disclaimer.
11 
12 * Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in
14 the documentation and/or other materials provided with the
15 distribution.
16 
17 * The names "Disney", "Walt Disney Pictures", "Walt Disney Animation
18 Studios" or the names of its contributors may NOT be used to
19 endorse or promote products derived from this software without
20 specific prior written permission from Walt Disney Pictures.
21 
22 Disclaimer: THIS SOFTWARE IS PROVIDED BY WALT DISNEY PICTURES AND
23 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
24 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
25 FOR A PARTICULAR PURPOSE, NONINFRINGEMENT AND TITLE ARE DISCLAIMED.
26 IN NO EVENT SHALL WALT DISNEY PICTURES, THE COPYRIGHT HOLDER OR
27 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND BASED ON ANY
31 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
34 */
35 
41 #ifndef _Partioh_
42 #define _Partioh_
43 
44 #include <string>
45 #include <vector>
46 #include <map>
47 #include <stdint.h>
48 #include <string.h>
49 #include "PartioAttribute.h"
50 #include "PartioIterator.h"
51 
52 namespace Partio{
53 
55 typedef uint64_t ParticleIndex;
56 
57 class ParticlesData;
59 // Particle Collection Interface
61 
67 {
68 protected:
69  virtual ~ParticlesInfo() {}
70 public:
71 
75  virtual void release()=0;
76 
78  virtual int numParticles() const=0;
79 
81  virtual int numAttributes() const=0;
83  virtual int numFixedAttributes() const=0;
84 
86  virtual bool attributeInfo(const char* attributeName,ParticleAttribute& attribute) const=0;
88  virtual bool fixedAttributeInfo(const char* attributeName,FixedAttribute& attribute) const=0;
89 
91  virtual bool attributeInfo(const int index,ParticleAttribute& attribute) const=0;
93  virtual bool fixedAttributeInfo(const int index,FixedAttribute& attribute) const=0;
94 };
95 
96 // Particle Data Interface
98 
103 {
104 protected:
105  virtual ~ParticlesData() {}
106 public:
107  friend void freeCached(ParticlesData* particles);
108 
110 
114  template<class T> inline void data(const ParticleAttribute& attribute,
115  const int indexCount,const ParticleIndex* particleIndices,const bool sorted,T* values)
116  {
117  assert(typeCheck<T>(attribute.type));
118  dataInternalMultiple(attribute,indexCount,particleIndices,sorted,(char*)values);
119  }
120 
121  template<class T> inline const T* data(const ParticleAttribute& attribute,
122  const ParticleIndex particleIndex) const
123  {
124  // TODO: add type checking
125  return static_cast<T*>(dataInternal(attribute,particleIndex));
126  }
127 
128  template<class T> inline const T* fixedData(const FixedAttribute& attribute) const
129  {
130  // TODO: add type checking
131  return static_cast<T*>(fixedDataInternal(attribute));
132  }
133 
135  virtual const std::vector<std::string>& indexedStrs(const ParticleAttribute& attr) const=0;
137  virtual const std::vector<std::string>& fixedIndexedStrs(const FixedAttribute& attr) const=0;
138 
140  virtual int lookupIndexedStr(const ParticleAttribute& attribute,const char* str) const=0;
142  virtual int lookupFixedIndexedStr(const FixedAttribute& attribute,const char* str) const=0;
143 
148  virtual void dataAsFloat(const ParticleAttribute& attribute,const int indexCount,
149  const ParticleIndex* particleIndices,const bool sorted,float* values) const=0;
150 
154  virtual void findPoints(const float bboxMin[3],const float bboxMax[3],
155  std::vector<ParticleIndex>& points) const=0;
156 
162  virtual float findNPoints(const float center[3],int nPoints,const float maxRadius,
163  std::vector<ParticleIndex>& points,std::vector<float>& pointDistancesSquared) const=0;
164 
168  virtual int findNPoints(const float center[3],int nPoints,const float maxRadius,
169  ParticleIndex *points, float *pointDistancesSquared, float *finalRadius2) const=0;
170 
172  virtual const_iterator setupConstIterator(const int index=0) const=0;
173 
176  {return setupConstIterator();}
177 
180  {return const_iterator();}
181 
182 private:
183  virtual void* dataInternal(const ParticleAttribute& attribute,const ParticleIndex particleIndex) const=0;
184  virtual void* fixedDataInternal(const FixedAttribute& attribute) const=0;
185  virtual void dataInternalMultiple(const ParticleAttribute& attribute,const int indexCount,
186  const ParticleIndex* particleIndices,const bool sorted,char* values) const=0;
187 };
188 
189 // Particle Mutable Data Interface
191 
196 {
197 protected:
199 
200 public:
201 
203 
206  template<class T> inline T* dataWrite(const ParticleAttribute& attribute,
207  const ParticleIndex particleIndex) const
208  {
209  // TODO: add type checking
210  return static_cast<T*>(dataInternal(attribute,particleIndex));
211  }
212 
215  template<class T> inline T* fixedDataWrite(const FixedAttribute& attribute) const
216  {
217  // TODO: add type checking
218  return static_cast<T*>(fixedDataInternal(attribute));
219  }
220 
222  template<class T> inline void set(const ParticleAttribute& attribute,
223  const ParticleIndex particleIndex, const T* data) {
224  T* ptr = static_cast<T*>(dataInternal(attribute, particleIndex));
225  memcpy(ptr, data, attribute.count * TypeSize(attribute.type));
226  }
227 
228  template<class T> inline void setFixed(const FixedAttribute& attribute, const T* data) {
229  T* ptr = static_cast<T*>(fixedDataInternal(attribute));
230  memcpy(ptr, data, attribute.count * TypeSize(attribute.type));
231  }
232 
234  virtual int registerIndexedStr(const ParticleAttribute& attribute,const char* str)=0;
236  virtual int registerFixedIndexedStr(const FixedAttribute& attribute,const char* str)=0;
237 
239  virtual void setIndexedStr(const ParticleAttribute& attribute,int indexedStringToken,const char* str)=0;
241  virtual void setFixedIndexedStr(const FixedAttribute& attribute,int indexedStringToken,const char* str)=0;
242 
245  virtual void sort()=0;
246 
248  virtual ParticleAttribute addAttribute(const char* attribute,ParticleAttributeType type,
249  const int count)=0;
250 
252  virtual FixedAttribute addFixedAttribute(const char* attribute,ParticleAttributeType type,
253  const int count)=0;
254 
256  virtual ParticleIndex addParticle()=0;
257 
260  virtual iterator addParticles(const int count)=0;
261 
264  {return setupIterator();}
265 
268  {return iterator();}
269 
271  virtual iterator setupIterator(const int index=0)=0;
272 
273 private:
274  virtual void* dataInternal(const ParticleAttribute& attribute,const ParticleIndex particleIndex) const=0;
275  virtual void* fixedDataInternal(const FixedAttribute& attribute) const=0;
276 };
277 
279 ParticlesDataMutable* create();
280 
281 ParticlesDataMutable* createInterleave();
282 
285 ParticlesDataMutable* cloneSchema(const ParticlesData&);
286 
290 ParticlesDataMutable* clone(const ParticlesData&, bool particles=true);
291 
294 ParticlesDataMutable* read(const char* filename,const bool verbose=true,std::ostream& errorStream=std::cerr);
295 
298 ParticlesInfo* readHeaders(const char* filename,const bool verbose=true,std::ostream& errorStream=std::cerr);
299 
302 void write(const char* filename,const ParticlesData&,const bool forceCompressed=false,bool verbose=true,std::ostream& errorStream=std::cerr);
303 
305 
311 ParticlesData* readCached(const char* filename,const bool sort,const bool verbose=true,std::ostream& errorStream=std::cerr);
312 
314 
319 void beginCachedAccess(ParticlesData* particles);
320 
322 
328 void endCachedAccess(ParticlesData* particles);
329 
331 void print(const ParticlesData* particles);
332 
333 ParticlesDataMutable* computeClustering(ParticlesDataMutable* particles, const int numNeighbors,const double radiusSearch,const double radiusInside,const int connections,const double density);
334 
336 
345 void merge(ParticlesDataMutable& base, const ParticlesData& delta, const std::string& identifier=std::string());
346 
347 }
348 #endif
PartioAttribute.h
Partio::ParticlesInfo::numParticles
virtual int numParticles() const =0
Number of particles in the structure.
find_package
find_package(Doxygen) configure_file($
Definition: CMakeLists.txt:34
Partio::ParticlesData::lookupFixedIndexedStr
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.
Partio::ParticlesDataMutable::set
void set(const ParticleAttribute &attribute, const ParticleIndex particleIndex, const T *data)
Set particle value for attribute.
Definition: Partio.h:222
Disclaimer
< 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
Partio::ParticlesData::freeCached
friend void freeCached(ParticlesData *particles)
Partio::read
ParticlesDataMutable * read(const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
Partio::ParticlesData::dataInternalMultiple
virtual void dataInternalMultiple(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, char *values) const =0
Partio::ParticlesData::data
void data(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, T *values)
Definition: Partio.h:114
Partio::ParticlesData::dataAsFloat
virtual void dataAsFloat(const ParticleAttribute &attribute, const int indexCount, const ParticleIndex *particleIndices, const bool sorted, float *values) const =0
Partio::ParticlesDataMutable::setupIterator
virtual iterator setupIterator(const int index=0)=0
Produce a const iterator.
Partio::ParticleAttributeType
ParticleAttributeType
Definition: PartioAttribute.h:47
Partio::create
ParticlesDataMutable * create()
Provides an empty particle instance, freed with p->release()
Partio::ParticlesDataMutable::begin
iterator begin()
Produce a beginning iterator for the particles.
Definition: Partio.h:263
Partio::ParticlesData::data
const T * data(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const
Definition: Partio.h:121
Partio::FixedAttribute::type
ParticleAttributeType type
Type of attribute.
Definition: PartioAttribute.h:127
Partio::FixedAttribute::count
int count
Number of entries, should be 3 if type is VECTOR.
Definition: PartioAttribute.h:130
Partio::ParticlesData::end
const_iterator end() const
Produce a ending iterator for the particles.
Definition: Partio.h:179
Partio::clone
ParticlesDataMutable * clone(const ParticlesData &, bool particles=true)
Partio::ParticlesDataMutable::sort
virtual void sort()=0
DAMAGES
< 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
Partio
Definition: Partio.h:52
Partio::ParticlesData::fixedData
const T * fixedData(const FixedAttribute &attribute) const
Definition: Partio.h:128
INDIRECT
< 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
Partio::readHeaders
ParticlesInfo * readHeaders(const char *filename, const bool verbose=true, std::ostream &errorStream=std::cerr)
CONTRACT
< 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
Partio::createInterleave
ParticlesDataMutable * createInterleave()
INCLUDING
< 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
forms
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary forms
Definition: license.txt:3
notice
< 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
Partio::ParticlesDataMutable
Particle Mutable Data Interface.
Definition: Partio.h:195
Partio::endCachedAccess
void endCachedAccess(ParticlesData *particles)
End accessing data in a cached file.
MERCHANTABILITY
< 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
Partio::ParticlesDataMutable::fixedDataInternal
virtual void * fixedDataInternal(const FixedAttribute &attribute) const =0
Partio::ParticlesDataMutable::dataInternal
virtual void * dataInternal(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const =0
INCIDENTAL
< 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
Partio::ParticlesData::begin
const_iterator begin() const
Produce a beginning iterator for the particles.
Definition: Partio.h:175
Partio::ParticlesData::dataInternal
virtual void * dataInternal(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const =0
SPECIAL
< 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
TORT
< 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
Partio::ParticleAttribute::count
int count
Number of entries, should be 3 if type is VECTOR.
Definition: PartioAttribute.h:103
Partio::ParticlesDataMutable::~ParticlesDataMutable
virtual ~ParticlesDataMutable()
Definition: Partio.h:198
Partio::ParticlesInfo::attributeInfo
virtual bool attributeInfo(const char *attributeName, ParticleAttribute &attribute) const =0
Lookup an attribute by name and store a handle to the attribute.
Disney
< 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
Partio::ParticlesDataMutable::end
iterator end()
Produce a ending iterator for the particles.
Definition: Partio.h:267
Partio::ParticlesDataMutable::setFixedIndexedStr
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.
Enterprises
< pre > PARTIO SOFTWARE Copyright Disney Enterprises
Definition: license.txt:3
Partio::ParticlesDataMutable::registerFixedIndexedStr
virtual int registerFixedIndexedStr(const FixedAttribute &attribute, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
met
< 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
Partio::readCached
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.
Partio::ParticleIndex
uint64_t ParticleIndex
Opaque random access method to a single particle. No number is implied or guaranteed.
Definition: Partio.h:55
Pictures
< 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
Partio::ParticlesDataMutable::registerIndexedStr
virtual int registerIndexedStr(const ParticleAttribute &attribute, const char *str)=0
Returns a token for the given string. This allows efficient storage of string data.
DIRECT
< 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
Partio::ParticlesInfo::release
virtual void release()=0
Partio::ParticlesDataMutable::dataWrite
T * dataWrite(const ParticleAttribute &attribute, const ParticleIndex particleIndex) const
Definition: Partio.h:206
Partio::ParticlesData::lookupIndexedStr
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.
Partio::ParticleAttribute
Particle Collection Interface.
Definition: PartioAttribute.h:96
Partio::ParticlesDataMutable::iterator
ParticleIterator< false > iterator
Definition: Partio.h:202
EXEMPLARY
< 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
Partio::ParticlesInfo::fixedAttributeInfo
virtual bool fixedAttributeInfo(const char *attributeName, FixedAttribute &attribute) const =0
Lookup an attribute by name and store a handle to the attribute.
Partio::ParticlesDataMutable::addParticles
virtual iterator addParticles(const int count)=0
Partio::write
void write(const char *filename, const ParticlesData &, const bool forceCompressed=false, bool verbose=true, std::ostream &errorStream=std::cerr)
modification
< pre > PARTIO SOFTWARE Copyright Disney Inc All rights reserved Redistribution and use in source and binary with or without modification
Definition: license.txt:3
Partio::beginCachedAccess
void beginCachedAccess(ParticlesData *particles)
Begin accessing data in a cached file.
Partio::ParticlesData::setupConstIterator
virtual const_iterator setupConstIterator(const int index=0) const =0
Produce a const iterator.
Partio::ParticlesInfo
Particle Collection Interface.
Definition: Partio.h:66
Partio::ParticlesInfo::numFixedAttributes
virtual int numFixedAttributes() const =0
Number of fixed attributes.
Partio::ParticlesData::findNPoints
virtual float findNPoints(const float center[3], int nPoints, const float maxRadius, std::vector< ParticleIndex > &points, std::vector< float > &pointDistancesSquared) const =0
Partio::computeClustering
ParticlesDataMutable * computeClustering(ParticlesDataMutable *particles, const int numNeighbors, const double radiusSearch, const double radiusInside, const int connections, const double density)
Partio::ParticlesDataMutable::addParticle
virtual ParticleIndex addParticle()=0
Add a particle to the particle set. Returns the offset to the particle.
LIABILITY
< 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
Partio::ParticlesData::fixedDataInternal
virtual void * fixedDataInternal(const FixedAttribute &attribute) const =0
Partio::ParticlesData::~ParticlesData
virtual ~ParticlesData()
Definition: Partio.h:105
Partio::ParticlesInfo::~ParticlesInfo
virtual ~ParticlesInfo()
Definition: Partio.h:69
Partio::ParticlesDataMutable::addFixedAttribute
virtual FixedAttribute addFixedAttribute(const char *attribute, ParticleAttributeType type, const int count)=0
Adds a fixed attribute with the provided name, type and count.
Partio::ParticlesDataMutable::fixedDataWrite
T * fixedDataWrite(const FixedAttribute &attribute) const
Definition: Partio.h:215
Partio::TypeSize
int TypeSize(ParticleAttributeType attrType)
Definition: PartioAttribute.h:75
Partio::ParticlesData::fixedIndexedStrs
virtual const std::vector< std::string > & fixedIndexedStrs(const FixedAttribute &attr) const =0
All indexed strings for an attribute.
Partio::ParticlesData::indexedStrs
virtual const std::vector< std::string > & indexedStrs(const ParticleAttribute &attr) const =0
All indexed strings for an attribute.
Partio::ParticlesData
Particle Data Interface.
Definition: Partio.h:102
Partio::ParticlesDataMutable::setIndexedStr
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.
PICTURES
< 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
Partio::ParticleIterator
Definition: PartioIterator.h:66
Partio::ParticlesInfo::numAttributes
virtual int numAttributes() const =0
Number of per-particle attributes.
Partio::FixedAttribute
Fixed Attribute Interface.
Definition: PartioAttribute.h:123
Partio::ParticlesDataMutable::addAttribute
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.
TO
< 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
Partio::ParticleAttribute::type
ParticleAttributeType type
Type of attribute.
Definition: PartioAttribute.h:100
Partio::ParticlesDataMutable::setFixed
void setFixed(const FixedAttribute &attribute, const T *data)
Definition: Partio.h:228
Partio::cloneSchema
ParticlesDataMutable * cloneSchema(const ParticlesData &)
Partio::ParticlesData::findPoints
virtual void findPoints(const float bboxMin[3], const float bboxMax[3], std::vector< ParticleIndex > &points) const =0
Partio::print
void print(const ParticlesData *particles)
Prints a subset of particle data in a textual form.
Partio::ParticlesData::const_iterator
ParticleIterator< true > const_iterator
Definition: Partio.h:109
Partio::merge
void merge(ParticlesDataMutable &base, const ParticlesData &delta, const std::string &identifier=std::string())
Merges one particle set into another.
PURPOSE
< 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
PartioIterator.h