Vigilante Game Framework  1.0.0.8
A 2D/3D C++ Game Framework using SFML.
Public Types | Static Public Member Functions | List of all members
VInterpolate Class Reference

A helper class for calculating interpolation using Robert Penner's Easing functions. More...

#include <VInterpolate.h>

Public Types

enum  VInterpolateType {
  InBack, OutBack, InOutBack, InBounce,
  OutBounce, InOutBounce, InCirc, OutCirc,
  InOutCirc, InCubic, OutCubic, InOutCubic,
  InElastic, OutElastic, InOutElastic, InExpo,
  OutExpo, InOutExpo, Linear, InQuad,
  OutQuad, InOutQuad, InQuart, OutQuart,
  InOutQuart, InQuint, OutQuint, InOutQuint,
  InSine, OutSine, InOutSine, NumInterpolationTypes
}
 The many types of easing functions, both intro, outtro and inouttros.
 

Static Public Member Functions

static float Angle (float a, float b, float t, float d=1.0f, VInterpolateType type=Linear)
 
static float Float (float a, float b, float t, float d=1.0f, VInterpolateType type=Linear)
 
static sf::Color Color (sf::Color a, sf::Color b, float t, float d=1.0f, VInterpolateType type=Linear)
 
static sf::Vector2f Vector2f (sf::Vector2f a, sf::Vector2f b, float t, float d=1.0f, VInterpolateType type=Linear)
 
static sf::Vector3f Vector3f (sf::Vector3f a, sf::Vector3f b, float t, float d=1.0f, VInterpolateType type=Linear)
 

Detailed Description

A helper class for calculating interpolation using Robert Penner's Easing functions.

Member Function Documentation

◆ Angle()

static float VInterpolate::Angle ( float  a,
float  b,
float  t,
float  d = 1.0f,
VInterpolateType  type = Linear 
)
static

Interpolates based on angle in degrees (0 - 360)

Parameters
aStart point.
bFinish point.
tCurrent point in time.
dTotal length of time.
typeEasing function.

◆ Color()

static sf::Color VInterpolate::Color ( sf::Color  a,
sf::Color  b,
float  t,
float  d = 1.0f,
VInterpolateType  type = Linear 
)
static

Interpolates color values using the sf::Color variable.

Parameters
aStart point.
bFinish point.
tCurrent point in time.
dTotal length of time.
typeEasing function.

◆ Float()

static float VInterpolate::Float ( float  a,
float  b,
float  t,
float  d = 1.0f,
VInterpolateType  type = Linear 
)
static

Interpolates standard float variables.

Parameters
aStart point.
bFinish point.
tCurrent point in time.
dTotal length of time.
typeEasing function.

◆ Vector2f()

static sf::Vector2f VInterpolate::Vector2f ( sf::Vector2f  a,
sf::Vector2f  b,
float  t,
float  d = 1.0f,
VInterpolateType  type = Linear 
)
static

Interpolates two dimensional vector floats using sf::Vector2f.

Parameters
aStart point.
bFinish point.
tCurrent point in time.
dTotal length of time.
typeEasing function.

◆ Vector3f()

static sf::Vector3f VInterpolate::Vector3f ( sf::Vector3f  a,
sf::Vector3f  b,
float  t,
float  d = 1.0f,
VInterpolateType  type = Linear 
)
static

Interpolates three dimensional vector floats variables.

Parameters
aStart point.
bFinish point.
tCurrent point in time.
dTotal length of time.
typeEasing function.

The documentation for this class was generated from the following file: