35 #ifndef IE_CORE_PARTICLEREADER_H
36 #define IE_CORE_PARTICLEREADER_H
38 #include "IECore/Export.h"
39 #include "IECore/Reader.h"
40 #include "IECore/SimpleTypedParameter.h"
41 #include "IECore/VectorTypedParameter.h"
42 #include "IECore/NumericParameter.h"
93 virtual unsigned long numParticles() = 0;
99 virtual void attributeNames( std::vector<std::string> &names ) = 0;
104 virtual DataPtr readAttribute(
const std::string &name ) = 0;
114 ObjectPtr doOperation(
const CompoundObject * operands )
override;
120 float particlePercentage()
const;
121 FloatParameterPtr m_percentageParameter;
122 int particlePercentageSeed()
const;
123 IntParameterPtr m_percentageSeedParameter;
124 void particleAttributes( std::vector<std::string> &names );
125 StringVectorParameterPtr m_attributesParameter;
126 RealType realType()
const;
127 IntParameterPtr m_realTypeParameter;
128 bool convertPrimVarNames()
const;
129 BoolParameterPtr m_convertPrimVarNamesParameter;
134 template<
typename T,
typename F>
135 typename T::Ptr filterAttr(
const F * attr,
float percentage,
const Data *idAttr )
const;
138 virtual std::string positionPrimVarName() = 0;
142 template<
typename T,
typename F,
typename U >
143 typename T::Ptr filterAttr(
const F * attr,
float percentage,
const std::vector< U > &ids )
const;
148 IE_CORE_DECLAREPTR( ParticleReader );
152 #endif // IE_CORE_PARTICLEREADER_H
Definition: TypedParameter.h:48
Definition: CompoundObject.h:46
Definition: NumericParameter.h:48
Definition: ParticleReader.h:52
RealType
An enum for the values accepted by realTypeParameter().
Definition: ParticleReader.h:62
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43