This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine.AnimationCurveFloat Class

Warning
The functionality described here is EXPERIMENTAL and is not recommended for production use. Future releases may bring significant changes to API and features. Backward compatibility of the final production-ready version is not guaranteed.
Inherits from: AnimationCurve

This class represents an interface enabling you to create and manage animation curves containing floating point precision values.

AnimationCurveFloat Class

Properties

float DefaultKeyValue#

The default value of all keys in the curve.

int NumKeys#

The total number of key points in the curve.

float MinTime#

The point of the whole animation timeline where this curve starts being applied, in units.

float MaxTime#

The point of the whole animation timeline up to which this curve is applied, in units.

Members


AnimationCurveFloat ( ) #

Constructor. Creates a new animation curve instance containing floating point precision values.

void Copy ( AnimationCurveFloat curve ) #

Copies all data (key points and tangents) from the specified source curve.

Arguments

  • AnimationCurveFloat curve - Source curve.

int AddKey ( float time, float value ) #

Adds a new key point with the specified value at the specified point of the timeline to the curve.

Arguments

  • float time - Time of the key on the timeline, in seconds.
  • float value - The float value of the key.

Return value

Index of the added key point.

int AddKey ( float time, float value, AnimationCurve.KEY_TYPE type ) #

Adds a new key point with the specified value and type at the specified point of the timeline to the curve.

Arguments

  • float time - Time of the key on the timeline, in seconds.
  • float value - The float value of the key.
  • AnimationCurve.KEY_TYPE type - Interpolation type set for the key, one of the KEY_TYPE values.

Return value

Index of the added key point.

int AddKey ( float time, float value, AnimationCurve.KEY_TYPE type, vec2 left_tangent, vec2 right_tangent ) #

Adds a new key point with the specified value, type and tangents at the specified point of the timeline to the curve.

Arguments

  • float time - Time of the key on the timeline, in seconds.
  • float value - The float value of the key.
  • AnimationCurve.KEY_TYPE type - Interpolation type set for the key, one of the KEY_TYPE values.
  • vec2 left_tangent - Coordinates of the left tangent at the key point.
  • vec2 right_tangent - Coordinates of the right tangent at the key point.

Return value

Index of the added key point.

void RemoveKey ( int index ) #

Removes the key point with the specified index from the curve.

Arguments

int MoveKey ( int index, float new_time ) #

Moves the key point with the specified number to a new time position (preserving the tangents). The index of key point will be updated automatically. This method can be used to implement dragging of keys on the curve.

Arguments

  • int index - Key point number, in the range from 0 to the total number of key points in the curve.
  • float new_time - Time of the key on the timeline, in seconds.

Return value

New index of the key.

void SetKeyType ( int index, AnimationCurve.KEY_TYPE type ) #

Sets the interpolation type for the specified key on the curve.

Arguments

AnimationCurve.KEY_TYPE GetKeyType ( int index ) #

Returns the interpolation type of the specified key on the curve.

Arguments

Return value

Interpolation type set for the key, one of the KEY_TYPE values.

float GetKeyTime ( int index ) #

Returns the current time of the key point with the specified index.

Arguments

Return value

The time of the specified key point on the timeline, in seconds.

void SetKeyValue ( int index, float value ) #

Sets the value for the specified key on the curve.

Arguments

  • int index - Key point number, in the range from 0 to the total number of key points in the curve.
  • float value - The float value of the key.

float GetKeyValue ( int index ) #

Returns the current value for the specified key on the curve.

Arguments

Return value

The float value of the key.

void SetKeyLeftTangent ( int index, vec2 left_tangent ) #

Sets new coordinates for the left tangent at the specified key point of the curve.

Arguments

  • int index - Key point number, in the range from 0 to the total number of key points in the curve.
  • vec2 left_tangent - Coordinates of the left tangent at the specified key point to be set.

vec2 GetKeyLeftTangent ( int index ) #

Returns the current coordinates for the left tangent at the specified key point of the curve.

Arguments

Return value

Coordinates of the left tangent at the specified key point to be set.

void SetKeyRightTangent ( int index, vec2 right_tangent ) #

Sets new coordinates for the right tangent at the specified key point of the curve.

Arguments

  • int index - Key point number, in the range from 0 to the total number of key points in the curve.
  • vec2 right_tangent - Coordinates of the right tangent at the specified key point to be set.

vec2 GetKeyRightTangent ( int index ) #

Returns the current coordinates for the right tangent at the specified key point of the curve.

Arguments

Return value

Coordinates of the right tangent at the specified key point to be set.

void SetTypeOfAllKeys ( AnimationCurve.KEY_TYPE type ) #

Sets the interpolation type for all keys of the curve.

Arguments

void Clear ( ) #

Clears the curve removing all key points and tangents.

float GetValueByTime ( float time ) #

Returns the key value at the specified key point of the curve.

Arguments

  • float time - Time of the key on the timeline, in seconds.

Return value

The float value of the key.

float GetValueByNormalizedTime ( float normalized_time ) #

Returns the key value using the normalized time value of the key.

Arguments

  • float normalized_time - The normalized time value of the key.

Return value

The float value of the key.

void Save ( Blob blob ) #

Saves the curve data to a blob.

Arguments

  • Blob blob - Blob to which the curve data will be saved.

void Load ( Blob blob ) #

Loads the curve data from the blob.

Arguments

  • Blob blob - Blob storing the curve data.
Last update: 13.12.2024
Build: ()