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

#include <sequencetracksegmentcurve.h>

Public Member Functions

bool init (utility::ErrorState &errorState) override
 
getStartValue () const
 
getEndValue () const
 
getValue (float pos) const
 
void setStartValue (T value)
 
void setEndValue (T value)
 
int getCurveCount ()
 
NAPAPI int getCurveCount ()
 
NAPAPI int getCurveCount ()
 
NAPAPI int getCurveCount ()
 
NAPAPI int getCurveCount ()
 
- Public Member Functions inherited from SequenceTrackSegment
virtual ~SequenceTrackSegment ()
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

std::vector< ResourcePtr< math::FCurve< float, float > > > mCurves
 Property: 'Curves' vector holding curves. More...
 
std::vector< math::ECurveInterpmCurveTypes
 Property: 'Curve Types' curve types of this segment ( linear, bezier ) More...
 
- Public Attributes inherited from SequenceTrackSegment
double mStartTime = 0.0
 Property: 'Start time' start time of segment in track. More...
 
double mDuration = 1.0
 Property: 'Duration' duration of segment. More...
 
std::string mLabel = "default"
 Property: 'Label' label of this segment. 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::SequenceTrackSegmentCurve< T >

A SequenceTrackSegment that holds an arbitrary amount of curves There are four supported types ( float, vec2, vec3, vec4 ) that can contain 1, 2 , 3 or 4 curves

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

Member Function Documentation

◆ getCurveCount() [1/5]

int getCurveCount ( )

Returns the total number of curves associated with this track. Needs to be specialized for every type.

Returns
total number of curves associated with this track

◆ getCurveCount() [2/5]

NAPAPI int getCurveCount ( )

◆ getCurveCount() [3/5]

NAPAPI int getCurveCount ( )

◆ getCurveCount() [4/5]

NAPAPI int getCurveCount ( )

◆ getCurveCount() [5/5]

NAPAPI int getCurveCount ( )

◆ getEndValue()

NAPAPI glm::vec4 getEndValue ( ) const

Gets the value of the last point of the curve, translated into the type

◆ getStartValue()

NAPAPI glm::vec4 getStartValue ( ) const

Gets the value of the first point of the curve, translated into the type

◆ getValue()

NAPAPI glm::vec4 getValue ( float  pos) const

Gets the value of the evaluated point of the curve, translated in to the type

Parameters
posmust be a value between 0-1 ( 0 meaning start of curve, 1 meaning end ) pos is not clamped

◆ init()

bool init ( utility::ErrorState errorState)
overridevirtual

init evaluates the data hold in curves and checks if its valid for this type

Parameters
errorStatecontains information about eventual failure of evaluation
Returns
bool indicating successfull initialization

Reimplemented from SequenceTrackSegment.

◆ setEndValue()

void setEndValue ( value)

Sets the value of the last point in the curve(s) Needs to be specialized for every type.

◆ setStartValue()

void setStartValue ( value)

Sets the value of the first point in the curve(s). Needs to be specialized for every type.

Member Data Documentation

◆ mCurves

std::vector<ResourcePtr<math::FCurve<float, float> > > mCurves

Property: 'Curves' vector holding curves.

◆ mCurveTypes

std::vector<math::ECurveInterp> mCurveTypes

Property: 'Curve Types' curve types of this segment ( linear, bezier )