#include <ps_float.h>
Inheritance diagram for NL3D::CPSFloatBlender:

Definition at line 45 of file ps_float.h.
Public Types | |
| typedef CPSValueBlendFunc< float > | functor_type |
| the type of the functor object | |
| typedef float | value_type |
| the type of the attribute to be produced | |
Public Member Functions | |
| CPSAttribMakerBase * | clone () const |
| CPSFloatBlender (float startFloat=0.1f, float endFloat=1.f, float nbCycles=1.0f) | |
| virtual void | deleteElement (uint32 index) |
| delete an element, given its index. this must be called only if memory management is used. | |
| virtual float | get (float input) |
| virtual float | get (CPSLocated *loc, uint32 index) |
| compute one value of the attribute for the given index | |
| virtual bool | getClamping (void) const |
| virtual std::string | getClassName ()=0 |
| virtual CPSInputType | getInput (void) const |
| virtual float | getMaxValue (void) const |
| get the min value, or an evalution that is guaranteed to be < to it (meaningful for ordered set only) | |
| virtual float | getMinValue (void) const |
| get the max value, or an evalution that is guaranteed to be > to it (meaningful for ordered set only) | |
| float | getNbCycles (void) const |
| virtual const char * | getType () |
| inherited from CPSAttribMakerBase. Template specialization will do the job | |
| virtual bool | hasCustomInput (void) |
| bool | hasMemory (void) const |
| bool | isClampingSupported (void) const |
| virtual void | newElement (CPSLocated *emitterLocated, uint32 emitterIndex) |
| NLMISC_DECLARE_CLASS (CPSFloatBlender) | |
| virtual void | resize (uint32 capacity, uint32 nbPresentElements) |
| virtual void | serial (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serialisation of the object | |
| virtual void | setClamping (bool enable=true) |
| virtual void | setInput (const CPSInputType &input) |
| void | setNbCycles (float nbCycles) |
Data Fields | |
| CPSValueBlendFunc< float > | _F |
| the functor object | |
Protected Attributes | |
| bool | _HasMemory |
| float | _NbCycles |
|
|
the type of the functor object
Definition at line 174 of file ps_attrib_maker_helper.h. |
|
|
the type of the attribute to be produced
Definition at line 171 of file ps_attrib_maker_helper.h. |
|
||||||||||||||||
|
Definition at line 49 of file ps_float.h.
00049 : CPSValueBlender<float>(nbCycles)
00050 {
00051 _F.setValues(startFloat, endFloat);
00052 }
|
|
|
Implements NL3D::CPSAttribMakerBase. Definition at line 53 of file ps_float.h.
00053 { return new CPSFloatBlender(*this); }
|
|
|
delete an element, given its index. this must be called only if memory management is used.
Reimplemented in NL3D::CPSAttribMakerBinOp< float >, and NL3D::CPSAttribMakerMemoryBase< float >. Definition at line 285 of file ps_attrib_maker.h. Referenced by NL3D::CPSRotated2DParticle::deleteAngle2DElement(), NL3D::CPSSound::deleteElement(), NL3D::CPSConstraintMesh::deleteElement(), NL3D::CPSLight::deleteElement(), NL3D::CPSEmitter::deleteElement(), NL3D::CPSModulatedEmitter::deleteEmitteeSpeedElement(), NL3D::CPSForceIntensity::deleteForceIntensityElement(), and NL3D::CPSSizedParticle::deleteSizeElement().
00285 { nlassert(false) ; }
|
|
|
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 from NL3D::CPSAttribMaker< float >. Definition at line 60 of file ps_attrib_maker_helper.h.
00061 {
00062 NLMISC::OptFastFloorBegin();
00063 nlassert(input >= 0.f && input <= 1.f);
00064 return _F(input);
00065 NLMISC::OptFastFloorEnd();
00066 }
|
|
||||||||||||
|
compute one value of the attribute for the given index
Implements NL3D::CPSAttribMaker< float >. |
|
|
Test if the clamping is enabled.
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 167 of file ps_attrib_maker_helper.h.
00167 { return _Clamp; };
|
|
|
Implemented in NLAIAGENT::CNumericIndex, NLAIC::IPointerGestion, NLAIC::CIdentType, and CAutomataDesc. Referenced by NLMISC::CClassRegistry::checkObject(), and NL3D::GetTextureSize(). |
|
|
get the type of input (if supported). The default return attrDate
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 150 of file ps_attrib_maker_helper.h.
00150 { return _InputType; }
|
|
|
get the min value, or an evalution that is guaranteed to be < to it (meaningful for ordered set only)
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 173 of file ps_attrib_maker_template.h.
00173 { return _F.getMaxValue(); }
|
|
|
get the max value, or an evalution that is guaranteed to be > to it (meaningful for ordered set only)
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 174 of file ps_attrib_maker_template.h.
00174 { return _F.getMinValue(); }
|
|
|
Retrieve the number of cycles
Definition at line 236 of file ps_attrib_maker.h.
00236 { return _NbCycles ; }
|
|
|
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"; }
|
|
|
tells wether one may choose one attribute from a CPSLocated to use as an input. If false, the input(s) is fixed For this class, it is supported Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 139 of file ps_attrib_maker_helper.h.
00139 { return true; }
|
|
|
|
tells wether clamping is supported for the input (value can't go above MaxInputValue) Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 155 of file ps_attrib_maker_helper.h.
00155 { return true; }
|
|
||||||||||||
|
create a new element, and provides the emitter, this must be called only if this attribute maker has its own memory Reimplemented in NL3D::CPSAttribMakerMemory< float >, NL3D::CPSAttribMakerBinOp< float >, and NL3D::CPSAttribMakerMemoryBase< float >. Definition at line 290 of file ps_attrib_maker.h. Referenced by NL3D::CPSRotated2DParticle::newAngle2DElement(), NL3D::CPSSound::newElement(), NL3D::CPSConstraintMesh::newElement(), NL3D::CPSLight::newElement(), NL3D::CPSEmitter::newElement(), NL3D::CPSModulatedEmitter::newEmitteeSpeedElement(), NL3D::CPSForceIntensity::newForceIntensityElement(), and NL3D::CPSSizedParticle::newSizeElement().
00290 { nlassert(false) ; }
|
|
|
|
|
||||||||||||
|
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 in NL3D::CPSAttribMakerBinOp< float >, and NL3D::CPSAttribMakerMemoryBase< float >. Definition at line 296 of file ps_attrib_maker.h. Referenced by NL3D::CPSSound::resize(), NL3D::CPSConstraintMesh::resize(), NL3D::CPSLight::resize(), NL3D::CPSEmitter::resize(), NL3D::CPSRotated2DParticle::resizeAngle2D(), NL3D::CPSModulatedEmitter::resizeEmitteeSpeed(), NL3D::CPSForceIntensity::resizeForceIntensity(), NL3D::CPSSizedParticle::resizeSize(), NL3D::CPSLight::setAttenEndScheme(), NL3D::CPSLight::setAttenStartScheme(), NL3D::CPSSound::setGainScheme(), NL3D::CPSConstraintMesh::setMorphScheme(), and NL3D::CPSSound::setPitchScheme().
00296 { nlassert(false) ; }
|
|
|
serialisation of the object The same as make4, but with n replication instead of 4
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 104 of file ps_attrib_maker_helper.h.
00105 {
00106 sint ver = f.serialVersion(2);
00107 CPSAttribMaker<T>::serial(f);
00108 f.serial(_F);
00109 switch (ver)
00110 {
00111 case 1:
00112 {
00113 CPSInputType it;
00114 f.serialEnum(it.InputType);
00115 _InputType = it;
00116 }
00117 break;
00118 case 2:
00119 f.serial(_InputType);
00120 break;
00121 }
00122 f.serial(_Clamp);
00123 }
|
|
|
Enable, disable the clamping of input values.
Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 161 of file ps_attrib_maker_helper.h.
00161 { _Clamp = enable; };
|
|
|
set a new input type Reimplemented from NL3D::CPSAttribMaker< float >. Definition at line 144 of file ps_attrib_maker_helper.h.
00144 { _InputType = input; }
|
|
|
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.
|
|
|
the functor object
Definition at line 55 of file ps_attrib_maker_helper.h. |
|
|
Definition at line 304 of file ps_attrib_maker.h. |
|
|
Definition at line 301 of file ps_attrib_maker.h. |
1.3.6