From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/a03160.html | 1793 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1793 insertions(+) create mode 100644 docs/doxygen/nel/a03160.html (limited to 'docs/doxygen/nel/a03160.html') diff --git a/docs/doxygen/nel/a03160.html b/docs/doxygen/nel/a03160.html new file mode 100644 index 00000000..6dd3d822 --- /dev/null +++ b/docs/doxygen/nel/a03160.html @@ -0,0 +1,1793 @@ + + +NeL: NL3D::CPSColorMemory class Reference + + + +
+

NL3D::CPSColorMemory Class Reference

#include <ps_color.h> +

+

Inheritance diagram for NL3D::CPSColorMemory: +

+ +NL3D::CPSAttribMakerMemory< T > +NL3D::CPSAttribMakerMemoryBase< T > +NL3D::CPSAttribMaker< T > +NL3D::CPSAttribMakerBase +NLMISC::IStreamable +NLMISC::IClassable + +

Detailed Description

+this memorize value by applying some function on the emitter. For a particle's attribute, each particle has its own value memorized You MUST called setScheme (from CPSAttribMakerMemory) to tell how the value will be generted +

+ +

+Definition at line 116 of file ps_color.h. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Input properties of the attribute maker

virtual bool getClamping (void) const
virtual CPSInputType getInput (void) const
float getNbCycles (void) const
virtual bool hasCustomInput (void)
 tells wether one may choose one attribute from a CPSLocated to use as an input. If false, the input(s) is fixed

virtual bool isClampingSupported (void) const
virtual void setClamping (bool enable=true)
virtual void setInput (const CPSInputType &input)
void setNbCycles (float nbCycles)

Public Member Functions

CPSAttribMakerBaseclone () const
 CPSColorMemory ()
virtual void deleteElement (uint32 index)
 inherited from CPSAttribMaker

virtual T get (CPSLocated *loc, uint32 index)
 inherited from CPSAttribMaker

virtual std::string getClassName ()=0
getDefaultValue (void) const
 get the default value :

virtual T getMaxValue (void) const
 get the min value, or an evalution that is guaranteed to be < to it (meaningful for ordered set only)

virtual T getMinValue (void) const
 get the max value, or an evalution that is guaranteed to be > to it (meaningful for ordered set only)

const CPSAttribMaker< T > * getScheme (void) const
 get the scheme used (const version)

CPSAttribMaker< T > * getScheme (void)
 get the scheme used

virtual void * make (CPSLocated *loc, uint32 startIndex, void *output, uint32 stride, uint32 numAttrib, bool allowNoCopy=false, uint32 srcStep=(1<< 16)) const
 inherited from CPSAttribMaker

virtual void make4 (CPSLocated *loc, uint32 startIndex, void *tab, uint32 stride, uint32 numAttrib, uint32 srcStep=(1<< 16)) const
 inherited from CPSAttribMaker

virtual void makeN (CPSLocated *loc, uint32 startIndex, void *tab, uint32 stride, uint32 numAttrib, uint32 nbReplicate, uint32 srcStep=(1<< 16)) const
 inherited from CPSAttribMaker

virtual void newElement (CPSLocated *emitterLocated, uint32 emitterIndex)
 inherited from CPSAttribMaker

 NLMISC_DECLARE_CLASS (CPSColorMemory)
virtual void resize (uint32 capacity, uint32 nbPresentElements)
virtual void serial (NLMISC::IStream &f) throw (NLMISC::EStream)
 serialisation of the object. Derivers MUST call this, (if they use the attribute of this class at least)

void setDefaultValue (T defaultValue)
void setScheme (CPSAttribMaker< T > *scheme)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)
Production of attribute
virtual T get (float input)

Protected Attributes

_DefaultValue
bool _HasMemory
float _NbCycles
CPSAttribMaker< T > * _Scheme
CPSAttrib< T > _T
+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CPSColorMemory::CPSColorMemory  )  [inline]
+
+ + + + + +
+   + + +

