Web Analytics Made Easy - Statcounter
Skip to content

Class SBDTypeEasingCurve#

ClassList > SBDTypeEasingCurve

This class describes an easing curve. More...

  • #include <SBDTypeEasingCurve.hpp>

Public Types#

Type Name
enum Type
The type of the easing curve.

Public Functions#

Type Name
SBDTypeEasingCurve (Type type=Linear)
Constructs an easing curve.
SBDTypeEasingCurve (const SBDTypeEasingCurve & EasingCurve)
Constructs an easing curve.
Type getType () const
Returns the type of the easing curve.
std::string getTypeString (bool humanReadable=false) const
Returns a string describing the type of the easing curve.
double getValue (double progress) const
Computes the value of the easing curve at a given progress.
bool isSerializable () const
Returns true __
SBDTypeEasingCurve & operator= (const SBDTypeEasingCurve & EasingCurve)
Copy assignment.
virtual void print (unsigned int offset=0) const
Prints the EasingCurve.
void serialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER) const
Serializes the easing curve.
void setType (Type type)
Sets the type of the easing curve.
void unserialize (SBCSerializer * serializer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER)
Unserializes the easing curve.
virtual ~SBDTypeEasingCurve ()
Destructs the easing curve.

Public Static Functions#

Type Name
std::string getTypeString (Type type, bool humanReadable=false)
Returns a string describing the type of the easing curve.
double getValue (Type type, double progress)
Returns the value for a given progress .

Protected Attributes#

Type Name
SBDTypeEasingCurveData * dataPointer
A pointer to the private data.

Detailed Description#

This class describes an easing curve in SAMSON.

Short name: SBEasingCurve

Public Types Documentation#

enum Type#

The type of the easing curve.

enum SBDTypeEasingCurve::Type {
    Linear = 1,
    InSine = 10,
    OutSine = 11,
    InOutSine = 12,
    InQuad = 20,
    OutQuad = 21,
    InOutQuad = 22,
    InCubic = 30,
    OutCubic = 31,
    InOutCubic = 32,
    InQuart = 40,
    OutQuart = 41,
    InOutQuart = 42,
    InQuint = 50,
    OutQuint = 51,
    InOutQuint = 52,
    InExpo = 60,
    OutExpo = 61,
    InOutExpo = 62,
    InCirc = 70,
    OutCirc = 71,
    InOutCirc = 72,
    InBack = 80,
    OutBack = 81,
    InOutBack = 82,
    InElastic = 90,
    OutElastic = 91,
    InOutElastic = 92,
    InBounce = 100,
    OutBounce = 101,
    InOutBounce = 102
};


Public Functions Documentation#

function SBDTypeEasingCurve [1/2]#

Constructs an easing curve.

SBDTypeEasingCurve::SBDTypeEasingCurve (
    Type type=Linear
) 

Constructs an easing curve with the specified type.

Initializes the easing curve to the given type.

Parameters:

  • type The type of the easing curve.

function SBDTypeEasingCurve [2/2]#

Constructs an easing curve.

SBDTypeEasingCurve::SBDTypeEasingCurve (
    const SBDTypeEasingCurve & EasingCurve
) 

Copy-constructs an easing curve from another instance.

Creates a new easing curve that is a copy of the provided one.

Parameters:

  • EasingCurve The easing curve to copy.

function getType#

Returns the type of the easing curve.

Type SBDTypeEasingCurve::getType () const

Retrieves the current type of the easing curve.

Returns:

The type of the easing curve.


function getTypeString [1/2]#

Returns a string describing the type of the easing curve.

std::string SBDTypeEasingCurve::getTypeString (
    bool humanReadable=false
) const

Returns a string describing the easing curve type.

This function is a convenience function used to produce a string corresponding to the easing curve's type.

Parameters:

  • humanReadable If true, returns a human-readable version of the type name.

Returns:

The string representation of the easing curve type. This function is a convenience function used to produce a string corresponding to the easing curve's type.


function getValue [1/2]#

Computes the value of the easing curve at a given progress.

double SBDTypeEasingCurve::getValue (
    double progress
) const

Uses the current curve type to evaluate the function.

Parameters:

  • progress A value between 0 and 1 representing the progress.

Returns:

The evaluated value of the easing curve.


function isSerializable#

Returns true __

bool SBDTypeEasingCurve::isSerializable () const

Indicates whether the easing curve can be serialized.

This function always returns true for easing curves.

Returns:

True, indicating the object is serializable.


function operator=#

Copy assignment.

SBDTypeEasingCurve & SBDTypeEasingCurve::operator= (
    const SBDTypeEasingCurve & EasingCurve
) 

Assigns the values from another easing curve to this one.

Copies the type from the source easing curve.

Parameters:

  • easingCurve The source easing curve to assign from.

Returns:

Reference to this easing curve.


function print#

Prints the EasingCurve.

virtual void SBDTypeEasingCurve::print (
    unsigned int offset=0
) const

Prints a textual representation of the easing curve to standard output.

The output is indented by the specified number of tab characters.

Parameters:

  • offset Number of tabs to prepend before printing the curve.

function serialize#

Serializes the easing curve.

void SBDTypeEasingCurve::serialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
) const

Serializes the easing curve into the provided serializer.

Writes the type of the easing curve to the serializer.

Parameters:

  • serializer The serializer to which the data will be written.
  • sdkVersionNumber The SDK version number (unused).

function setType#

Sets the type of the easing curve.

void SBDTypeEasingCurve::setType (
    Type type
) 

Parameters:

  • type The new type to assign to the easing curve.

function unserialize#

Unserializes the easing curve.

void SBDTypeEasingCurve::unserialize (
    SBCSerializer * serializer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER
) 

Unserializes the easing curve from the provided serializer.

Reads the type of the easing curve from the serializer and updates the object.

Parameters:

  • serializer The serializer from which the data will be read.
  • sdkVersionNumber The SDK version number (unused).

function ~SBDTypeEasingCurve#

Destructs the easing curve.

virtual SBDTypeEasingCurve::~SBDTypeEasingCurve () 

Destroys the easing curve and releases associated resources.


Public Static Functions Documentation#

function getTypeString [2/2]#

Returns a string describing the type of the easing curve.

static std::string SBDTypeEasingCurve::getTypeString (
    Type type,
    bool humanReadable=false
) 

Returns a string describing a given easing curve type.

This function is a convenience function used to produce a string corresponding to a given easing curve type.

Parameters:

  • type The easing curve type for which to retrieve the string.
  • humanReadable If true, returns a human-readable version of the type name.

Returns:

The string representation of the specified easing curve type. This function is a convenience function used to produce a string corresponding to a given easing curve type.


function getValue [2/2]#

Returns the value for a given progress .

static double SBDTypeEasingCurve::getValue (
    Type type,
    double progress
) 

Computes the value of the specified easing curve type at a given progress.

Evaluates the easing function corresponding to the provided type.

Parameters:

  • type The type of the easing curve to evaluate.
  • progress A value between 0 and 1 representing the progress.

Returns:

The evaluated value of the easing curve.


Protected Attributes Documentation#

variable dataPointer#

A pointer to the private data.

SBDTypeEasingCurveData* SBDTypeEasingCurve::dataPointer;