|
Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
|
#include <Skeleton.hpp>
Classes | |
| struct | Animation |
| struct | AnimationNode |
| struct | AnimationPositionKey_t |
| struct | AnimationRotationKey_t |
| struct | AnimationScalingKey_t |
| struct | Bone |
| A structure containing information a bone. More... | |
| struct | BoneData_t |
Public Types | |
| typedef struct Engine::Skeleton::Bone | Bone_t |
| A structure containing information a bone. More... | |
Public Member Functions | |
| Skeleton (const aiScene *scene) | |
| Creates a new animation data object, loading in the animation data from the provided scene. More... | |
| void | LoadAnimationSet (const aiScene *scene, eastl::vector< eastl::string > names={}) |
| Loads in animation data form the provided scene. If the animation data does not match the skeleton of the model (using bone names that are not in the skeleton) a error gets reported but the data will be loaded. The skeleton data used will be the data from the scene used to first initialize the object. More... | |
| virtual | ~Skeleton () |
| Destroys the Data, cleaning up the bone tree. More... | |
| eastl::vector< eastl::string > | GetAnimations () |
| Returns a list of the loaded animations as a vector of names. Use these names to load a specific animation. More... | |
| void | SetAnimation (eastl::string animation, bool resetTime) |
| Sets the current animation of the mesh. More... | |
| float | GetAnimationDuration (size_t animation) |
| Returns the duration of a single loop of the animation. More... | |
| bool | HasAnimations () |
| Whether or not any animations have been loaded. More... | |
| Texture * | GetAnimationData (size_t animation) |
| Returns a texture containing the animation snapshots for the current animation. More... | |
| size_t | GetAnimationIndex (eastl::string animation) |
| Returns a texture containing the animation snapshots for the current animation. More... | |
| float | GetAnimationTicksPerSecond (size_t animation) |
| Returns the number of animation ticks per second. This is equal to the number of animation snapshots per second. More... | |
| eastl::map< eastl::string, Bone_t * > | GetBoneMap () |
| Returns a map that uses the name of a bone as key to return the corresponding bone. More... | |
| Bone_t * | GetRootBone () |
| Returns the root bone of the skeleton. More... | |
| void | SetName (eastl::string name) |
| Sets the name of the skeleton. More... | |
| eastl::string | GetName () |
| Returns the name of the skeleton (normally the path). More... | |
Protected Types | |
| typedef struct Engine::Skeleton::Animation | Animation_t |
| typedef struct Engine::Skeleton::AnimationNode | AnimationNode_t |
Protected Member Functions | |
| void | ReadBones (Bone_t *bone, aiNode *node) |
| void | DestroyBone (Bone_t *bone) |
| void | SetBoneTransform (eastl::string bone, glm::mat4 transform) |
| void | SetBoneTransform (Bone_t *bone, glm::mat4 transform) |
| void | UpdateBoneTransformData (Bone_t *bone) |
| void | UpdateBoneTreeTransformData () |
| void | Update (float deltaTime) |
| virtual void | UpdateBoneBuffers () |
| glm::mat4 | InterpolateScale (float time, AnimationNode_t node) |
| glm::mat4 | InterpolateRotation (float time, AnimationNode_t node) |
| glm::mat4 | InterpolatePosition (float time, AnimationNode_t node) |
| glm::mat4 | TransformToMat4 (aiMatrix4x4 transform) |
Protected Attributes | |
| bool | animated |
| Bone_t * | rootBone |
| eastl::vector< BoneData_t > | boneData |
| eastl::map< eastl::string, size_t > | animationMap |
| eastl::vector< Animation_t * > | animations |
| const aiScene * | scene |
| Animation_t * | currentAnimation |
| size_t | currentAnimationIndex |
| float | time |
| float | speed |
| bool | paused |
| bool | looping |
| eastl::map< eastl::string, Bone_t * > | boneMap |
| eastl::string | name |
Definition at line 17 of file Skeleton.hpp.
|
protected |
|
protected |
| typedef struct Engine::Skeleton::Bone Engine::Skeleton::Bone_t |
A structure containing information a bone.
| Engine::Skeleton::Skeleton | ( | const aiScene * | scene | ) |
Creates a new animation data object, loading in the animation data from the provided scene.
| scene | scene containing the model skeleton and animation data. |
Definition at line 17 of file Skeleton.cpp.
|
virtual |
Destroys the Data, cleaning up the bone tree.
Definition at line 369 of file Skeleton.cpp.
|
protected |
Definition at line 650 of file Skeleton.cpp.
| Texture * Engine::Skeleton::GetAnimationData | ( | size_t | animation | ) |
Returns a texture containing the animation snapshots for the current animation.
| animation | The animation to get the data for. |
Definition at line 573 of file Skeleton.cpp.
| float Engine::Skeleton::GetAnimationDuration | ( | size_t | animation | ) |
Returns the duration of a single loop of the animation.
| animation | The index of the animation to return the duration of. |
Definition at line 526 of file Skeleton.cpp.
| size_t Engine::Skeleton::GetAnimationIndex | ( | eastl::string | animation | ) |
Returns a texture containing the animation snapshots for the current animation.
| animation | The name of the animation to get the data for. |
Definition at line 583 of file Skeleton.cpp.
| eastl::vector< eastl::string > Engine::Skeleton::GetAnimations | ( | ) |
Returns a list of the loaded animations as a vector of names. Use these names to load a specific animation.
Definition at line 381 of file Skeleton.cpp.
| float Engine::Skeleton::GetAnimationTicksPerSecond | ( | size_t | animation | ) |
Returns the number of animation ticks per second. This is equal to the number of animation snapshots per second.
| animation | The animation to get the data from. |
Definition at line 595 of file Skeleton.cpp.
| eastl::map< eastl::string, Skeleton::Bone_t * > Engine::Skeleton::GetBoneMap | ( | ) |
Returns a map that uses the name of a bone as key to return the corresponding bone.
Definition at line 605 of file Skeleton.cpp.
| eastl::string Engine::Skeleton::GetName | ( | ) |
Returns the name of the skeleton (normally the path).
Definition at line 620 of file Skeleton.cpp.
| Skeleton::Bone_t * Engine::Skeleton::GetRootBone | ( | ) |
Returns the root bone of the skeleton.
Definition at line 610 of file Skeleton.cpp.
| bool Engine::Skeleton::HasAnimations | ( | ) |
Whether or not any animations have been loaded.
Definition at line 568 of file Skeleton.cpp.
|
protected |
Definition at line 490 of file Skeleton.cpp.
|
protected |
Definition at line 452 of file Skeleton.cpp.
|
protected |
Definition at line 416 of file Skeleton.cpp.
| void Engine::Skeleton::LoadAnimationSet | ( | const aiScene * | scene, |
| eastl::vector< eastl::string > | names = {} |
||
| ) |
Loads in animation data form the provided scene. If the animation data does not match the skeleton of the model (using bone names that are not in the skeleton) a error gets reported but the data will be loaded. The skeleton data used will be the data from the scene used to first initialize the object.
| scene | Scene to load additional animations from. |
| names | The optional names of the animation sets to load. |
Definition at line 196 of file Skeleton.cpp.
|
protected |
Definition at line 625 of file Skeleton.cpp.
| void Engine::Skeleton::SetAnimation | ( | eastl::string | animation, |
| bool | resetTime | ||
| ) |
Sets the current animation of the mesh.
| animation | The name of the animation to use. |
| resetTime | If the animation should be reset to the starting point. |
Definition at line 391 of file Skeleton.cpp.
|
protected |
Definition at line 658 of file Skeleton.cpp.
|
protected |
Definition at line 666 of file Skeleton.cpp.
| void Engine::Skeleton::SetName | ( | eastl::string | name | ) |
Sets the name of the skeleton.
| name | The new name. |
Definition at line 615 of file Skeleton.cpp.
|
protected |
Definition at line 685 of file Skeleton.cpp.
|
protected |
Definition at line 537 of file Skeleton.cpp.
|
protectedvirtual |
Definition at line 412 of file Skeleton.cpp.
|
protected |
Definition at line 671 of file Skeleton.cpp.
|
protected |
Definition at line 406 of file Skeleton.cpp.
|
protected |
Definition at line 133 of file Skeleton.hpp.
|
protected |
Definition at line 175 of file Skeleton.hpp.
|
protected |
Definition at line 177 of file Skeleton.hpp.
|
protected |
Definition at line 173 of file Skeleton.hpp.
|
protected |
Definition at line 193 of file Skeleton.hpp.
|
protected |
Definition at line 181 of file Skeleton.hpp.
|
protected |
Definition at line 183 of file Skeleton.hpp.
|
protected |
Definition at line 191 of file Skeleton.hpp.
|
protected |
Definition at line 195 of file Skeleton.hpp.
|
protected |
Definition at line 189 of file Skeleton.hpp.
|
protected |
Definition at line 171 of file Skeleton.hpp.
|
protected |
Definition at line 179 of file Skeleton.hpp.
|
protected |
Definition at line 187 of file Skeleton.hpp.
|
protected |
Definition at line 185 of file Skeleton.hpp.
1.8.11