NAP
Public Attributes | List of all members
ParameterBlendComponent Class Reference

#include <parameterblendcomponent.h>

Public Attributes

nap::ResourcePtr< ParameterBlendGroupmBlendGroup = nullptr
 Property: 'BlendGroup' all the parameters to blend over time. More...
 
nap::ResourcePtr< ParameterIntmPresetIndex = nullptr
 Property: 'PresetIndex' index of the preset to blend to. More...
 
nap::ResourcePtr< ParameterFloatmPresetBlendTime = nullptr
 Property: 'PresetBlendTime' time it takes to blend parameters (seconds) More...
 
bool mEnableBlending = false
 Property: 'EnableBlending' if blending is enabled or not. More...
 
bool mBlendOnInit = false
 Property: 'BlendOnInit' Blend to the given 'PresetIndex' on initialization. More...
 
bool mIgnoreNonBlendableParameters = true
 Property: 'IgnoreNonBlendable' if false, throws error when parameters cannot be blended. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Public Member Functions inherited from Component
virtual void getDependentComponents (std::vector< rtti::TypeInfo > &components) const
 
virtual const rtti::TypeInfo getInstanceType () const =0
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual bool init (utility::ErrorState &errorState)
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 
- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Smoothly blends a set of parameters over time towards a given preset. The parameters that are blended are defined by the 'BlendGroup'. The preset index controls the preset to sample the parameters from.

Note that the 'PresetBlendTime' and 'PresetIndex' parameter links should not be part of the 'BlendGroup'.

A blender needs to be available for every parameter that is blended. The system issues a warning on initialization when there is no blender available for a specific parameter. By default float, double, vec2, vec3 and color parameters are supported. If a preset does not contain a specific parameter a warning is issued.

Inheritance diagram for ParameterBlendComponent:
[legend]
Collaboration diagram for ParameterBlendComponent:
[legend]

Member Data Documentation

◆ mBlendGroup

nap::ResourcePtr<ParameterBlendGroup> mBlendGroup = nullptr

Property: 'BlendGroup' all the parameters to blend over time.

◆ mBlendOnInit

bool mBlendOnInit = false

Property: 'BlendOnInit' Blend to the given 'PresetIndex' on initialization.

◆ mEnableBlending

bool mEnableBlending = false

Property: 'EnableBlending' if blending is enabled or not.

◆ mIgnoreNonBlendableParameters

bool mIgnoreNonBlendableParameters = true

Property: 'IgnoreNonBlendable' if false, throws error when parameters cannot be blended.

◆ mPresetBlendTime

nap::ResourcePtr<ParameterFloat> mPresetBlendTime = nullptr

Property: 'PresetBlendTime' time it takes to blend parameters (seconds)

◆ mPresetIndex

nap::ResourcePtr<ParameterInt> mPresetIndex = nullptr

Property: 'PresetIndex' index of the preset to blend to.