8 #include "parameterblendgroup.h"
9 #include "parameterblender.h"
12 #include <component.h>
13 #include <parameternumeric.h>
14 #include <parameterservice.h>
15 #include <rtti/deserializeresult.h>
16 #include <nap/signalslot.h>
21 class ParameterBlendComponentInstance;
45 bool mEnableBlending =
false;
46 bool mBlendOnInit =
false;
47 bool mIgnoreNonBlendableParameters =
true;
86 virtual void update(
double deltaTime)
override;
93 bool enabled()
const {
return mEnableBlending; }
99 void enable(
bool value);
104 bool isBlending()
const;
109 float getBlendValue();
114 int getIndex()
const {
return mPresetIndex->mValue; }
119 const std::vector<std::string>&
getPresets()
const {
return mPresets; }
137 bool mEnableBlending =
false;
139 std::vector<std::string> mPresets;
140 std::vector<std::unique_ptr<rtti::DeserializeResult>> mPresetData;
141 std::vector<ParameterGroup*> mPresetGroups;
142 std::vector<std::unique_ptr<BaseParameterBlender>> mBlenders;
143 double mElapsedTime = 0.0;
144 bool mBlending =
false;
145 bool mIgnoreNonBlendableParameters =
true;
167 void changePreset(
int index);
172 nap::Slot<int> mIndexChangedSlot = {
this, &ParameterBlendComponentInstance::changePreset };
ParameterBlendComponentInstance(EntityInstance &entity, Component &resource)
Definition: parameterblendcomponent.h:67
Definition: parameterservice.h:20
Definition: parameterblendcomponent.h:36
Definition: parameternumeric.h:20
Definition: objectptr.h:154
Definition: parameterblendgroup.h:21
Definition: errorstate.h:19
Definition: parameterblendcomponent.h:63
bool hasPresets() const
Definition: parameterblendcomponent.h:131
Definition: component.h:43
Definition: component.h:151
int getIndex() const
Definition: parameterblendcomponent.h:114
Definition: templateapp.h:17
const std::vector< std::string > & getPresets() const
Definition: parameterblendcomponent.h:119
bool enabled() const
Definition: parameterblendcomponent.h:93