+ +

+Definition at line 119 of file ps_color.h. +

+

00119 { setDefaultValue(NLMISC::CRGBA::White); }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + +
CPSAttribMakerBase* NL3D::CPSColorMemory::clone  )  const [inline, virtual]
+
+ + + + + +
+   + + +

+ +

+Implements NL3D::CPSAttribMakerBase. +

+Definition at line 121 of file ps_color.h. +

+

00121 { return new CPSColorMemory(*this); }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::deleteElement uint32  index  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+Reimplemented from NL3D::CPSAttribMaker< T >. +

+Definition at line 1558 of file ps_attrib_maker_helper.h. +

+

01559         { 
+01560                 nlassert(_Scheme); // you should have called setScheme !
+01561                 _T.remove(index); 
+01562                 if (_Scheme->hasMemory())
+01563                 {
+01564                         _Scheme->deleteElement(index);
+01565                 }
+01566         }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual T NL3D::CPSAttribMaker< T >::get float  input  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Direct lookup of the result value from a float input (if it makes sense). This bypass what was set with setInput The input must be in [0, 1[ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 161 of file ps_attrib_maker.h. +

+

00161 { nlassert(0); return T(); /* not supported by default */ }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual T NL3D::CPSAttribMakerMemoryBase< T >::get CPSLocated loc,
uint32  index
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+Implements NL3D::CPSAttribMaker< T >. +

+Definition at line 1399 of file ps_attrib_maker_helper.h. +

+

01400         { 
+01401                 if (index < _T.getSize()) return _T[index];
+01402                 else return _DefaultValue;
+01403         }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual bool NL3D::CPSAttribMaker< T >::getClamping void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Test if the clamping is enabled. The default is false (clamping unsupported)

See also:
isClampingSupported()
+ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 272 of file ps_attrib_maker.h. +

+

00272 { return false  ; }
+
+

+ + + + +
+ + + + + + + + + +
virtual std::string NLMISC::IClassable::getClassName  )  [pure virtual, inherited]
+
+ + + + + +
+   + + +

+ +

+Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. +

+Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize().

+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
T NL3D::CPSAttribMakerMemoryBase< T >::getDefaultValue void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the default value : +

+ +

+Definition at line 1356 of file ps_attrib_maker_helper.h. +

+

01356 { return _DefaultValue; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual CPSInputType NL3D::CPSAttribMaker< T >::getInput void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+get the type of input (if supported). The default return attrDate

See also:
hasCustomInput()
+ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 251 of file ps_attrib_maker.h. +

+

00251 { return CPSInputType() ; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual T NL3D::CPSAttribMaker< T >::getMaxValue void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+get the min value, or an evalution that is guaranteed to be < to it (meaningful for ordered set only) +

+ +

+Reimplemented in NL3D::CPSAttribMakerBinOp< T >, NL3D::CPSAttribMakerMemory< uint32 >, NL3D::CPSAttribMakerMemory< sint32 >, NL3D::CPSAttribMakerMemory< float >, NL3D::CPSValueBlender< T >, NL3D::CPSValueBlenderSample< T, n >, NL3D::CPSValueGradient< T >, NL3D::CPSFloatCurve, NL3D::CPSAttribMakerBinOp< float >, NL3D::CPSAttribMakerBinOp< CPlaneBasis >, NL3D::CPSAttribMakerBinOp< uint32 >, NL3D::CPSAttribMakerBinOp< NLMISC::CRGBA >, NL3D::CPSAttribMakerBinOp< sint32 >, NL3D::CPSValueBlender< float >, NL3D::CPSValueBlender< CPlaneBasis >, NL3D::CPSValueBlender< uint32 >, NL3D::CPSValueBlender< NLMISC::CRGBA >, NL3D::CPSValueBlender< sint32 >, NL3D::CPSValueBlenderSample< NLMISC::CRGBA, 64 >, NL3D::CPSValueGradient< float >, NL3D::CPSValueGradient< CPlaneBasis >, NL3D::CPSValueGradient< NLMISC::CRGBA >, NL3D::CPSValueGradient< uint32 >, and NL3D::CPSValueGradient< sint32 >. +

+Definition at line 217 of file ps_attrib_maker.h. +

+

00217 { return T() ; /* no mean by default */ }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual T NL3D::CPSAttribMaker< T >::getMinValue void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+get the max value, or an evalution that is guaranteed to be > to it (meaningful for ordered set only) +

+ +

+Reimplemented in NL3D::CPSAttribMakerBinOp< T >, NL3D::CPSAttribMakerMemory< uint32 >, NL3D::CPSAttribMakerMemory< sint32 >, NL3D::CPSAttribMakerMemory< float >, NL3D::CPSValueBlender< T >, NL3D::CPSValueBlenderSample< T, n >, NL3D::CPSValueGradient< T >, NL3D::CPSFloatCurve, NL3D::CPSAttribMakerBinOp< float >, NL3D::CPSAttribMakerBinOp< CPlaneBasis >, NL3D::CPSAttribMakerBinOp< uint32 >, NL3D::CPSAttribMakerBinOp< NLMISC::CRGBA >, NL3D::CPSAttribMakerBinOp< sint32 >, NL3D::CPSValueBlender< float >, NL3D::CPSValueBlender< CPlaneBasis >, NL3D::CPSValueBlender< uint32 >, NL3D::CPSValueBlender< NLMISC::CRGBA >, NL3D::CPSValueBlender< sint32 >, NL3D::CPSValueBlenderSample< NLMISC::CRGBA, 64 >, NL3D::CPSValueGradient< float >, NL3D::CPSValueGradient< CPlaneBasis >, NL3D::CPSValueGradient< NLMISC::CRGBA >, NL3D::CPSValueGradient< uint32 >, and NL3D::CPSValueGradient< sint32 >. +

+Definition at line 215 of file ps_attrib_maker.h. +

+

00215 { return T() ; /* no mean by default */ }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
float NL3D::CPSAttribMaker< T >::getNbCycles void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Retrieve the number of cycles

See also:
setNbCycles()
+ +

+Definition at line 236 of file ps_attrib_maker.h. +

+

00236 { return _NbCycles ; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
const CPSAttribMaker<T>* NL3D::CPSAttribMakerMemoryBase< T >::getScheme void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+get the scheme used (const version) +

+ +

+Definition at line 1377 of file ps_attrib_maker_helper.h. +

+

01377 { return _Scheme; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
CPSAttribMaker<T>* NL3D::CPSAttribMakerMemoryBase< T >::getScheme void   )  [inline, inherited]
+
+ + + + + +
+   + + +

+get the scheme used +

+ +

+Definition at line 1375 of file ps_attrib_maker_helper.h. +

+

01375 { return _Scheme; }
+
+

+ + + + +
+ + + + + + + + + + + + +
+template<typename T>
virtual const char* NL3D::CPSAttribMaker< T >::getType  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMakerBase. Template specialization will do the job +

+ +

+Implements NL3D::CPSAttribMakerBase. +

+Definition at line 147 of file ps_attrib_maker.h. +

+

00147 { return "UNKNOWN"; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual bool NL3D::CPSAttribMaker< T >::hasCustomInput void   )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+tells wether one may choose one attribute from a CPSLocated to use as an input. If false, the input(s) is fixed +

+ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 239 of file ps_attrib_maker.h. +

+

00239 { return false ; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
bool NL3D::CPSAttribMaker< T >::hasMemory void   )  const [inline, inherited]
+
+ + + + + +
+   + + +

+Some attribute makers may hold memory. this return true when this is the case. This also mean that you must call newElement, deleteElement, and resize, when it is called for the owning object (which is likely to be a CPSLocatedBindable) +

+Definition at line 282 of file ps_attrib_maker.h. +

+Referenced by NL3D::CPSLocated::setLifeScheme(), and NL3D::CPSLocated::setMassScheme(). +

+

00282 { return _HasMemory ; }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual bool NL3D::CPSAttribMaker< T >::isClampingSupported void   )  const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+tells wether clamping is supported for the input (value can't go above MaxInputValue) The default is false +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 258 of file ps_attrib_maker.h. +

+

00258 { return false ; }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual void* NL3D::CPSAttribMakerMemoryBase< T >::make CPSLocated loc,
uint32  startIndex,
void *  output,
uint32  stride,
uint32  numAttrib,
bool  allowNoCopy = false,
uint32  srcStep = (1 << 16)
const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+Implements NL3D::CPSAttribMaker< T >. +

+Definition at line 1406 of file ps_attrib_maker_helper.h. +

+

01414         {
+01415                 if (!numAttrib) return output;
+01416                 void *tab = output;
+01417                 if (!allowNoCopy || srcStep != (1 << 16) || sizeof(T) != stride)
+01418                 {
+01419                         // we just copy what we have memorized
+01420                         if (srcStep == (1 << 16))
+01421                         {
+01422                                 typename CPSAttrib<T>::const_iterator it = _T.begin() + startIndex, endIt = _T.begin() + startIndex + numAttrib;
+01423                                 do
+01424                                 {
+01425                                         *(T *) tab = *it;
+01426                                         ++it;
+01427                                         tab = (uint8 *) tab + stride;
+01428                                 }
+01429                                 while (it != endIt);
+01430                         }
+01431                         else // no constant step
+01432                         {
+01433                                 uint32 fpIndex = startIndex * srcStep;
+01434                                 typename CPSAttrib<T>::const_iterator startIt = _T.begin();
+01435                                 while (numAttrib --)
+01436                                 {
+01437                                         *(T *) tab = *(startIt + (fpIndex >> 16));                                      
+01438                                         tab = (uint8 *) tab + stride;
+01439                                         fpIndex += srcStep;
+01440                                 }                               
+01441                         }
+01442                         return output;
+01443                 }
+01444                 else
+01445                 {
+01446                         // the caller will read data directly in the vector ...
+01447                         return (void *) &(*(_T.begin() + startIndex));
+01448                 }
+01449         }       
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::make4 CPSLocated loc,
uint32  startIndex,
void *  tab,
uint32  stride,
uint32  numAttrib,
uint32  srcStep = (1 << 16)
const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+Implements NL3D::CPSAttribMaker< T >. +

+Definition at line 1452 of file ps_attrib_maker_helper.h. +

+

01459         {
+01460                 // we just copy what we have memorized
+01461                 if (srcStep == (1 << 16))
+01462                 {
+01463                         typename CPSAttrib<T>::const_iterator it = _T.begin() + startIndex, endIt = _T.begin() + startIndex + numAttrib;
+01464                         while (it != endIt)
+01465                         {
+01466                                 *(T *) tab = *it;
+01467                                 tab = (uint8 *) tab + stride;
+01468                                 *(T *) tab = *it;
+01469                                 tab = (uint8 *) tab + stride;
+01470                                 *(T *) tab = *it;
+01471                                 tab = (uint8 *) tab + stride;
+01472                                 *(T *) tab = *it;
+01473                                 tab = (uint8 *) tab + stride;
+01474                                 ++it;                   
+01475                         }
+01476                 }
+01477                 else
+01478                 {
+01479                         uint32 fpIndex = startIndex * srcStep;
+01480                         typename CPSAttrib<T>::const_iterator startIt = _T.begin();
+01481                         while (numAttrib --)
+01482                         {
+01483                                 *(T *) tab = *(startIt + (fpIndex >> 16));                                      
+01484                                 *(T *) ((uint8 *) tab + stride) = *(T *) tab;
+01485                                 tab = (uint8 *) tab + stride;
+01486                                 *(T *) ((uint8 *) tab + stride) = *(T *) tab;
+01487                                 tab = (uint8 *) tab + stride;
+01488                                 *(T *) ((uint8 *) tab + stride) = *(T *) tab;
+01489 
+01490                                 tab = (uint8 *) tab + stride + stride;
+01491                                 fpIndex += srcStep;
+01492                         }       
+01493                 }
+01494         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::makeN CPSLocated loc,
uint32  startIndex,
void *  tab,
uint32  stride,
uint32  numAttrib,
uint32  nbReplicate,
uint32  srcStep = (1 << 16)
const [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+Implements NL3D::CPSAttribMaker< T >. +

+Definition at line 1497 of file ps_attrib_maker_helper.h. +

+

01505         {
+01506                 // we just copy what we have memorized
+01507                 uint k;
+01508                 typename CPSAttrib<T>::const_iterator it = _T.begin() + startIndex, endIt = _T.begin() + startIndex + numAttrib;
+01509                 if (srcStep == (1 << 16))
+01510                 {
+01511                         while (it != endIt)
+01512                         {
+01513                         
+01514                                 for (k = 0; k < nbReplicate; ++k)
+01515                                 {
+01516                                         *(T *) tab = *it;
+01517                                         tab = (uint8 *) tab + stride;
+01518                                 }                       
+01519                                 ++it;
+01520                         }
+01521                 }
+01522                 else
+01523                 {
+01524                         uint32 fpIndex = startIndex * srcStep;
+01525                         typename CPSAttrib<T>::const_iterator startIt = _T.begin();     
+01526 
+01527                         while (numAttrib --)
+01528                         {               
+01529                                 *(T *) tab = *(startIt + (fpIndex >> 16));
+01530                                 for (k = 1; k < nbReplicate; ++k)
+01531                                 {
+01532                                         *(T *) ((uint8 *) tab + stride) = *(T *) tab;
+01533                                         tab = (uint8 *) tab + stride;
+01534                                 }
+01535                                 tab = (uint8 *) tab + stride;
+01536                                 fpIndex += srcStep;
+01537                         }
+01538 
+01539                 }               
+01540         }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::newElement CPSLocated emitterLocated,
uint32  emitterIndex
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+inherited from CPSAttribMaker +

+ +

+well a value may be returned without having to know the emitter (random, user param ...) but this case is really useless anyway ... +

+Reimplemented from NL3D::CPSAttribMaker< T >. +

+Reimplemented in NL3D::CPSAttribMakerMemory< uint32 >, NL3D::CPSAttribMakerMemory< sint32 >, and NL3D::CPSAttribMakerMemory< float >. +

+Definition at line 1568 of file ps_attrib_maker_helper.h. +

+

01569         { 
+01570                 nlassert(_Scheme); // you should have called setScheme !
+01571 
+01572                 // we should create the contained scheme before this one if it has memory...
+01573                 if (_Scheme->hasMemory())
+01574                 {
+01575                         _Scheme->newElement(emitterLocated, emitterIndex);
+01576                 }
+01577 
+01578                 if (emitterLocated)
+01579                 {
+01580                         _T.insert(_Scheme->get(emitterLocated, emitterIndex));
+01581                 }
+01582                 else
+01583                 {                       
+01588                         _T.insert(_DefaultValue);
+01589                 }               
+01590         }
+
+

+ + + + +
+ + + + + + + + + + +
NL3D::CPSColorMemory::NLMISC_DECLARE_CLASS CPSColorMemory   ) 
+
+ + + + + +
+   + + +

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::resize uint32  capacity,
uint32  nbPresentElements
[inline, virtual, inherited]
+
+ + + + + +
+   + + +

+set a new capacity for the memorized attribute, and a number of used element. This usually is 0 , but during edition, this may not be ... so new element are created. this must be called only if this attribute maker has its own memory +

+Reimplemented from NL3D::CPSAttribMaker< T >. +

+Definition at line 1591 of file ps_attrib_maker_helper.h. +

+

01592         {
+01593                 nlassert(capacity < (1 << 16));
+01594                 _T.resize(capacity);
+01595                 if (nbPresentElements > _T.getSize())
+01596                 {
+01597                         while (_T.getSize() != nbPresentElements)
+01598                         {
+01599                                 _T.insert(_DefaultValue);
+01600                         }
+01601                 }
+01602                 else if (nbPresentElements < _T.getSize())
+01603                 {
+01604                         while (_T.getSize() != nbPresentElements)
+01605                         {
+01606                                 _T.remove(_T.getSize() - 1);
+01607                         }
+01608                 }
+01609 
+01610 
+01611                 if (_Scheme && _Scheme->hasMemory())
+01612                 {
+01613                         _Scheme->resize(capacity,   nbPresentElements);
+01614                 }
+01615 
+01616         }       
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMakerMemoryBase< T >::serial NLMISC::IStream f  )  throw (NLMISC::EStream) [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+serialisation of the object. Derivers MUST call this, (if they use the attribute of this class at least) +

+ +

+Reimplemented from NL3D::CPSAttribMaker< T >. +

+Reimplemented in NL3D::CPSAttribMakerMemory< uint32 >, NL3D::CPSAttribMakerMemory< sint32 >, and NL3D::CPSAttribMakerMemory< float >. +

+Definition at line 1543 of file ps_attrib_maker_helper.h. +

+

01544         {
+01545                 
+01546                 f.serialVersion(1);
+01547                 CPSAttribMaker<T>::serial(f);
+01548                 if (f.isReading())
+01549                 {
+01550                         if (_Scheme) delete _Scheme;
+01551                 }
+01552                 f.serialPolyPtr(_Scheme);
+01553                 f.serial(_T);
+01554                 f.serial(_DefaultValue);
+01555         }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMaker< T >::setClamping bool  enable = true  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+Enable, disable the clamping of input values. The default does nothing (clamping unsupported)

See also:
isClampingSupported()
+ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 265 of file ps_attrib_maker.h. +

+

00265 {} ;
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
void NL3D::CPSAttribMakerMemoryBase< T >::setDefaultValue defaultValue  )  [inline, inherited]
+
+ + + + + +
+   + + +

+set a default value for initialisation, otherwise it will be garbage. This is needed when new element are generated, but not from an emitter for example, when you set this scheme to a LocatedBindable that does have a least one instance in it

+example : CPSDot *d = new CPSDot; CPSAttribMakerMemory<RGBA> *genAttribMaker = new CPSAttribMakerMemory<RGBA>; genAttribMaker->setScheme(CPSColorBlender(CRGBA::White, CRGBA::Black) Now, if an emitter emit these particle, it'll start to emit white ones, and then black ones d->setColorScheme( genAttribMaker); now, suppose that there were several dot instanciated before the setScheme is performed : d->newElement(); no color has been memorized for this element, so when setScheme is performed, it has to generate one There are no emitter that provides it, so its taken from the default value Note : this should only be useful in an editor, that allow the user to change the scheme with a running system ... +

+Definition at line 1353 of file ps_attrib_maker_helper.h. +

+

01353 { _DefaultValue = defaultValue;}
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
virtual void NL3D::CPSAttribMaker< T >::setInput const CPSInputType input  )  [inline, virtual, inherited]
+
+ + + + + +
+   + + +

+set a new input type (if supported). The default does nothing

See also:
hasCustomInput()
+ +

+Reimplemented in NL3D::CPSAttribMakerT< T, F >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueGradientFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< sint32, CPSValueBlendFunc< sint32 > >, NL3D::CPSAttribMakerT< T, CPSValueGradientFunc< T > >, NL3D::CPSAttribMakerT< sint32, CPSValueGradientFunc< sint32 > >, NL3D::CPSAttribMakerT< uint32, CPSValueGradientFunc< uint32 > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendFunc< NLMISC::CRGBA > >, NL3D::CPSAttribMakerT< float, CPSFloatCurveFunctor >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueBlendFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< float, CPSValueGradientFunc< float > >, NL3D::CPSAttribMakerT< float, CPSValueBlendFunc< float > >, NL3D::CPSAttribMakerT< T, CPSValueBlendSampleFunc< T, n > >, NL3D::CPSAttribMakerT< NLMISC::CRGBA, CPSValueBlendSampleFunc< NLMISC::CRGBA, n > >, NL3D::CPSAttribMakerT< CPlaneBasis, CPSValueGradientFunc< CPlaneBasis > >, NL3D::CPSAttribMakerT< CPlaneBasis, CSpinnerFunctor >, NL3D::CPSAttribMakerT< T, CPSValueBlendFunc< T > >, and NL3D::CPSAttribMakerT< uint32, CPSValueBlendFunc< uint32 > >. +

+Definition at line 245 of file ps_attrib_maker.h. +

+

00245 {}
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
void NL3D::CPSAttribMaker< T >::setNbCycles float  nbCycles  )  [inline, inherited]
+
+ + + + + +
+   + + +

+Set the number of cycles that must be done during the life of a particle, or the number of cycle per second for a particle that has no life limit. It is used to multiply the input used by this attribute maker It must be >= 0 +

+Definition at line 227 of file ps_attrib_maker.h. +

+

00228                 { 
+00229                         nlassert(nbCycles >= 0) ;
+00230                         _NbCycles = nbCycles ; 
+00231                 }
+
+

+ + + + +
+ + + + + + + + + + + + + +
+template<typename T>
void NL3D::CPSAttribMakerMemoryBase< T >::setScheme CPSAttribMaker< T > *  scheme  )  [inline, inherited]
+
+ + + + + +
+   + + +

+set the scheme used to store attribute. this MUST be called, otherwise an assertion will be thrown later It must have been allocated by new, and it will be deleted by this object +

+Definition at line 1363 of file ps_attrib_maker_helper.h. +

+

01364         {
+01365                 nlassert(scheme);
+01366                 if (_Scheme) delete _Scheme;
+01367                 _Scheme = scheme;
+01368                 if (_Scheme->hasMemory())
+01369                 {
+01370                         _Scheme->resize(_T.getMaxSize(), _T.getSize());
+01371                 }
+01372         }
+
+


Field Documentation

+

+ + + + +
+ + + + + +
+template<typename T>
T NL3D::CPSAttribMakerMemoryBase< T >::_DefaultValue [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1624 of file ps_attrib_maker_helper.h.

+

+ + + + +
+ + + + + +
+template<typename T>
bool NL3D::CPSAttribMaker< T >::_HasMemory [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 304 of file ps_attrib_maker.h.

+

+ + + + +
+ + + + + +
+template<typename T>
float NL3D::CPSAttribMaker< T >::_NbCycles [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 301 of file ps_attrib_maker.h.

+

+ + + + +
+ + + + + +
+template<typename T>
CPSAttribMaker<T>* NL3D::CPSAttribMakerMemoryBase< T >::_Scheme [protected, inherited] +
+
+ + + + + +
+   + + +

+this attribute maker tells us how to produce arguments from an emitter. as an example, we may want to have a gradient of color : the emitter emit green then blue particles, following a gradient. the color is produced by _Scheme and _T stores it +

+Definition at line 1630 of file ps_attrib_maker_helper.h.

+

+ + + + +
+ + + + + +
+template<typename T>
CPSAttrib<T> NL3D::CPSAttribMakerMemoryBase< T >::_T [protected, inherited] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 1621 of file ps_attrib_maker_helper.h.

+


The documentation for this class was generated from the following file: +
Generated on Tue Mar 16 07:05:36 2004 for NeL by + +doxygen +1.3.6
+ + -- cgit v1.2.1