diff --git a/SHADE_Application/src/Application/SBApplication.cpp b/SHADE_Application/src/Application/SBApplication.cpp index b5e4ef04..5c9bd2c8 100644 --- a/SHADE_Application/src/Application/SBApplication.cpp +++ b/SHADE_Application/src/Application/SBApplication.cpp @@ -181,7 +181,7 @@ namespace Sandbox // Link up SHDebugDraw SHDebugDraw::Init(SHSystemManager::GetSystem()); - auto clip = SHResourceManager::LoadOrGet(77816045); + auto clip = SHResourceManager::LoadOrGet(77816045); auto rig = SHResourceManager::LoadOrGet(77816045); int i = 0; } diff --git a/SHADE_Engine/src/Animation/SHAnimationController.h b/SHADE_Engine/src/Animation/SHAnimationController.h index 29c8226d..b06065ed 100644 --- a/SHADE_Engine/src/Animation/SHAnimationController.h +++ b/SHADE_Engine/src/Animation/SHAnimationController.h @@ -17,7 +17,7 @@ of DigiPen Institute of Technology is prohibited. // Project Includes #include "SH_API.h" #include "Resource/SHHandle.h" -#include "SHAnimationData.h" +#include "SHRawAnimation.h" namespace SHADE { @@ -100,7 +100,7 @@ namespace SHADE /// struct Node { - Handle Clip; + Handle Clip; std::vector Transitions; }; diff --git a/SHADE_Engine/src/Animation/SHAnimatorComponent.cpp b/SHADE_Engine/src/Animation/SHAnimatorComponent.cpp index 6bb42576..63cec09c 100644 --- a/SHADE_Engine/src/Animation/SHAnimatorComponent.cpp +++ b/SHADE_Engine/src/Animation/SHAnimatorComponent.cpp @@ -19,7 +19,7 @@ of DigiPen Institute of Technology is prohibited. // Project Includes #include "SHRig.h" #include "Math/SHMatrix.h" -#include "SHAnimationData.h" +#include "SHRawAnimation.h" #include "Graphics/SHVkUtil.h" #include "Graphics/MiddleEnd/Interface/SHGraphicsSystem.h" #include "ECS_Base/Managers/SHSystemManager.h" @@ -37,14 +37,14 @@ namespace SHADE playOnce = false; } - void SHAnimatorComponent::Play(Handle clip) + void SHAnimatorComponent::Play(Handle clip) { currClip = clip; currPlaybackTime = 0.0f; Play(); } - void SHAnimatorComponent::PlayOneShot(Handle clip) + void SHAnimatorComponent::PlayOneShot(Handle clip) { Play(clip); playOnce = true; @@ -86,7 +86,7 @@ namespace SHADE } } - void SHAnimatorComponent::SetClip(Handle newClip) + void SHAnimatorComponent::SetClip(Handle newClip) { // No change if (currClip == newClip) diff --git a/SHADE_Engine/src/Animation/SHAnimatorComponent.h b/SHADE_Engine/src/Animation/SHAnimatorComponent.h index c23ada1e..feec443d 100644 --- a/SHADE_Engine/src/Animation/SHAnimatorComponent.h +++ b/SHADE_Engine/src/Animation/SHAnimatorComponent.h @@ -22,7 +22,7 @@ of DigiPen Institute of Technology is prohibited. #include "Math/SHMatrix.h" #include "Math/Vector/SHVec3.h" #include "Math/SHQuaternion.h" -#include "SHAnimationData.h" +#include "SHRawAnimation.h" namespace SHADE { @@ -31,7 +31,7 @@ namespace SHADE /*-----------------------------------------------------------------------------------*/ class SHRig; struct SHRigNode; - class SHAnimationData; + class SHRawAnimation; class SHVkBuffer; /*-----------------------------------------------------------------------------------*/ @@ -55,12 +55,12 @@ namespace SHADE /// Plays the specified animation clip from the start. /// /// Animation clip to play. - void Play(Handle clip); + void Play(Handle clip); /// /// Plays the specified animation clip from the start one time only. /// /// Animation clip to play. - void PlayOneShot(Handle clip); + void PlayOneShot(Handle clip); /// /// Plays the currently loaded animation clip from the start. /// @@ -88,7 +88,7 @@ namespace SHADE /// If the clip is the same as the current clip, nothing happens. /// /// Clip to use. - void SetClip(Handle newClip); + void SetClip(Handle newClip); /*---------------------------------------------------------------------------------*/ /* Getter Functions */ @@ -108,7 +108,7 @@ namespace SHADE /// Retrieve the currently set animation clip. /// /// Handle to the currently set animation clip. - Handle GetCurrentClip() const noexcept { return currClip; } + Handle GetCurrentClip() const noexcept { return currClip; } /// /// Checks if an animation is currently playing. /// @@ -131,7 +131,7 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ // Resources Handle rig; - Handle currClip; + Handle currClip; // Playback Tracking float currPlaybackTime = 0.0f; bool isPlaying = true; @@ -141,7 +141,7 @@ namespace SHADE // Buffer std::vector boneMatrices; // Caches - std::unordered_map channelMap; + std::unordered_map channelMap; /*---------------------------------------------------------------------------------*/ /* Helper Functions */ diff --git a/SHADE_Engine/src/Animation/SHAnimatorComponent.hpp b/SHADE_Engine/src/Animation/SHAnimatorComponent.hpp index cf8f573b..e8c52073 100644 --- a/SHADE_Engine/src/Animation/SHAnimatorComponent.hpp +++ b/SHADE_Engine/src/Animation/SHAnimatorComponent.hpp @@ -15,7 +15,7 @@ of DigiPen Institute of Technology is prohibited. // Project Includes #include "SHRig.h" #include "Math/SHMatrix.h" -#include "SHAnimationData.h" +#include "SHRawAnimation.h" #include "Graphics/SHVkUtil.h" #include "Graphics/MiddleEnd/Interface/SHGraphicsSystem.h" #include "ECS_Base/Managers/SHSystemManager.h" diff --git a/SHADE_Engine/src/Animation/SHAnimationData.cpp b/SHADE_Engine/src/Animation/SHRawAnimation.cpp similarity index 96% rename from SHADE_Engine/src/Animation/SHAnimationData.cpp rename to SHADE_Engine/src/Animation/SHRawAnimation.cpp index 07454e4a..5a39fb08 100644 --- a/SHADE_Engine/src/Animation/SHAnimationData.cpp +++ b/SHADE_Engine/src/Animation/SHRawAnimation.cpp @@ -12,14 +12,14 @@ of DigiPen Institute of Technology is prohibited. // Pre-compiled Header #include "SHpch.h" // Primary Header -#include "SHAnimationData.h" +#include "SHRawAnimation.h" namespace SHADE { /*-----------------------------------------------------------------------------------*/ /* Constructors */ /*-----------------------------------------------------------------------------------*/ - SHAnimationData::SHAnimationData(const SHAnimAsset& asset) + SHRawAnimation::SHRawAnimation(const SHAnimAsset& asset) : ticksPerSecond { static_cast(asset.ticksPerSecond) } , totalTime { static_cast(asset.duration) / static_cast(asset.ticksPerSecond) } { diff --git a/SHADE_Engine/src/Animation/SHAnimationData.h b/SHADE_Engine/src/Animation/SHRawAnimation.h similarity index 97% rename from SHADE_Engine/src/Animation/SHAnimationData.h rename to SHADE_Engine/src/Animation/SHRawAnimation.h index d770fc0f..05d95238 100644 --- a/SHADE_Engine/src/Animation/SHAnimationData.h +++ b/SHADE_Engine/src/Animation/SHRawAnimation.h @@ -35,7 +35,7 @@ namespace SHADE /// Represents a animation clip of a 3D animation that is made for a specific model /// rig. /// - class SH_API SHAnimationData + class SH_API SHRawAnimation { public: /*---------------------------------------------------------------------------------*/ @@ -60,7 +60,7 @@ namespace SHADE /// Constructs an SHAnimation Clip from a specified SHAnimAsset. /// /// Animation asset to load. - explicit SHAnimationData(const SHAnimAsset& asset); + explicit SHRawAnimation(const SHAnimAsset& asset); /*---------------------------------------------------------------------------------*/ /* Getter Functions */ diff --git a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp index ad91a9a1..7f6192f1 100644 --- a/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp +++ b/SHADE_Engine/src/Editor/EditorWindow/Inspector/SHEditorComponentView.hpp @@ -644,13 +644,13 @@ namespace SHADE SHEditorWindowManager::GetEditorWindow()->SetScrollTo(assetID); } } - Handle const& clip = component->GetCurrentClip(); - const auto CLIP_NAME = clip ? SHResourceManager::GetAssetName(clip).value_or("") : ""; + Handle const& clip = component->GetCurrentClip(); + const auto CLIP_NAME = clip ? SHResourceManager::GetAssetName(clip).value_or("") : ""; SHEditorWidgets::DragDropReadOnlyField("Clip", CLIP_NAME, [component]() { - Handle const& clip = component->GetCurrentClip(); - return SHResourceManager::GetAssetID(clip).value_or(0); + Handle const& clip = component->GetCurrentClip(); + return SHResourceManager::GetAssetID(clip).value_or(0); }, [component](AssetID const& id) { @@ -659,13 +659,13 @@ namespace SHADE SHLOG_WARNING("Attempted to assign non mesh asset to Renderable Mesh property!") return; } - component->SetClip(SHResourceManager::LoadOrGet(id)); + component->SetClip(SHResourceManager::LoadOrGet(id)); }, SHDragDrop::DRAG_RESOURCE); if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(ImGuiMouseButton_Left)) { - if (Handle const& clip = component->GetCurrentClip()) + if (Handle const& clip = component->GetCurrentClip()) { - AssetID assetID = SHResourceManager::GetAssetID(clip).value_or(0); + AssetID assetID = SHResourceManager::GetAssetID(clip).value_or(0); SHEditorWindowManager::GetEditorWindow()->SetScrollTo(assetID); } } diff --git a/SHADE_Engine/src/Resource/SHResourceManager.h b/SHADE_Engine/src/Resource/SHResourceManager.h index 499ded4b..e3766cf0 100644 --- a/SHADE_Engine/src/Resource/SHResourceManager.h +++ b/SHADE_Engine/src/Resource/SHResourceManager.h @@ -28,7 +28,7 @@ of DigiPen Institute of Technology is prohibited. #include "Graphics/MiddleEnd/Materials/SHMaterialSpec.h" #include "Assets/Asset Types/SHMaterialAsset.h" #include "Graphics/MiddleEnd/TextRendering/SHFont.h" -#include "Animation/SHAnimationData.h" +#include "Animation/SHRawAnimation.h" #include "Animation/SHRig.h" namespace SHADE @@ -53,7 +53,7 @@ namespace SHADE template<> struct SHResourceLoader { using AssetType = SHMaterialAsset; }; template<> struct SHResourceLoader { using AssetType = SHMaterialSpec; }; template<> struct SHResourceLoader { using AssetType = SHFontAsset; }; - template<> struct SHResourceLoader { using AssetType = SHModelAsset; }; + template<> struct SHResourceLoader { using AssetType = SHModelAsset; }; template<> struct SHResourceLoader { using AssetType = SHModelAsset; }; /// diff --git a/SHADE_Engine/src/Resource/SHResourceManager.hpp b/SHADE_Engine/src/Resource/SHResourceManager.hpp index 82a4eb01..a53249f7 100644 --- a/SHADE_Engine/src/Resource/SHResourceManager.hpp +++ b/SHADE_Engine/src/Resource/SHResourceManager.hpp @@ -41,7 +41,7 @@ namespace SHADE !std::is_same_v && !std::is_same_v && !std::is_same_v && - !std::is_same_v && + !std::is_same_v && !std::is_same_v ) { @@ -355,7 +355,7 @@ namespace SHADE loadedAssetData.emplace_back(assetId); return resourceHub.Create(assetData.rig, rigNodeStore); } - else if constexpr (std::is_same_v) + else if constexpr (std::is_same_v) { loadedAssetData.emplace_back(assetId); return resourceHub.Create(*assetData.anims[0]); diff --git a/SHADE_Engine/src/Serialization/SHYAMLConverters.h b/SHADE_Engine/src/Serialization/SHYAMLConverters.h index 658faddc..132e44b5 100644 --- a/SHADE_Engine/src/Serialization/SHYAMLConverters.h +++ b/SHADE_Engine/src/Serialization/SHYAMLConverters.h @@ -400,7 +400,7 @@ namespace YAML { YAML::Node node; node[RIG_YAML_TAG.data()] = SHResourceManager::GetAssetID(rhs.GetRig()).value_or(0); - node[CLIP_YAML_TAG.data()] = SHResourceManager::GetAssetID(rhs.GetCurrentClip()).value_or(0); + node[CLIP_YAML_TAG.data()] = SHResourceManager::GetAssetID(rhs.GetCurrentClip()).value_or(0); return node; } static bool decode(YAML::Node const& node, SHAnimatorComponent& rhs) @@ -411,7 +411,7 @@ namespace YAML } if (node[CLIP_YAML_TAG.data()].IsDefined()) { - rhs.SetClip(SHResourceManager::LoadOrGet(node[CLIP_YAML_TAG.data()].as())); + rhs.SetClip(SHResourceManager::LoadOrGet(node[CLIP_YAML_TAG.data()].as())); } return true; }