|
Unravel Engine C++ Reference
|
#include <animation_component.h>
Public Types | |
| enum class | culling_mode : uint8_t { always_animate , renderer_based } |
Public Types inherited from unravel::component_crtp< animation_component > | |
| using | base |
Public Member Functions | |
| void | set_autoplay (bool on) |
| Sets whether the animation should autoplay. | |
| auto | get_autoplay () const -> bool |
| Gets whether the animation is set to autoplay. | |
| void | set_apply_root_motion (bool on) |
| auto | get_apply_root_motion () const -> bool |
| void | set_animation (const asset_handle< animation_clip > &animation) |
| auto | get_animation () const -> const asset_handle< animation_clip > & |
| void | set_culling_mode (const culling_mode &animation) |
| auto | get_culling_mode () const -> const culling_mode & |
| void | set_speed (float speed) |
| Sets the speed for animation playback. | |
| auto | get_speed () const -> float |
| Gets the current speed for animation playback. | |
| auto | get_player () const -> const animation_player & |
| auto | get_player () -> animation_player & |
| void | set_retargeting_mode (animation_retargeting_mode mode) |
| Sets the animation retargeting mode. | |
| auto | get_retargeting_mode () const -> animation_retargeting_mode |
| Gets the animation retargeting mode. | |
Public Member Functions inherited from unravel::basic_component | |
| void | touch () |
| Marks the component as 'touched'. | |
Additional Inherited Members | |
Public Attributes inherited from unravel::basic_component | |
| bool | eto {} |
| Disable empty type optimizations. | |
Static Public Attributes inherited from unravel::component_crtp< animation_component > | |
| static constexpr bool | in_place_delete |
| Indicates if the component can be deleted in place. | |
Definition at line 10 of file animation_component.h.
|
strong |
| Enumerator | |
|---|---|
| always_animate | |
| renderer_based | |
Definition at line 13 of file animation_component.h.
| auto unravel::animation_component::get_animation | ( | ) | const -> const asset_handle<animation_clip>& |
Definition at line 10 of file animation_component.cpp.
| auto unravel::animation_component::get_apply_root_motion | ( | ) | const -> bool |
Definition at line 30 of file animation_component.cpp.
| auto unravel::animation_component::get_autoplay | ( | ) | const -> bool |
Gets whether the animation is set to autoplay.
Definition at line 20 of file animation_component.cpp.
| auto unravel::animation_component::get_culling_mode | ( | ) | const -> const culling_mode& |
Definition at line 40 of file animation_component.cpp.
| auto unravel::animation_component::get_player | ( | ) | -> animation_player& |
Definition at line 59 of file animation_component.cpp.
| auto unravel::animation_component::get_player | ( | ) | const -> const animation_player& |
Definition at line 55 of file animation_component.cpp.
| auto unravel::animation_component::get_retargeting_mode | ( | ) | const -> animation_retargeting_mode |
Gets the animation retargeting mode.
Definition at line 69 of file animation_component.cpp.
| auto unravel::animation_component::get_speed | ( | ) | const -> float |
Gets the current speed for animation playback.
Definition at line 50 of file animation_component.cpp.
| void unravel::animation_component::set_animation | ( | const asset_handle< animation_clip > & | animation | ) |
Definition at line 6 of file animation_component.cpp.
| void unravel::animation_component::set_apply_root_motion | ( | bool | on | ) |
Definition at line 25 of file animation_component.cpp.
| void unravel::animation_component::set_autoplay | ( | bool | on | ) |
Sets whether the animation should autoplay.
| on | True to autoplay, false otherwise. |
Definition at line 15 of file animation_component.cpp.
| void unravel::animation_component::set_culling_mode | ( | const culling_mode & | animation | ) |
Definition at line 35 of file animation_component.cpp.
| void unravel::animation_component::set_retargeting_mode | ( | animation_retargeting_mode | mode | ) |
Sets the animation retargeting mode.
| mode | The retargeting mode to use. |
Definition at line 64 of file animation_component.cpp.
| void unravel::animation_component::set_speed | ( | float | speed | ) |
Sets the speed for animation playback.
| speed | The animation speed (1.0 = normal speed, 2.0 = double speed, 0.5 = half speed). |
Definition at line 45 of file animation_component.cpp.