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.
Constructs an easing curve with the specified type.
Initializes the easing curve to the given type.
Parameters:
typeThe type of the easing curve.
function SBDTypeEasingCurve [2/2]#
Constructs an easing curve.
Copy-constructs an easing curve from another instance.
Creates a new easing curve that is a copy of the provided one.
Parameters:
EasingCurveThe easing curve to copy.
function getType#
Returns the type of the easing curve.
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.
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:
humanReadableIf 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.
Uses the current curve type to evaluate the function.
Parameters:
progressA value between 0 and 1 representing the progress.
Returns:
The evaluated value of the easing curve.
function isSerializable#
Returns true __
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.
Assigns the values from another easing curve to this one.
Copies the type from the source easing curve.
Parameters:
easingCurveThe source easing curve to assign from.
Returns:
Reference to this easing curve.
function print#
Prints the EasingCurve.
Prints a textual representation of the easing curve to standard output.
The output is indented by the specified number of tab characters.
Parameters:
offsetNumber 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:
serializerThe serializer to which the data will be written.sdkVersionNumberThe SDK version number (unused).
function setType#
Sets the type of the easing curve.
Parameters:
typeThe 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:
serializerThe serializer from which the data will be read.sdkVersionNumberThe SDK version number (unused).
function ~SBDTypeEasingCurve#
Destructs the easing curve.
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.
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:
typeThe easing curve type for which to retrieve the string.humanReadableIf 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 .
Computes the value of the specified easing curve type at a given progress.
Evaluates the easing function corresponding to the provided type.
Parameters:
typeThe type of the easing curve to evaluate.progressA 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.