NAP
Public Member Functions | Public Attributes | List of all members
ParameterVec< T > Class Template Reference

#include <parametervec.h>

Public Member Functions

virtual void setValue (const Parameter &value) override
 
void setValue (T value)
 
void setRange (typename T::value_type minimum, typename T::value_type maximum)
 
- Public Member Functions inherited from Parameter
const std::string getDisplayName () const
 
- 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
 

Public Attributes

mValue
 Property: 'Value' the value of this parameter. More...
 
bool mClamp = false
 Property: 'Clamp' if the vector is clamped to the min / max value. More...
 
T::value_type mMinimum = static_cast<typename T::value_type>(0)
 Property: 'Minimum' the minimum value of this parameter. More...
 
T::value_type mMaximum = static_cast<typename T::value_type>(1)
 Property: 'Maximum' the maximum value of this parameter. More...
 
Signal< T > valueChanged
 Signal that's raised when the value changes. More...
 
- Public Attributes inherited from Parameter
std::string mName
 Property 'Name': The name of this property. The name is separate from the ID and doesn't have to be unique. 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

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

template<typename T>
class nap::ParameterVec< T >

A numeric vector parameter can hold any numeric vector type (i.e. glm::vec2, glm::vec3, etc) The values associated with the vector are clamped to the specified min and max bounds.

Inheritance diagram for ParameterVec< T >:
[legend]
Collaboration diagram for ParameterVec< T >:
[legend]

Member Function Documentation

◆ setRange()

void setRange ( typename T::value_type  minimum,
typename T::value_type  maximum 
)

Sets the min/max range of this parameter to the specified values. If the current value is outside of the specified range, it will be clamped.

Parameters
minimumThe minimum value for this parameter
maximumThe maximum value for this parameter

◆ setValue() [1/2]

void setValue ( const Parameter value)
overridevirtual

Set the value of this enum from another parameter

Parameters
valueThe parameter to set the value from

Implements Parameter.

◆ setValue() [2/2]

void setValue ( value)

Set the value of this parameter. Will raise the valueChanged signal if the value actually changes.

Parameters
valueThe value to set

Member Data Documentation

◆ mClamp

bool mClamp = false

Property: 'Clamp' if the vector is clamped to the min / max value.

◆ mMaximum

T::value_type mMaximum = static_cast<typename T::value_type>(1)

Property: 'Maximum' the maximum value of this parameter.

◆ mMinimum

T::value_type mMinimum = static_cast<typename T::value_type>(0)

Property: 'Minimum' the minimum value of this parameter.

◆ mValue

T mValue

Property: 'Value' the value of this parameter.

◆ valueChanged

Signal<T> valueChanged

Signal that's raised when the value changes.