|
NSUNI/NSLAR Library a250670
|
Classes | |
| struct | nnl::visanimation::KeyFrame |
| Represents a keyframe in a visibility animation. More... | |
| struct | nnl::visanimation::Animation |
| Represents a single visibility animation. More... | |
| struct | nnl::visanimation::AnimationContainer |
| Holds a collection of visibility animations. More... | |
Functions | |
| AnimationContainer | nnl::visanimation::Convert (std::vector< SVisibilityAnimation > &&sanimations) |
| Converts multiple simple visibility animations to the in-game format. | |
| std::vector< SVisibilityAnimation > | nnl::visanimation::Convert (const AnimationContainer &animation_container) |
| Converts multiple in-game visibility animations to a simpler format. | |
| bool | nnl::visanimation::IsOfType (BufferView buffer) |
| Tests if the provided file is a visibility animation. | |
| AnimationContainer | nnl::visanimation::Import (BufferView buffer) |
| Imports animations from a binary file. | |
| Buffer | nnl::visanimation::Export (const AnimationContainer &animation_container) |
| Exports animations to a binary file format. | |
| struct nnl::visanimation::KeyFrame |
Represents a keyframe in a visibility animation.
This struct encapsulates the time at which the keyframe occurs in the animation timeline, as well as flags that enable specific mesh groups.
Public Attributes | |
| u16 | time_tick = 0 |
| u16 | flags_enable_groups = 0b0000000000000000 |
| u16 nnl::visanimation::KeyFrame::flags_enable_groups = 0b0000000000000000 |
A set of 16 bit flags that specify which mesh groups should be enabled (a value of 0 does not disable them)
| u16 nnl::visanimation::KeyFrame::time_tick = 0 |
Time in ticks. This value must be less than the duration of the respective main animation
| struct nnl::visanimation::Animation |
Represents a single visibility animation.
This struct represents a "sub" animation that is played along the main SRT animation and that controls the visibility of mesh groups. This struct contains two channels of keyframes that may be associated with the left and the right hands of a character. The values from those channels are combined together to determine the visibility status of a mesh group.
Public Attributes | |
| std::vector< KeyFrame > | left_channel |
| Keyframes for the left channel of the animation. | |
| std::vector< KeyFrame > | right_channel |
| Keyframes for the right channel of the animation. | |
| std::vector<KeyFrame> nnl::visanimation::Animation::left_channel |
Keyframes for the left channel of the animation.
| std::vector<KeyFrame> nnl::visanimation::Animation::right_channel |
Keyframes for the right channel of the animation.
| struct nnl::visanimation::AnimationContainer |
Holds a collection of visibility animations.
This struct serves as a container for multiple animations that control the visibility of mesh groups during the playback of main SRT animations.
When a model is spawned, all mesh groups are enabled by default. As keyframes are encountered, the following rules apply:
Public Attributes | |
| u16 | flags_disable_left_channel = 0b0000000000000000 |
| u16 | flags_disable_right_channel = 0b0000000000000000 |
| std::vector< Animation > | animations |
| std::vector<Animation> nnl::visanimation::AnimationContainer::animations |
A collection of visibility "sub" animations. The size of this vector must match the number of main SRT animations.
| u16 nnl::visanimation::AnimationContainer::flags_disable_left_channel = 0b0000000000000000 |
flags to disable the mesh groups for keyframes of the left channel. The value of 1 disables them, 0 does nothing.
| u16 nnl::visanimation::AnimationContainer::flags_disable_right_channel = 0b0000000000000000 |
flags to disable the mesh groups for keyframes of the right channel. The value of 1 disables them, 0 does nothing.
| std::vector< SVisibilityAnimation > nnl::visanimation::Convert | ( | const AnimationContainer & | animation_container | ) |
Converts multiple in-game visibility animations to a simpler format.
This function takes an AnimationContainer object and converts all contained animations into a format suitable for exporting to other formats.
| animation_container | The container of in-game animations to be converted. |
| AnimationContainer nnl::visanimation::Convert | ( | std::vector< SVisibilityAnimation > && | sanimations | ) |
Converts multiple simple visibility animations to the in-game format.
This function takes a vector of SVisibilityAnimation objects and converts them into an AnimationContainer.
| sanimations | The vector of animations to be converted. |
|
nodiscard |
Exports animations to a binary file format.
This function takes an AnimationContainer and exports it into a binary file buffer.
| animation_container | The container of animations to be exported. |
| AnimationContainer nnl::visanimation::Import | ( | BufferView | buffer | ) |
Imports animations from a binary file.
This function takes a file buffer, parses its contents, and returns an AnimationContainer.
| buffer | The binary file to be imported. |
| bool nnl::visanimation::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is a visibility animation.
This function takes data representing a file and checks whether it corresponds to the in-game visibility animation format.
| buffer | The binary file to be tested. |