Panda3D
Functions
lerp_helpers.h File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "directbase.h"

Go to the source code of this file.

Functions

template<class NumericType >
void lerp_value (NumericType &current_value, double d, const NumericType &starting_value, const NumericType &ending_value)
 Applies the linear lerp computation for a single parameter. More...
 
template<class NumericType >
void lerp_value_from_prev (NumericType &current_value, double d, double prev_d, const NumericType &prev_value, const NumericType &ending_value)
 Applies the linear lerp computation for a single parameter, when the starting value is implicit. More...
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2002-08-27

Definition in file lerp_helpers.h.

Function Documentation

◆ lerp_value()

template<class NumericType >
void lerp_value ( NumericType &  current_value,
double  d,
const NumericType &  starting_value,
const NumericType &  ending_value 
)
inline

Applies the linear lerp computation for a single parameter.

Definition at line 27 of file lerp_helpers.h.

Referenced by CLerpAnimEffectInterval::priv_step().

◆ lerp_value_from_prev()

template<class NumericType >
void lerp_value_from_prev ( NumericType &  current_value,
double  d,
double  prev_d,
const NumericType &  prev_value,
const NumericType &  ending_value 
)
inline

Applies the linear lerp computation for a single parameter, when the starting value is implicit.

This computes the new value based on assuming the prev_value represents the value computed at delta prev_d.

Definition at line 43 of file lerp_helpers.h.