Merge pull request #39 from SHADE-DP/SP3-16-Math

This commit is contained in:
XiaoQiDigipen 2022-09-21 20:02:20 +08:00 committed by GitHub
commit f52fa9463d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 2703 additions and 267 deletions

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{BDC70008-29DE-FE9D-7255-8ABFDEAACF25}</ProjectGuid>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<Keyword>Win32Proj</Keyword>
<RootNamespace>SHADE_Application</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\bin\Debug\</OutDir>
<IntDir>..\bin_int\Debug\SHADE_Application\</IntDir>
<TargetName>SHADE_Application</TargetName>
<TargetExt>.exe</TargetExt>
<IncludePath>..\Dependencies\spdlog\include;$(VULKAN_SDK)\include;..\Dependencies\VMA\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\Release\</OutDir>
<IntDir>..\bin_int\Release\SHADE_Application\</IntDir>
<TargetName>SHADE_Application</TargetName>
<TargetExt>.exe</TargetExt>
<IncludePath>..\Dependencies\spdlog\include;$(VULKAN_SDK)\include;..\Dependencies\VMA\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SBpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>NOMINMAX;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\SHADE_Engine\src;src;..\Dependencies\dotnet\include;..\Dependencies\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\Dependencies\spdlog\lib;..\Dependencies\SDL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EntryPointSymbol>wWinMainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SBpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>NOMINMAX;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\SHADE_Engine\src;src;..\Dependencies\dotnet\include;..\Dependencies\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\Dependencies\spdlog\lib;..\Dependencies\SDL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<EntryPointSymbol>wWinMainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\Application\SBApplication.h" />
<ClInclude Include="src\SBpch.h" />
<ClInclude Include="src\Scenes\SBTestScene.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Application\SBApplication.cpp" />
<ClCompile Include="src\SBpch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\Scenes\SBTestScene.cpp" />
<ClCompile Include="src\WinMain.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SHADE_Engine\SHADE_Engine.vcxproj">
<Project>{3F92E998-2BF5-783D-D47A-B1F3C0BC44C0}</Project>
</ProjectReference>
<ProjectReference Include="..\SHADE_Managed\SHADE_Managed.vcxproj">
<Project>{16DB1400-829B-9036-4BD6-D9B3B755D512}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -34,12 +34,12 @@ namespace Sandbox
( (
_In_ HINSTANCE hInstance, _In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance, _In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine, _In_ LPWSTR lpCmdLine,
_In_ INT nCmdShow _In_ INT nCmdShow
) )
{ {
// Set working directory // Set working directory
SHADE::SHFileUtilities::SetWorkDirToExecDir(); SHADE::SHFileUtilities::SetWorkDirToExecDir();
SDL_Init(SDL_INIT_EVERYTHING); SDL_Init(SDL_INIT_EVERYTHING);
window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow); window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow);

View File

@ -0,0 +1,349 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{3F92E998-2BF5-783D-D47A-B1F3C0BC44C0}</ProjectGuid>
<IgnoreWarnCompileDuplicatedFilename>true</IgnoreWarnCompileDuplicatedFilename>
<Keyword>Win32Proj</Keyword>
<RootNamespace>SHADE_Engine</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\bin\Debug\</OutDir>
<IntDir>..\bin_int\Debug\SHADE_Engine\</IntDir>
<TargetName>SHADE_Engine</TargetName>
<TargetExt>.dll</TargetExt>
<IncludePath>..\Dependencies\assimp\include;..\Dependencies\imgui;..\Dependencies\imguizmo;..\Dependencies\imnodes;..\Dependencies\msdf;..\Dependencies\msdf\msdfgen;..\Dependencies\spdlog\include;..\Dependencies\tracy;..\Dependencies\VMA\include;..\Dependencies\yamlcpp\include;..\Dependencies\SDL\include;..\Dependencies\RTTR\include;..\Dependencies\reactphysics3d\include;$(VULKAN_SDK)\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;..\Dependencies\dotnet\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\bin\Release\</OutDir>
<IntDir>..\bin_int\Release\SHADE_Engine\</IntDir>
<TargetName>SHADE_Engine</TargetName>
<TargetExt>.dll</TargetExt>
<IncludePath>..\Dependencies\assimp\include;..\Dependencies\imgui;..\Dependencies\imguizmo;..\Dependencies\imnodes;..\Dependencies\msdf;..\Dependencies\msdf\msdfgen;..\Dependencies\spdlog\include;..\Dependencies\tracy;..\Dependencies\VMA\include;..\Dependencies\yamlcpp\include;..\Dependencies\SDL\include;..\Dependencies\RTTR\include;..\Dependencies\reactphysics3d\include;$(VULKAN_SDK)\include;$(VULKAN_SDK)\Source\SPIRV-Reflect;..\Dependencies\dotnet\include;$(IncludePath)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SHpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>_LIB;_GLFW_INCLUDE_NONE;MSDFGEN_USE_CPP11;NOMINMAX;SH_API_EXPORT;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;shaderc_shared.lib;shlwapi.lib;assimp-vc142-mtd.lib;librttr_core_d.lib;spdlogd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>libs;$(VULKAN_SDK)\Lib;..\Dependencies\assimp\lib\Debug;..\Dependencies\assimp\lib\Release;..\Dependencies\RTTR\lib;..\Dependencies\SDL\lib;..\Dependencies\spdlog\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ImportLibrary>..\bin\Debug\SHADE_Engine.lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>xcopy /s /r /y /q "$(SolutionDir)/Dependencies/spdlog/bin" "$(OutDir)"
xcopy /r /y /q "$(SolutionDir)/Dependencies/SDL/lib/SDL2.dll" "$(OutDir)"
xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>SHpch.h</PrecompiledHeaderFile>
<WarningLevel>Level4</WarningLevel>
<DisableSpecificWarnings>4251;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<PreprocessorDefinitions>_LIB;_GLFW_INCLUDE_NONE;MSDFGEN_USE_CPP11;NOMINMAX;SH_API_EXPORT;_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<MinimalRebuild>false</MinimalRebuild>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>vulkan-1.lib;SDL2.lib;SDL2main.lib;shaderc_shared.lib;shlwapi.lib;assimp-vc142-mt.lib;librttr_core.lib;spdlog.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>libs;$(VULKAN_SDK)\Lib;..\Dependencies\assimp\lib\Debug;..\Dependencies\assimp\lib\Release;..\Dependencies\RTTR\lib;..\Dependencies\SDL\lib;..\Dependencies\spdlog\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ImportLibrary>..\bin\Release\SHADE_Engine.lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>xcopy /s /r /y /q "$(SolutionDir)/Dependencies/spdlog/bin" "$(OutDir)"
xcopy /r /y /q "$(SolutionDir)/Dependencies/SDL/lib/SDL2.dll" "$(OutDir)"
xcopy /s /r /y /q "$(SolutionDir)/Dependencies/dotnet/bin" "$(OutDir)"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="src\Common\SHCommonTypes.h" />
<ClInclude Include="src\ECS_Base\Components\SHComponent.h" />
<ClInclude Include="src\ECS_Base\Components\SHComponentGroup.h" />
<ClInclude Include="src\ECS_Base\Entity\SHEntity.h" />
<ClInclude Include="src\ECS_Base\Events\SHEntityCreationEvent.h" />
<ClInclude Include="src\ECS_Base\Events\SHEntityDestroyedEvent.h" />
<ClInclude Include="src\ECS_Base\General\SHFamily.h" />
<ClInclude Include="src\ECS_Base\General\SHHandleGenerator.h" />
<ClInclude Include="src\ECS_Base\General\SHSparseBase.h" />
<ClInclude Include="src\ECS_Base\General\SHSparseSet.h" />
<ClInclude Include="src\ECS_Base\General\SHSparseSetContainer.h" />
<ClInclude Include="src\ECS_Base\Managers\SHComponentManager.h" />
<ClInclude Include="src\ECS_Base\Managers\SHEntityManager.h" />
<ClInclude Include="src\ECS_Base\Managers\SHSystemManager.h" />
<ClInclude Include="src\ECS_Base\SHECSMacros.h" />
<ClInclude Include="src\ECS_Base\System\SHFixedSystemRoutine.h" />
<ClInclude Include="src\ECS_Base\System\SHRoutineStats.h" />
<ClInclude Include="src\ECS_Base\System\SHSystem.h" />
<ClInclude Include="src\ECS_Base\System\SHSystemRoutine.h" />
<ClInclude Include="src\ECS_Base\UnitTesting\SHECSUnitTest.h" />
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestComponents.h" />
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestSystems.h" />
<ClInclude Include="src\Engine\SHEngine.h" />
<ClInclude Include="src\Events\SHEvent.h" />
<ClInclude Include="src\Events\SHEventDefines.h" />
<ClInclude Include="src\Events\SHEventManager.hpp" />
<ClInclude Include="src\Events\SHEventReceiver.h" />
<ClInclude Include="src\FRC\SHFramerateController.h" />
<ClInclude Include="src\Filesystem\SHFileSystem.h" />
<ClInclude Include="src\Graphics\Buffers\SHVkBuffer.h" />
<ClInclude Include="src\Graphics\Commands\SHCommandPoolResetMode.h" />
<ClInclude Include="src\Graphics\Commands\SHVkCommandBuffer.h" />
<ClInclude Include="src\Graphics\Commands\SHVkCommandPool.h" />
<ClInclude Include="src\Graphics\Debugging\SHValidationLayersQuery.h" />
<ClInclude Include="src\Graphics\Debugging\SHVkDebugMessenger.h" />
<ClInclude Include="src\Graphics\Debugging\SHVulkanDebugUtil.h" />
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolManager.h" />
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.h" />
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.h" />
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorPool.h" />
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.h" />
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.h" />
<ClInclude Include="src\Graphics\Devices\SHVkLogicalDevice.h" />
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDevice.h" />
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.h" />
<ClInclude Include="src\Graphics\Framebuffer\SHVkFramebuffer.h" />
<ClInclude Include="src\Graphics\Images\SHImageViewDetails.h" />
<ClInclude Include="src\Graphics\Images\SHVkImage.h" />
<ClInclude Include="src\Graphics\Images\SHVkImageView.h" />
<ClInclude Include="src\Graphics\Images\SHVkSampler.h" />
<ClInclude Include="src\Graphics\Instance\SHVkInstance.h" />
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.h" />
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.h" />
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.h" />
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.h" />
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.h" />
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.h" />
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderType.h" />
<ClInclude Include="src\Graphics\Pipeline\SHPipelineLayoutParams.h" />
<ClInclude Include="src\Graphics\Pipeline\SHPipelineState.h" />
<ClInclude Include="src\Graphics\Pipeline\SHPipelineType.h" />
<ClInclude Include="src\Graphics\Pipeline\SHPushConstantInterface.h" />
<ClInclude Include="src\Graphics\Pipeline\SHVkPipeline.h" />
<ClInclude Include="src\Graphics\Pipeline\SHVkPipelineLayout.h" />
<ClInclude Include="src\Graphics\Queues\SHVkQueue.h" />
<ClInclude Include="src\Graphics\RenderGraph\SHRenderGraph.h" />
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachDescGen.h" />
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachment.h" />
<ClInclude Include="src\Graphics\Renderpass\SHVkRenderpass.h" />
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassDescription.h" />
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassParams.h" />
<ClInclude Include="src\Graphics\SHVkUtil.h" />
<ClInclude Include="src\Graphics\SHVulkanDefines.h" />
<ClInclude Include="src\Graphics\SHVulkanIncludes.h" />
<ClInclude Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.h" />
<ClInclude Include="src\Graphics\Shaders\SHShaderReflected.h" />
<ClInclude Include="src\Graphics\Shaders\SHVkShaderModule.h" />
<ClInclude Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.h" />
<ClInclude Include="src\Graphics\Swapchain\SHSwapchainParams.h" />
<ClInclude Include="src\Graphics\Swapchain\SHVkSwapchain.h" />
<ClInclude Include="src\Graphics\Synchronization\SHVkFence.h" />
<ClInclude Include="src\Graphics\Synchronization\SHVkSemaphore.h" />
<ClInclude Include="src\Graphics\VertexDescriptors\SHVertexAttribute.h" />
<ClInclude Include="src\Graphics\Windowing\SHWindow.h" />
<ClInclude Include="src\Graphics\Windowing\SHWindowMap.h" />
<ClInclude Include="src\Graphics\Windowing\Surface\SHVkSurface.h" />
<ClInclude Include="src\Math\Geometry\SHBoundingBox.h" />
<ClInclude Include="src\Math\Geometry\SHShape.h" />
<ClInclude Include="src\Math\SHMath.h" />
<ClInclude Include="src\Math\SHMathHelpers.h" />
<ClInclude Include="src\Math\SHMathHelpers.hpp" />
<ClInclude Include="src\Math\SHMatrix.h" />
<ClInclude Include="src\Math\SHQuaternion.h" />
<ClInclude Include="src\Math\Transform\SHTransform.h" />
<ClInclude Include="src\Math\Transform\SHTransformComponent.h" />
<ClInclude Include="src\Math\Transform\SHTransformSystem.h" />
<ClInclude Include="src\Math\Vector\SHVec2.h" />
<ClInclude Include="src\Math\Vector\SHVec3.h" />
<ClInclude Include="src\Math\Vector\SHVec4.h" />
<ClInclude Include="src\Meta\SHIsDetected.h" />
<ClInclude Include="src\Resource\Handle.h" />
<ClInclude Include="src\Resource\Handle.hpp" />
<ClInclude Include="src\Resource\ResourceLibrary.h" />
<ClInclude Include="src\Resource\ResourceLibrary.hpp" />
<ClInclude Include="src\Resource\SparseSet.h" />
<ClInclude Include="src\Resource\SparseSet.hpp" />
<ClInclude Include="src\SHCommonTypes.h" />
<ClInclude Include="src\SH_API.h" />
<ClInclude Include="src\SHpch.h" />
<ClInclude Include="src\Scene\SHScene.h" />
<ClInclude Include="src\Scene\SHSceneGraph.h" />
<ClInclude Include="src\Scene\SHSceneManager.h" />
<ClInclude Include="src\Scripting\SHDotNetRuntime.h" />
<ClInclude Include="src\Scripting\SHDotNetRuntime.hpp" />
<ClInclude Include="src\Scripting\SHScriptEngine.h" />
<ClInclude Include="src\Tools\SHException.h" />
<ClInclude Include="src\Tools\SHExceptionHandler.h" />
<ClInclude Include="src\Tools\SHFileUtilties.h" />
<ClInclude Include="src\Tools\SHLogger.h" />
<ClInclude Include="src\Tools\SHStringUtils.h" />
<ClInclude Include="src\Tools\SHStringUtils.hpp" />
<ClInclude Include="src\Tools\SHUtilities.h" />
<ClInclude Include="src\Tools\SHUtilities.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\ECS_Base\Components\SHComponent.cpp" />
<ClCompile Include="src\ECS_Base\Components\SHComponentGroup.cpp" />
<ClCompile Include="src\ECS_Base\Entity\SHEntity.cpp" />
<ClCompile Include="src\ECS_Base\Managers\SHComponentManager.cpp" />
<ClCompile Include="src\ECS_Base\Managers\SHEntityManager.cpp" />
<ClCompile Include="src\ECS_Base\Managers\SHSystemManager.cpp" />
<ClCompile Include="src\ECS_Base\System\SHFixedSystemRoutine.cpp" />
<ClCompile Include="src\ECS_Base\System\SHSystemRoutine.cpp" />
<ClCompile Include="src\ECS_Base\UnitTesting\SHECSUnitTest.cpp" />
<ClCompile Include="src\Engine\SHEngine.cpp" />
<ClCompile Include="src\FRC\SHFramerateController.cpp" />
<ClCompile Include="src\Filesystem\SHFileSystem.cpp" />
<ClCompile Include="src\Graphics\Buffers\SHVkBuffer.cpp" />
<ClCompile Include="src\Graphics\Commands\SHVkCommandBuffer.cpp" />
<ClCompile Include="src\Graphics\Commands\SHVkCommandPool.cpp" />
<ClCompile Include="src\Graphics\Debugging\SHValidationLayersQuery.cpp" />
<ClCompile Include="src\Graphics\Debugging\SHVkDebugMessenger.cpp" />
<ClCompile Include="src\Graphics\Debugging\SHVulkanDebugUtil.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolManager.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorPool.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.cpp" />
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.cpp" />
<ClCompile Include="src\Graphics\Devices\SHVkLogicalDevice.cpp" />
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDevice.cpp" />
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.cpp" />
<ClCompile Include="src\Graphics\Framebuffer\SHVkFramebuffer.cpp" />
<ClCompile Include="src\Graphics\Images\SHVkImage.cpp" />
<ClCompile Include="src\Graphics\Images\SHVkImageView.cpp" />
<ClCompile Include="src\Graphics\Images\SHVkSampler.cpp" />
<ClCompile Include="src\Graphics\Instance\SHVkInstance.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.cpp" />
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.cpp" />
<ClCompile Include="src\Graphics\Pipeline\SHPipelineState.cpp" />
<ClCompile Include="src\Graphics\Pipeline\SHPushConstantInterface.cpp" />
<ClCompile Include="src\Graphics\Pipeline\SHVkPipeline.cpp" />
<ClCompile Include="src\Graphics\Pipeline\SHVkPipelineLayout.cpp" />
<ClCompile Include="src\Graphics\Queues\SHVkQueue.cpp" />
<ClCompile Include="src\Graphics\RenderGraph\SHRenderGraph.cpp" />
<ClCompile Include="src\Graphics\Renderpass\SHVkAttachDescGen.cpp" />
<ClCompile Include="src\Graphics\Renderpass\SHVkRenderpass.cpp" />
<ClCompile Include="src\Graphics\Renderpass\SHVkSubpassParams.cpp" />
<ClCompile Include="src\Graphics\SHVkUtil.cpp" />
<ClCompile Include="src\Graphics\SHVulkanIncludes.cpp" />
<ClCompile Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.cpp" />
<ClCompile Include="src\Graphics\Shaders\SHShaderReflected.cpp" />
<ClCompile Include="src\Graphics\Shaders\SHVkShaderModule.cpp" />
<ClCompile Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.cpp" />
<ClCompile Include="src\Graphics\Swapchain\SHVkSwapchain.cpp" />
<ClCompile Include="src\Graphics\Synchronization\SHVkFence.cpp" />
<ClCompile Include="src\Graphics\Synchronization\SHVkSemaphore.cpp" />
<ClCompile Include="src\Graphics\VertexDescriptors\SHVertexAttribute.cpp" />
<ClCompile Include="src\Graphics\Windowing\SHWIndowMap.cpp" />
<ClCompile Include="src\Graphics\Windowing\SHWindow.cpp" />
<ClCompile Include="src\Graphics\Windowing\Surface\SHVkSurface.cpp" />
<ClCompile Include="src\Math\Geometry\SHBoundingBox.cpp" />
<ClCompile Include="src\Math\Geometry\SHShape.cpp" />
<ClCompile Include="src\Math\SHMathHelpers.cpp" />
<ClCompile Include="src\Math\SHMatrix.cpp" />
<ClCompile Include="src\Math\SHQuaternion.cpp" />
<ClCompile Include="src\Math\Transform\SHTransform.cpp" />
<ClCompile Include="src\Math\Transform\SHTransformComponent.cpp" />
<ClCompile Include="src\Math\Transform\SHTransformSystem.cpp" />
<ClCompile Include="src\Math\Vector\SHVec2.cpp" />
<ClCompile Include="src\Math\Vector\SHVec3.cpp" />
<ClCompile Include="src\Math\Vector\SHVec4.cpp" />
<ClCompile Include="src\Resource\ResourceLibrary.cpp" />
<ClCompile Include="src\SHpch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\Scene\SHSceneGraph.cpp" />
<ClCompile Include="src\Scene\SHSceneManager.cpp" />
<ClCompile Include="src\Scripting\SHDotNetRuntime.cpp" />
<ClCompile Include="src\Scripting\SHScriptEngine.cpp" />
<ClCompile Include="src\Tools\SHException.cpp" />
<ClCompile Include="src\Tools\SHExceptionHandler.cpp" />
<ClCompile Include="src\Tools\SHFileUtilties.cpp" />
<ClCompile Include="src\Tools\SHLogger.cpp" />
<ClCompile Include="src\Tools\SHStringUtils.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dependencies\yamlcpp\yaml-cpp.vcxproj">
<Project>{88F1A057-74BE-FB62-9DD7-E90A890331F1}</Project>
</ProjectReference>
<ProjectReference Include="..\Dependencies\msdf\msdfgen\msdfgen.vcxproj">
<Project>{8900D8DD-F5DF-5679-FEF7-E14F6A56BDDA}</Project>
</ProjectReference>
<ProjectReference Include="..\Dependencies\msdf\msdf-atlas-gen.vcxproj">
<Project>{38BD587B-248B-4C81-0D1F-BDA7F98B28E6}</Project>
</ProjectReference>
<ProjectReference Include="..\Dependencies\reactphysics3d\reactphysics3d.vcxproj">
<Project>{2ECAB41A-1A98-A820-032C-1947EF988485}</Project>
</ProjectReference>
<ProjectReference Include="..\Dependencies\imgui\ImGui.vcxproj">
<Project>{C0FF640D-2C14-8DBE-F595-301E616989EF}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,746 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Common">
<UniqueIdentifier>{8EEA3EAC-7A8C-6982-6347-7DD64F88F0D2}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base">
<UniqueIdentifier>{1AB26817-067F-C322-2F98-B1CA1BC4F8B0}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\Components">
<UniqueIdentifier>{EFD23933-5B34-1741-E4A1-5DF350024E00}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\Entity">
<UniqueIdentifier>{261D0942-92A8-7606-9BB9-F9FA07C4D206}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\Events">
<UniqueIdentifier>{BEBC9142-2A48-FF06-3359-82FB9F635B07}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\General">
<UniqueIdentifier>{07FEB307-F3F6-D259-1C29-B8DE0881B265}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\Managers">
<UniqueIdentifier>{37718753-A387-85E9-ECFE-100B58545671}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\System">
<UniqueIdentifier>{EE037863-5A8F-E527-63A0-681CCFAA4128}</UniqueIdentifier>
</Filter>
<Filter Include="ECS_Base\UnitTesting">
<UniqueIdentifier>{078AA1A3-F318-2B6D-9C37-3F6888A53B13}</UniqueIdentifier>
</Filter>
<Filter Include="Engine">
<UniqueIdentifier>{DBC7D3B0-C769-FE86-B024-12DB9C6585D7}</UniqueIdentifier>
</Filter>
<Filter Include="Events">
<UniqueIdentifier>{3A8963B1-262B-8E87-0FE6-A1DBFB2615D8}</UniqueIdentifier>
</Filter>
<Filter Include="FRC">
<UniqueIdentifier>{80E7870B-ECF0-877C-756C-9E7CE174937C}</UniqueIdentifier>
</Filter>
<Filter Include="Filesystem">
<UniqueIdentifier>{8A8E2B37-7646-6D84-DF4D-46E0CB240875}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics">
<UniqueIdentifier>{1653CE33-0220-293F-2B39-17E717655ECD}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Buffers">
<UniqueIdentifier>{92C817CE-7EC1-3620-A7F3-1BA5934B162C}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Commands">
<UniqueIdentifier>{17C745C0-83DD-4356-CC54-CF7738AA14DE}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Debugging">
<UniqueIdentifier>{51443AC7-3D28-FB1C-A688-F56F928BE59E}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Descriptors">
<UniqueIdentifier>{573A6CF2-43C9-F5BB-ECE7-09B7D8550662}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Devices">
<UniqueIdentifier>{08DBDC43-F4D3-FB95-1D06-E11A095EDBA1}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Framebuffer">
<UniqueIdentifier>{4AD5CA42-3664-540C-DF82-6807CBF064B2}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Images">
<UniqueIdentifier>{FB5EE099-67EA-4D5E-70FB-D052DC05AA5E}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Instance">
<UniqueIdentifier>{BA26540B-263D-52A1-6FB4-DDC2DB092329}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\MiddleEnd">
<UniqueIdentifier>{4B204703-3704-0859-A064-02AC8C67F2DA}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\MiddleEnd\Interface">
<UniqueIdentifier>{EBA1D3FF-D75C-C3AB-8014-3CF66CAE0D3C}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\MiddleEnd\PerFrame">
<UniqueIdentifier>{8CDBA7C9-F8E8-D5AF-81CF-D19AEDDBA166}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\MiddleEnd\Shaders">
<UniqueIdentifier>{2460C057-1070-6C28-7929-D14665585BC1}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Pipeline">
<UniqueIdentifier>{FBD334F8-67EA-328E-B061-BEAF1CB70316}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Queues">
<UniqueIdentifier>{1DD51CAD-8960-8A71-9271-0D66FE7BE671}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\RenderGraph">
<UniqueIdentifier>{57DAB30C-4369-3DD6-EC87-51D1D8F54D7C}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Renderpass">
<UniqueIdentifier>{9C0DAFD9-086F-8CE7-91DC-D299FD3CC3A6}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Shaders">
<UniqueIdentifier>{EF2D07CC-DB26-261E-0459-0BA3F0B0052A}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Shaders\BlockInterface">
<UniqueIdentifier>{3AEF06DD-A6D2-151D-AFD5-43591B38DC6D}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Shaders\spirv-reflect">
<UniqueIdentifier>{245F5AB0-1085-2417-F9CA-A9E2E58F49E3}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Swapchain">
<UniqueIdentifier>{03DB39DE-EFBE-FA33-581F-F5864422E5B5}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Synchronization">
<UniqueIdentifier>{576DF841-4392-47C2-6CDD-2C52586146E0}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\VertexDescriptors">
<UniqueIdentifier>{75F29FE5-6102-4CB6-CABB-B0D4B6EA3A4F}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Windowing">
<UniqueIdentifier>{5BAB2A92-478F-EBE7-B0EF-E53A9CF2D569}</UniqueIdentifier>
</Filter>
<Filter Include="Graphics\Windowing\Surface">
<UniqueIdentifier>{B3B14D12-9FC1-F9E2-087B-5E01F4A9E87B}</UniqueIdentifier>
</Filter>
<Filter Include="Math">
<UniqueIdentifier>{AFF4887C-9B2B-8A0D-4418-7010302E060F}</UniqueIdentifier>
</Filter>
<Filter Include="Math\Geometry">
<UniqueIdentifier>{EAD6C33D-5697-3F74-1FD2-88F18B518450}</UniqueIdentifier>
</Filter>
<Filter Include="Math\Vector">
<UniqueIdentifier>{F1B75745-5D6D-D03A-E661-CA115216C73E}</UniqueIdentifier>
</Filter>
<Filter Include="Meta">
<UniqueIdentifier>{AC05897C-983C-8A0D-4129-70102D3F060F}</UniqueIdentifier>
</Filter>
<Filter Include="Resource">
<UniqueIdentifier>{ED6CDF9B-D939-3AA7-0253-284FEE7E6F35}</UniqueIdentifier>
</Filter>
<Filter Include="Scene">
<UniqueIdentifier>{B3F7140E-1F0C-3DBF-E88D-E01E546139F0}</UniqueIdentifier>
</Filter>
<Filter Include="Scripting">
<UniqueIdentifier>{985A7358-04C5-27CF-4D03-D974B9AC0524}</UniqueIdentifier>
</Filter>
<Filter Include="Tools">
<UniqueIdentifier>{16CF2D0E-82E3-55BF-4B65-F91EB73852F0}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Common\SHCommonTypes.h">
<Filter>Common</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Components\SHComponent.h">
<Filter>ECS_Base\Components</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Components\SHComponentGroup.h">
<Filter>ECS_Base\Components</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Entity\SHEntity.h">
<Filter>ECS_Base\Entity</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Events\SHEntityCreationEvent.h">
<Filter>ECS_Base\Events</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Events\SHEntityDestroyedEvent.h">
<Filter>ECS_Base\Events</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\General\SHFamily.h">
<Filter>ECS_Base\General</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\General\SHHandleGenerator.h">
<Filter>ECS_Base\General</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\General\SHSparseBase.h">
<Filter>ECS_Base\General</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\General\SHSparseSet.h">
<Filter>ECS_Base\General</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\General\SHSparseSetContainer.h">
<Filter>ECS_Base\General</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Managers\SHComponentManager.h">
<Filter>ECS_Base\Managers</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Managers\SHEntityManager.h">
<Filter>ECS_Base\Managers</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\Managers\SHSystemManager.h">
<Filter>ECS_Base\Managers</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\SHECSMacros.h">
<Filter>ECS_Base</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\System\SHFixedSystemRoutine.h">
<Filter>ECS_Base\System</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\System\SHRoutineStats.h">
<Filter>ECS_Base\System</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\System\SHSystem.h">
<Filter>ECS_Base\System</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\System\SHSystemRoutine.h">
<Filter>ECS_Base\System</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\UnitTesting\SHECSUnitTest.h">
<Filter>ECS_Base\UnitTesting</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestComponents.h">
<Filter>ECS_Base\UnitTesting</Filter>
</ClInclude>
<ClInclude Include="src\ECS_Base\UnitTesting\SHTestSystems.h">
<Filter>ECS_Base\UnitTesting</Filter>
</ClInclude>
<ClInclude Include="src\Engine\SHEngine.h">
<Filter>Engine</Filter>
</ClInclude>
<ClInclude Include="src\Events\SHEvent.h">
<Filter>Events</Filter>
</ClInclude>
<ClInclude Include="src\Events\SHEventDefines.h">
<Filter>Events</Filter>
</ClInclude>
<ClInclude Include="src\Events\SHEventManager.hpp">
<Filter>Events</Filter>
</ClInclude>
<ClInclude Include="src\Events\SHEventReceiver.h">
<Filter>Events</Filter>
</ClInclude>
<ClInclude Include="src\FRC\SHFramerateController.h">
<Filter>FRC</Filter>
</ClInclude>
<ClInclude Include="src\Filesystem\SHFileSystem.h">
<Filter>Filesystem</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Buffers\SHVkBuffer.h">
<Filter>Graphics\Buffers</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Commands\SHCommandPoolResetMode.h">
<Filter>Graphics\Commands</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Commands\SHVkCommandBuffer.h">
<Filter>Graphics\Commands</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Commands\SHVkCommandPool.h">
<Filter>Graphics\Commands</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Debugging\SHValidationLayersQuery.h">
<Filter>Graphics\Debugging</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Debugging\SHVkDebugMessenger.h">
<Filter>Graphics\Debugging</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Debugging\SHVulkanDebugUtil.h">
<Filter>Graphics\Debugging</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolManager.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorPool.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.h">
<Filter>Graphics\Descriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Devices\SHVkLogicalDevice.h">
<Filter>Graphics\Devices</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDevice.h">
<Filter>Graphics\Devices</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.h">
<Filter>Graphics\Devices</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Framebuffer\SHVkFramebuffer.h">
<Filter>Graphics\Framebuffer</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Images\SHImageViewDetails.h">
<Filter>Graphics\Images</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Images\SHVkImage.h">
<Filter>Graphics\Images</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Images\SHVkImageView.h">
<Filter>Graphics\Images</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Images\SHVkSampler.h">
<Filter>Graphics\Images</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Instance\SHVkInstance.h">
<Filter>Graphics\Instance</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.h">
<Filter>Graphics\MiddleEnd\Interface</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.h">
<Filter>Graphics\MiddleEnd\Interface</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.h">
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.h">
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.h">
<Filter>Graphics\MiddleEnd\Shaders</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.h">
<Filter>Graphics\MiddleEnd\Shaders</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\MiddleEnd\Shaders\SHShaderType.h">
<Filter>Graphics\MiddleEnd\Shaders</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHPipelineLayoutParams.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHPipelineState.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHPipelineType.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHPushConstantInterface.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHVkPipeline.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Pipeline\SHVkPipelineLayout.h">
<Filter>Graphics\Pipeline</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Queues\SHVkQueue.h">
<Filter>Graphics\Queues</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\RenderGraph\SHRenderGraph.h">
<Filter>Graphics\RenderGraph</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachDescGen.h">
<Filter>Graphics\Renderpass</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Renderpass\SHVkAttachment.h">
<Filter>Graphics\Renderpass</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Renderpass\SHVkRenderpass.h">
<Filter>Graphics\Renderpass</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassDescription.h">
<Filter>Graphics\Renderpass</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Renderpass\SHVkSubpassParams.h">
<Filter>Graphics\Renderpass</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\SHVkUtil.h">
<Filter>Graphics</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\SHVulkanDefines.h">
<Filter>Graphics</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\SHVulkanIncludes.h">
<Filter>Graphics</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.h">
<Filter>Graphics\Shaders\BlockInterface</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Shaders\SHShaderReflected.h">
<Filter>Graphics\Shaders</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Shaders\SHVkShaderModule.h">
<Filter>Graphics\Shaders</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.h">
<Filter>Graphics\Shaders\spirv-reflect</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Swapchain\SHSwapchainParams.h">
<Filter>Graphics\Swapchain</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Swapchain\SHVkSwapchain.h">
<Filter>Graphics\Swapchain</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Synchronization\SHVkFence.h">
<Filter>Graphics\Synchronization</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Synchronization\SHVkSemaphore.h">
<Filter>Graphics\Synchronization</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\VertexDescriptors\SHVertexAttribute.h">
<Filter>Graphics\VertexDescriptors</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Windowing\SHWindow.h">
<Filter>Graphics\Windowing</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Windowing\SHWindowMap.h">
<Filter>Graphics\Windowing</Filter>
</ClInclude>
<ClInclude Include="src\Graphics\Windowing\Surface\SHVkSurface.h">
<Filter>Graphics\Windowing\Surface</Filter>
</ClInclude>
<ClInclude Include="src\Math\Geometry\SHBoundingBox.h">
<Filter>Math\Geometry</Filter>
</ClInclude>
<ClInclude Include="src\Math\Geometry\SHShape.h">
<Filter>Math\Geometry</Filter>
</ClInclude>
<ClInclude Include="src\Math\SHMath.h">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\SHMathHelpers.h">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\SHMathHelpers.hpp">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\SHMatrix.h">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\SHQuaternion.h">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\Transform\SHTransform.h">
<Filter>Math</Filter>
</ClInclude>
<ClInclude Include="src\Math\Vector\SHVec2.h">
<Filter>Math\Vector</Filter>
</ClInclude>
<ClInclude Include="src\Math\Vector\SHVec3.h">
<Filter>Math\Vector</Filter>
</ClInclude>
<ClInclude Include="src\Math\Vector\SHVec4.h">
<Filter>Math\Vector</Filter>
</ClInclude>
<ClInclude Include="src\Meta\SHIsDetected.h">
<Filter>Meta</Filter>
</ClInclude>
<ClInclude Include="src\Resource\Handle.h">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\Resource\Handle.hpp">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\Resource\ResourceLibrary.h">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\Resource\ResourceLibrary.hpp">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\Resource\SparseSet.h">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\Resource\SparseSet.hpp">
<Filter>Resource</Filter>
</ClInclude>
<ClInclude Include="src\SHCommonTypes.h" />
<ClInclude Include="src\SH_API.h" />
<ClInclude Include="src\SHpch.h" />
<ClInclude Include="src\Scene\SHScene.h">
<Filter>Scene</Filter>
</ClInclude>
<ClInclude Include="src\Scene\SHSceneGraph.h">
<Filter>Scene</Filter>
</ClInclude>
<ClInclude Include="src\Scene\SHSceneManager.h">
<Filter>Scene</Filter>
</ClInclude>
<ClInclude Include="src\Scripting\SHDotNetRuntime.h">
<Filter>Scripting</Filter>
</ClInclude>
<ClInclude Include="src\Scripting\SHDotNetRuntime.hpp">
<Filter>Scripting</Filter>
</ClInclude>
<ClInclude Include="src\Scripting\SHScriptEngine.h">
<Filter>Scripting</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHException.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHExceptionHandler.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHFileUtilties.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHLogger.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHStringUtils.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHStringUtils.hpp">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHUtilities.h">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Tools\SHUtilities.hpp">
<Filter>Tools</Filter>
</ClInclude>
<ClInclude Include="src\Math\Transform\SHTransformComponent.h" />
<ClInclude Include="src\Math\Transform\SHTransformSystem.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\ECS_Base\Components\SHComponent.cpp">
<Filter>ECS_Base\Components</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\Components\SHComponentGroup.cpp">
<Filter>ECS_Base\Components</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\Entity\SHEntity.cpp">
<Filter>ECS_Base\Entity</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\Managers\SHComponentManager.cpp">
<Filter>ECS_Base\Managers</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\Managers\SHEntityManager.cpp">
<Filter>ECS_Base\Managers</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\Managers\SHSystemManager.cpp">
<Filter>ECS_Base\Managers</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\System\SHFixedSystemRoutine.cpp">
<Filter>ECS_Base\System</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\System\SHSystemRoutine.cpp">
<Filter>ECS_Base\System</Filter>
</ClCompile>
<ClCompile Include="src\ECS_Base\UnitTesting\SHECSUnitTest.cpp">
<Filter>ECS_Base\UnitTesting</Filter>
</ClCompile>
<ClCompile Include="src\Engine\SHEngine.cpp">
<Filter>Engine</Filter>
</ClCompile>
<ClCompile Include="src\FRC\SHFramerateController.cpp">
<Filter>FRC</Filter>
</ClCompile>
<ClCompile Include="src\Filesystem\SHFileSystem.cpp">
<Filter>Filesystem</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Buffers\SHVkBuffer.cpp">
<Filter>Graphics\Buffers</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Commands\SHVkCommandBuffer.cpp">
<Filter>Graphics\Commands</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Commands\SHVkCommandPool.cpp">
<Filter>Graphics\Commands</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Debugging\SHValidationLayersQuery.cpp">
<Filter>Graphics\Debugging</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Debugging\SHVkDebugMessenger.cpp">
<Filter>Graphics\Debugging</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Debugging\SHVulkanDebugUtil.cpp">
<Filter>Graphics\Debugging</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolManager.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorPoolStorage.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHDescriptorSetUpdater.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorPool.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetGroup.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Descriptors\SHVkDescriptorSetLayout.cpp">
<Filter>Graphics\Descriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Devices\SHVkLogicalDevice.cpp">
<Filter>Graphics\Devices</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDevice.cpp">
<Filter>Graphics\Devices</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Devices\SHVkPhysicalDeviceLibrary.cpp">
<Filter>Graphics\Devices</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Framebuffer\SHVkFramebuffer.cpp">
<Filter>Graphics\Framebuffer</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Images\SHVkImage.cpp">
<Filter>Graphics\Images</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Images\SHVkImageView.cpp">
<Filter>Graphics\Images</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Images\SHVkSampler.cpp">
<Filter>Graphics\Images</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Instance\SHVkInstance.cpp">
<Filter>Graphics\Instance</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHGraphicsSystem.cpp">
<Filter>Graphics\MiddleEnd\Interface</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\Interface\SHRenderTarget.cpp">
<Filter>Graphics\MiddleEnd\Interface</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHPerFrameData.cpp">
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\PerFrame\SHRenderContext.cpp">
<Filter>Graphics\MiddleEnd\PerFrame</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderModuleLibrary.cpp">
<Filter>Graphics\MiddleEnd\Shaders</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\MiddleEnd\Shaders\SHShaderSourceLibrary.cpp">
<Filter>Graphics\MiddleEnd\Shaders</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Pipeline\SHPipelineState.cpp">
<Filter>Graphics\Pipeline</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Pipeline\SHPushConstantInterface.cpp">
<Filter>Graphics\Pipeline</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Pipeline\SHVkPipeline.cpp">
<Filter>Graphics\Pipeline</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Pipeline\SHVkPipelineLayout.cpp">
<Filter>Graphics\Pipeline</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Queues\SHVkQueue.cpp">
<Filter>Graphics\Queues</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\RenderGraph\SHRenderGraph.cpp">
<Filter>Graphics\RenderGraph</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Renderpass\SHVkAttachDescGen.cpp">
<Filter>Graphics\Renderpass</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Renderpass\SHVkRenderpass.cpp">
<Filter>Graphics\Renderpass</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Renderpass\SHVkSubpassParams.cpp">
<Filter>Graphics\Renderpass</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\SHVkUtil.cpp">
<Filter>Graphics</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\SHVulkanIncludes.cpp">
<Filter>Graphics</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Shaders\BlockInterface\SHShaderBlockInterface.cpp">
<Filter>Graphics\Shaders\BlockInterface</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Shaders\SHShaderReflected.cpp">
<Filter>Graphics\Shaders</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Shaders\SHVkShaderModule.cpp">
<Filter>Graphics\Shaders</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Shaders\spirv-reflect\spirv_reflect.cpp">
<Filter>Graphics\Shaders\spirv-reflect</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Swapchain\SHVkSwapchain.cpp">
<Filter>Graphics\Swapchain</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Synchronization\SHVkFence.cpp">
<Filter>Graphics\Synchronization</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Synchronization\SHVkSemaphore.cpp">
<Filter>Graphics\Synchronization</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\VertexDescriptors\SHVertexAttribute.cpp">
<Filter>Graphics\VertexDescriptors</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Windowing\SHWIndowMap.cpp">
<Filter>Graphics\Windowing</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Windowing\SHWindow.cpp">
<Filter>Graphics\Windowing</Filter>
</ClCompile>
<ClCompile Include="src\Graphics\Windowing\Surface\SHVkSurface.cpp">
<Filter>Graphics\Windowing\Surface</Filter>
</ClCompile>
<ClCompile Include="src\Math\Geometry\SHBoundingBox.cpp">
<Filter>Math\Geometry</Filter>
</ClCompile>
<ClCompile Include="src\Math\Geometry\SHShape.cpp">
<Filter>Math\Geometry</Filter>
</ClCompile>
<ClCompile Include="src\Math\SHMathHelpers.cpp">
<Filter>Math</Filter>
</ClCompile>
<ClCompile Include="src\Math\SHMatrix.cpp">
<Filter>Math</Filter>
</ClCompile>
<ClCompile Include="src\Math\SHQuaternion.cpp">
<Filter>Math</Filter>
</ClCompile>
<ClCompile Include="src\Math\Transform\SHTransform.cpp">
<Filter>Math</Filter>
</ClCompile>
<ClCompile Include="src\Math\Vector\SHVec2.cpp">
<Filter>Math\Vector</Filter>
</ClCompile>
<ClCompile Include="src\Math\Vector\SHVec3.cpp">
<Filter>Math\Vector</Filter>
</ClCompile>
<ClCompile Include="src\Math\Vector\SHVec4.cpp">
<Filter>Math\Vector</Filter>
</ClCompile>
<ClCompile Include="src\Resource\ResourceLibrary.cpp">
<Filter>Resource</Filter>
</ClCompile>
<ClCompile Include="src\SHpch.cpp" />
<ClCompile Include="src\Scene\SHSceneGraph.cpp">
<Filter>Scene</Filter>
</ClCompile>
<ClCompile Include="src\Scene\SHSceneManager.cpp">
<Filter>Scene</Filter>
</ClCompile>
<ClCompile Include="src\Scripting\SHDotNetRuntime.cpp">
<Filter>Scripting</Filter>
</ClCompile>
<ClCompile Include="src\Scripting\SHScriptEngine.cpp">
<Filter>Scripting</Filter>
</ClCompile>
<ClCompile Include="src\Tools\SHException.cpp">
<Filter>Tools</Filter>
</ClCompile>
<ClCompile Include="src\Tools\SHExceptionHandler.cpp">
<Filter>Tools</Filter>
</ClCompile>
<ClCompile Include="src\Tools\SHFileUtilties.cpp">
<Filter>Tools</Filter>
</ClCompile>
<ClCompile Include="src\Tools\SHLogger.cpp">
<Filter>Tools</Filter>
</ClCompile>
<ClCompile Include="src\Tools\SHStringUtils.cpp">
<Filter>Tools</Filter>
</ClCompile>
<ClCompile Include="src\Math\Transform\SHTransformComponent.cpp" />
<ClCompile Include="src\Math\Transform\SHTransformSystem.cpp" />
</ItemGroup>
</Project>

View File

@ -36,7 +36,7 @@ namespace SHADE
//The Container of all Componentgroups //The Container of all Componentgroups
static std::vector<SHComponentGroup> componentGroups; static std::vector<SHComponentGroup> componentGroups;
friend struct SHSceneNode; friend class SHSceneNode;

View File

@ -0,0 +1,267 @@
/****************************************************************************************
* \file SHBoundingBox.cpp
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Implementation for a 3-Dimensional Axis Aligned Bounding Box
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#include <SHpch.h>
// Primary Header
#include "SHBoundingBox.h"
// Project Headers
#include "Math/SHMathHelpers.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Constructors & Destructor Definitions */
/*-----------------------------------------------------------------------------------*/
SHBoundingBox::SHBoundingBox(const SHVec3& c, SHVec3& hE) noexcept
: SHShape {}
, center { c }
, halfExtents { hE }
{
type = Type::BOUNDING_BOX;
}
SHBoundingBox::SHBoundingBox(const SHVec3* vertices, size_t numVertices) noexcept
: SHShape {}
{
type = Type::BOUNDING_BOX;
if (vertices == nullptr || numVertices < 2)
{
SHLOG_ERROR("Insufficient number of vertices passed into bounding box constructor!")
return;
}
SHVec3 min { std::numeric_limits<float>::max() };
SHVec3 max { std::numeric_limits<float>::min() };
for (size_t i = 0; i < numVertices; ++i)
{
const SHVec3& v = vertices[i];
min.x = SHMath::Min(min.x, v.x);
min.y = SHMath::Min(min.y, v.y);
min.z = SHMath::Min(min.z, v.z);
max.x = SHMath::Max(max.x, v.x);
max.y = SHMath::Max(max.y, v.y);
max.z = SHMath::Max(max.z, v.z);
}
center = SHVec3::Lerp(min, max, 0.5f);
halfExtents = SHVec3::Abs((max - min) * 0.5f);
}
SHBoundingBox::SHBoundingBox(const SHBoundingBox* boxes, size_t numBoxes) noexcept
: SHShape {}
{
type = Type::BOUNDING_BOX;
if (boxes == nullptr || numBoxes == 0)
{
SHLOG_ERROR("Insufficient number of boxes passed into bounding box constructor!")
return;
}
center = boxes->center;
halfExtents = boxes->halfExtents;
for (size_t i = 1; i < numBoxes; ++i)
*this = Combine(*this, boxes[i]);
}
SHBoundingBox::SHBoundingBox(const SHBoundingBox& rhs) noexcept
: SHShape {}
, center { rhs.center }
, halfExtents { rhs.halfExtents }
{
type = Type::BOUNDING_BOX;
}
SHBoundingBox::SHBoundingBox(SHBoundingBox&& rhs) noexcept
: SHShape {}
, center { rhs.center }
, halfExtents { rhs.halfExtents }
{
type = Type::BOUNDING_BOX;
}
SHBoundingBox& SHBoundingBox::operator=(const SHBoundingBox& rhs) noexcept
{
if (rhs.type != Type::BOUNDING_BOX)
{
SHLOG_WARNING("Cannot assign a non-bounding box to a bounding box!")
}
else
{
center = rhs.center;
halfExtents = rhs.halfExtents;
}
return *this;
}
SHBoundingBox& SHBoundingBox::operator=(SHBoundingBox&& rhs) noexcept
{
if (rhs.type != Type::BOUNDING_BOX)
{
SHLOG_WARNING("Cannot assign a non-bounding box to a bounding box!")
}
else
{
center = rhs.center;
halfExtents = rhs.halfExtents;
}
return *this;
}
/*-----------------------------------------------------------------------------------*/
/* Getter Function Definitions */
/*-----------------------------------------------------------------------------------*/
const SHVec3& SHBoundingBox::GetCenter() const noexcept
{
return center;
}
const SHVec3& SHBoundingBox::GetHalfExtents() const noexcept
{
return halfExtents;
}
SHVec3 SHBoundingBox::GetMin() const noexcept
{
return center - halfExtents;
}
SHVec3 SHBoundingBox::GetMax() const noexcept
{
return center + halfExtents;
}
/*-----------------------------------------------------------------------------------*/
/* Setter Function Definitions */
/*-----------------------------------------------------------------------------------*/
void SHBoundingBox::SetCenter(const SHVec3& newCenter) noexcept
{
center = newCenter;
}
void SHBoundingBox::SetHalfExtents(const SHVec3& newHalfExtents) noexcept
{
halfExtents = newHalfExtents;
}
void SHBoundingBox::SetMin(const SHVec3& min) noexcept
{
const SHVec3 MAX = center + halfExtents;
center = SHVec3::Lerp(min, MAX, 0.5f);
halfExtents = SHVec3::Abs((MAX - min) * 0.5f);
}
void SHBoundingBox::SetMax(const SHVec3& max) noexcept
{
const SHVec3 MIN = center - halfExtents;
center = SHVec3::Lerp(MIN, max, 0.5f);
halfExtents = SHVec3::Abs((max - MIN) * 0.5f);
}
void SHBoundingBox::SetMinMax(const SHVec3& min, const SHVec3& max) noexcept
{
center = SHVec3::Lerp(min, max, 0.5f);
halfExtents = SHVec3::Abs((max - min) * 0.5f);
}
/*-----------------------------------------------------------------------------------*/
/* Public Function Member Definitions */
/*-----------------------------------------------------------------------------------*/
bool SHBoundingBox::TestPoint(const SHVec3& point) noexcept
{
const SHVec3 V = SHVec3::Abs(point - center);
for (size_t i = 0; i < SHVec3::SIZE; ++i)
{
if (V[i] > halfExtents[i])
return false;
}
return true;
}
bool SHBoundingBox::Contains(const SHBoundingBox& rhs) const noexcept
{
const SHVec3 V = SHVec3::Abs(rhs.center - center);
for (size_t i = 0; i < SHVec3::SIZE; ++i)
{
if (V[i] > rhs.halfExtents[i])
return false;
}
return true;
}
float SHBoundingBox::Volume() const noexcept
{
return 8.0f * (halfExtents.x * halfExtents.y * halfExtents.z);
}
float SHBoundingBox::SurfaceArea() const noexcept
{
return 8.0f * ((halfExtents.x * halfExtents.y)
+ (halfExtents.x * halfExtents.z)
+ (halfExtents.y * halfExtents.z));
}
/*-----------------------------------------------------------------------------------*/
/* Static Function Member Definitions */
/*-----------------------------------------------------------------------------------*/
SHBoundingBox SHBoundingBox::Combine(const SHBoundingBox& lhs, const SHBoundingBox& rhs) noexcept
{
if (lhs.Contains(rhs))
return lhs;
if (rhs.Contains(lhs))
return rhs;
const SHVec3 LHS_MIN = lhs.GetMin();
const SHVec3 LHS_MAX = lhs.GetMax();
const SHVec3 RHS_MIN = rhs.GetMin();
const SHVec3 RHS_MAX = rhs.GetMax();
SHVec3 min = SHVec3::Min({ LHS_MIN, RHS_MIN });
SHVec3 max = SHVec3::Max({ LHS_MAX, RHS_MAX });
SHBoundingBox result{ lhs };
result.SetMinMax(min, max);
return result;
}
bool SHBoundingBox::Intersect(const SHBoundingBox& lhs, const SHBoundingBox& rhs) noexcept
{
const SHVec3 V = SHVec3::Abs(lhs.center - rhs.center);
const SHVec3 D = lhs.halfExtents + rhs.halfExtents;
for (size_t i = 0; i < SHVec3::SIZE; ++i)
{
if (V[i] > D[i])
return false;
}
return true;
}
} // namespace SHADE

View File

@ -0,0 +1,88 @@
/****************************************************************************************
* \file SHBoundingBox.h
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Interface for a 3-Dimensional Axis Aligned Bounding Box
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#pragma once
// Project Headers
#include "SHShape.h"
#include "SH_API.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Type Definitions */
/*-----------------------------------------------------------------------------------*/
class SH_API SHBoundingBox : public SHShape
{
public:
/*---------------------------------------------------------------------------------*/
/* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/
SHBoundingBox (const SHVec3& center, SHVec3& halfExtents) noexcept;
SHBoundingBox (const SHVec3* vertices, size_t numVertices) noexcept;
SHBoundingBox (const SHBoundingBox* boxes, size_t numBoxes) noexcept;
SHBoundingBox (const SHBoundingBox& rhs) noexcept;
SHBoundingBox (SHBoundingBox&& rhs) noexcept;
SHBoundingBox& operator= (const SHBoundingBox& rhs) noexcept;
SHBoundingBox& operator= (SHBoundingBox&& rhs) noexcept;
/*---------------------------------------------------------------------------------*/
/* Getter Functions */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] const SHVec3& GetCenter () const noexcept;
[[nodiscard]] const SHVec3& GetHalfExtents () const noexcept;
[[nodiscard]] SHVec3 GetMin () const noexcept;
[[nodiscard]] SHVec3 GetMax () const noexcept;
/*---------------------------------------------------------------------------------*/
/* Setter Functions */
/*---------------------------------------------------------------------------------*/
void SetCenter (const SHVec3& newCenter) noexcept;
void SetHalfExtents (const SHVec3& newHalfExtents) noexcept;
void SetMin (const SHVec3& min) noexcept;
void SetMax (const SHVec3& max) noexcept;
void SetMinMax (const SHVec3& min, const SHVec3& max) noexcept;
/*---------------------------------------------------------------------------------*/
/* Function Members */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] bool TestPoint (const SHVec3& point) noexcept override;
[[nodiscard]] bool Contains (const SHBoundingBox& rhs) const noexcept;
[[nodiscard]] float Volume () const noexcept;
[[nodiscard]] float SurfaceArea () const noexcept;
/*---------------------------------------------------------------------------------*/
/* Static Function Members */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] static SHBoundingBox Combine (const SHBoundingBox& lhs, const SHBoundingBox& rhs) noexcept;
[[nodiscard]] static bool Intersect (const SHBoundingBox& lhs, const SHBoundingBox& rhs) noexcept;
private:
/*---------------------------------------------------------------------------------*/
/* Data Members */
/*---------------------------------------------------------------------------------*/
SHVec3 center;
SHVec3 halfExtents;
};
} // namespace SHADE

View File

@ -0,0 +1,26 @@
/****************************************************************************************
* \file SHShape.cpp
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Implementation for a shape.
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#include <SHpch.h>
// Primary Header
#include "SHShape.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Constructors & Destructor Definitions */
/*-----------------------------------------------------------------------------------*/
SHShape::SHShape()
: type { Type::NONE }
{}
} // namespace SHADE

View File

@ -0,0 +1,79 @@
/****************************************************************************************
* \file SHShape.h
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Interface for a shape.
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#pragma once
// Project Headers
#include "Math/Transform/SHTransform.h"
#include "SH_API.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Type Definitions */
/*-----------------------------------------------------------------------------------*/
class SH_API SHShape
{
public:
/*---------------------------------------------------------------------------------*/
/* Type Definitions */
/*---------------------------------------------------------------------------------*/
enum class Type
{
BOUNDING_BOX
, RAY
, TRIANGLE
, COUNT
, NONE = -1
};
/*---------------------------------------------------------------------------------*/
/* Data Members */
/*---------------------------------------------------------------------------------*/
bool isIntersecting;
/*---------------------------------------------------------------------------------*/
/* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/
virtual ~SHShape () = default;
SHShape (const SHShape&) = default;
SHShape (SHShape&&) = default;
SHShape& operator=(const SHShape&) = default;
SHShape& operator=(SHShape&&) = default;
SHShape();
/*---------------------------------------------------------------------------------*/
/* Getter Functions */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] Type GetType() const;
/*---------------------------------------------------------------------------------*/
/* Function Members */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] virtual bool TestPoint (const SHVec3& point) noexcept = 0;
protected:
/*---------------------------------------------------------------------------------*/
/* Data Members */
/*---------------------------------------------------------------------------------*/
Type type;
};
} // namespace SHADE

View File

@ -6,4 +6,7 @@
#include "Vector/SHVec3.h" #include "Vector/SHVec3.h"
#include "Vector/SHVec4.h" #include "Vector/SHVec4.h"
#include "SHMatrix.h" #include "SHQuaternion.h"
#include "SHMatrix.h"
#include "SHTransform.h"

View File

@ -15,6 +15,9 @@
#include <numbers> #include <numbers>
#include <random> #include <random>
// Project Headers
#include "SH_API.h"
namespace SHADE namespace SHADE
{ {
@ -35,7 +38,7 @@ namespace SHADE
/* Type Definitions */ /* Type Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHMath class SH_API SHMath
{ {
public: public:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -56,25 +59,37 @@ namespace SHADE
/* Static Function Members */ /* Static Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
static void Initialise (); static void Initialise ();
template <IsArithmetic T> template <IsArithmetic T>
[[nodiscard]] static constexpr T DegreesToRadians (T angleInDeg); [[nodiscard]] static T Min (T lhs, T rhs);
template <IsArithmetic T> template <IsArithmetic T>
[[nodiscard]] static constexpr T RadiansToDegrees (T angleInRad); [[nodiscard]] static T Min (const std::initializer_list<T>& values);
template <IsArithmetic T> template <IsArithmetic T>
[[nodiscard]] static T Lerp (T a, T b, T alpha); [[nodiscard]] static T Max (T lhs, T rhs);
template <IsArithmetic T> template <IsArithmetic T>
[[nodiscard]] static T ClampedLerp (T a, T b, T alpha, T alphaMin, T alphaMax); [[nodiscard]] static T Max (const std::initializer_list<T>& values);
template <IsArithmetic T> template <IsArithmetic T>
[[nodiscard]] static T Wrap (T value, T min, T max); [[nodiscard]] static T DegreesToRadians (T angleInDeg);
template <IsArithmetic T>
[[nodiscard]] static T RadiansToDegrees (T angleInRad);
template <IsArithmetic T>
[[nodiscard]] static T Lerp (T a, T b, T alpha);
template <IsArithmetic T>
[[nodiscard]] static T ClampedLerp (T a, T b, T alpha, T alphaMin, T alphaMax);
template <IsArithmetic T>
[[nodiscard]] static T Wrap (T value, T min, T max);
template <IsArithmetic T = float> template <IsArithmetic T = float>
[[nodiscard]] static T GenerateRandomNumber (T lowerBound = 0, T upperBound = 1); [[nodiscard]] static T GenerateRandomNumber (T lowerBound = 0, T upperBound = 1);
/** /**
* @brief Compares two floating-point values for equality within given tolerances. * @brief Compares two floating-point values for equality within given tolerances.
@ -86,7 +101,7 @@ namespace SHADE
* @returns True if the values are equal within the specified tolerances. * @returns True if the values are equal within the specified tolerances.
*/ */
template <IsFloatingPoint T = float> template <IsFloatingPoint T = float>
[[nodiscard]] static bool CompareFloat (T lhs, T rhs, T absTolerance = EPSILON, T relTolerance = EPSILON); [[nodiscard]] static bool CompareFloat (T lhs, T rhs, T absTolerance = EPSILON, T relTolerance = EPSILON);
private: private:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/

View File

@ -13,11 +13,8 @@
// Primary Header // Primary Header
#include "SHMathHelpers.h" #include "SHMathHelpers.h"
#include <cmath>
#include <algorithm> #include <algorithm>
// TODOs (Diren): Include pch?
namespace SHADE namespace SHADE
{ {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -25,13 +22,51 @@ namespace SHADE
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
template <IsArithmetic T> template <IsArithmetic T>
constexpr T SHMath::DegreesToRadians(T angleInDeg) T SHMath::Min(T lhs, T rhs)
{
return lhs < rhs ? lhs : rhs;
}
template <IsArithmetic T>
T SHMath::Min(const std::initializer_list<T>& values)
{
T min = *(values.begin());
for (auto value : values)
{
min = Min(min, value);
}
return min;
}
template <IsArithmetic T>
T SHMath::Max(T lhs, T rhs)
{
return lhs > rhs ? lhs : rhs;
}
template <IsArithmetic T>
T SHMath::Max(const std::initializer_list<T>& values)
{
T max = *(values.begin());
for (auto value : values)
{
max = Min(max, value);
}
return max;
}
template <IsArithmetic T>
T SHMath::DegreesToRadians(T angleInDeg)
{ {
return angleInDeg * static_cast<T>(PI / 180.0f); return angleInDeg * static_cast<T>(PI / 180.0f);
} }
template <IsArithmetic T> template <IsArithmetic T>
constexpr T SHMath::RadiansToDegrees(T angleInRad) T SHMath::RadiansToDegrees(T angleInRad)
{ {
return angleInRad * static_cast<T>(180.0f / PI); return angleInRad * static_cast<T>(180.0f / PI);
} }
@ -82,9 +117,10 @@ namespace SHADE
template <IsFloatingPoint T> template <IsFloatingPoint T>
bool CompareFloat(T lhs, T rhs, T absTolerance, T relTolerance) bool SHMath::CompareFloat(T lhs, T rhs, T absTolerance, T relTolerance)
{ {
return std::fabs(lhs - rhs) <= std::max(absTolerance, relTolerance * std::max(abs(lhs), abs(rhs))); const T RTOL = relTolerance * Max(std::fabs(lhs), std::fabs(rhs));
return std::fabs(lhs - rhs) <= MAX(absTolerance, RTOL);
} }
} // namespace SHADE } // namespace SHADE

View File

@ -362,7 +362,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixTranslation(x, y, z)); XMStoreFloat4x4(&result, XMMatrixTranslation(x, y, z));
result.Transpose();
return result; return result;
} }
@ -371,7 +370,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixTranslation(pos.x, pos.y, pos.z)); XMStoreFloat4x4(&result, XMMatrixTranslation(pos.x, pos.y, pos.z));
result.Transpose();
return result; return result;
} }
@ -382,7 +380,6 @@ namespace SHADE
const XMVECTOR A = XMLoadFloat3(&axis); const XMVECTOR A = XMLoadFloat3(&axis);
XMStoreFloat4x4(&result, XMMatrixRotationAxis(A, angleInRad)); XMStoreFloat4x4(&result, XMMatrixRotationAxis(A, angleInRad));
result.Transpose();
return result; return result;
} }
@ -391,7 +388,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixRotationRollPitchYaw(pitch, yaw, roll)); XMStoreFloat4x4(&result, XMMatrixRotationRollPitchYaw(pitch, yaw, roll));
result.Transpose();
return result; return result;
} }
@ -400,7 +396,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixRotationRollPitchYaw(eulerAngles.x, eulerAngles.y, eulerAngles.z)); XMStoreFloat4x4(&result, XMMatrixRotationRollPitchYaw(eulerAngles.x, eulerAngles.y, eulerAngles.z));
result.Transpose();
return result; return result;
} }
@ -411,7 +406,6 @@ namespace SHADE
const XMVECTOR Q = XMLoadFloat4(&q); const XMVECTOR Q = XMLoadFloat4(&q);
XMStoreFloat4x4(&result, XMMatrixRotationQuaternion(Q)); XMStoreFloat4x4(&result, XMMatrixRotationQuaternion(Q));
result.Transpose();
return result; return result;
} }
@ -420,7 +414,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixRotationX(angleInRad)); XMStoreFloat4x4(&result, XMMatrixRotationX(angleInRad));
result.Transpose();
return result; return result;
} }
@ -429,7 +422,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixRotationY(angleInRad)); XMStoreFloat4x4(&result, XMMatrixRotationY(angleInRad));
result.Transpose();
return result; return result;
} }
@ -438,7 +430,6 @@ namespace SHADE
SHMatrix result; SHMatrix result;
XMStoreFloat4x4(&result, XMMatrixRotationZ(angleInRad)); XMStoreFloat4x4(&result, XMMatrixRotationZ(angleInRad));
result.Transpose();
return result; return result;
} }
@ -476,7 +467,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixLookAtRH(EYE, TGT, UP)); XMStoreFloat4x4(&result, XMMatrixLookAtRH(EYE, TGT, UP));
result.Transpose();
return result; return result;
} }
@ -490,7 +480,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixLookAtLH(EYE, TGT, UP)); XMStoreFloat4x4(&result, XMMatrixLookAtLH(EYE, TGT, UP));
result.Transpose();
return result; return result;
} }
@ -512,7 +501,6 @@ namespace SHADE
result._42 = pos.y; result._42 = pos.y;
result._43 = pos.z; result._43 = pos.z;
result.Transpose();
return result; return result;
} }
@ -534,7 +522,6 @@ namespace SHADE
result._42 = pos.x; result._42 = pos.x;
result._43 = pos.x; result._43 = pos.x;
result.Transpose();
return result; return result;
} }
@ -544,7 +531,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixPerspectiveFovRH(fov, aspectRatio, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixPerspectiveFovRH(fov, aspectRatio, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }
@ -554,7 +540,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixPerspectiveFovLH(fov, aspectRatio, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixPerspectiveFovLH(fov, aspectRatio, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }
@ -564,7 +549,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixPerspectiveRH(width, height, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixPerspectiveRH(width, height, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }
@ -574,7 +558,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixPerspectiveLH(width, height, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixPerspectiveLH(width, height, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }
@ -584,7 +567,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixOrthographicRH(width, height, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixOrthographicRH(width, height, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }
@ -594,7 +576,6 @@ namespace SHADE
XMStoreFloat4x4(&result, XMMatrixOrthographicLH(width, height, nearPlane, farPlane)); XMStoreFloat4x4(&result, XMMatrixOrthographicLH(width, height, nearPlane, farPlane));
result.Transpose();
return result; return result;
} }

View File

@ -13,6 +13,8 @@
#include <DirectXMath.h> #include <DirectXMath.h>
#include <string> #include <string>
// Project Headers
#include "SH_API.h"
#include "Vector/SHVec4.h" #include "Vector/SHVec4.h"
#include "SH_API.h" #include "SH_API.h"
@ -50,96 +52,99 @@ namespace SHADE
/* Constructors & Destructor */ /* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHMatrix (const SHMatrix& rhs) = default; SHMatrix (const SHMatrix& rhs) = default;
SHMatrix (SHMatrix&& rhs) = default; SHMatrix (SHMatrix&& rhs) = default;
~SHMatrix () = default; ~SHMatrix () = default;
SHMatrix () noexcept; SHMatrix () noexcept;
SHMatrix ( const SHVec4& r0, SHMatrix
const SHVec4& r1, (
const SHVec4& r2, const SHVec4& r0,
const SHVec4& r3 = SHVec4::UnitW const SHVec4& r1,
) noexcept; const SHVec4& r2,
SHMatrix ( const SHVec4& r3 = SHVec4::UnitW
float m00, float m01, float m02, float m03, ) noexcept;
float m10, float m11, float m12, float m13, SHMatrix
float m20, float m21, float m22, float m23, (
float m30 = 0.0f, float m31 = 0.0f, float m32 = 0.0f, float m33 = 1.0f float m00, float m01, float m02, float m03,
) noexcept; float m10, float m11, float m12, float m13,
float m20, float m21, float m22, float m23,
float m30 = 0.0f, float m31 = 0.0f, float m32 = 0.0f, float m33 = 1.0f
) noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Operator Overloads */ /* Operator Overloads */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHMatrix& operator= (const SHMatrix& rhs) = default; SHMatrix& operator= (const SHMatrix& rhs) = default;
SHMatrix& operator= (SHMatrix&& rhs) = default; SHMatrix& operator= (SHMatrix&& rhs) = default;
SHMatrix& operator+= (const SHMatrix& rhs) noexcept; SHMatrix& operator+= (const SHMatrix& rhs) noexcept;
SHMatrix& operator-= (const SHMatrix& rhs) noexcept; SHMatrix& operator-= (const SHMatrix& rhs) noexcept;
SHMatrix& operator*= (const SHMatrix& rhs) noexcept; SHMatrix& operator*= (const SHMatrix& rhs) noexcept;
SHMatrix& operator*= (float rhs) noexcept; SHMatrix& operator*= (float rhs) noexcept;
SHMatrix& operator/= (const SHMatrix& rhs) noexcept; SHMatrix& operator/= (const SHMatrix& rhs) noexcept;
SHMatrix& operator/= (float rhs) noexcept; SHMatrix& operator/= (float rhs) noexcept;
SHMatrix operator+ (const SHMatrix& rhs) const noexcept; [[nodiscard]] SHMatrix operator+ (const SHMatrix& rhs) const noexcept;
SHMatrix operator- (const SHMatrix& rhs) const noexcept; [[nodiscard]] SHMatrix operator- (const SHMatrix& rhs) const noexcept;
SHMatrix operator- () const noexcept; [[nodiscard]] SHMatrix operator- () const noexcept;
SHMatrix operator* (const SHMatrix& rhs) const noexcept; [[nodiscard]] SHMatrix operator* (const SHMatrix& rhs) const noexcept;
SHVec3 operator* (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 operator* (const SHVec3& rhs) const noexcept;
SHVec4 operator* (const SHVec4& rhs) const noexcept; [[nodiscard]] SHVec4 operator* (const SHVec4& rhs) const noexcept;
SHMatrix operator* (float rhs) const noexcept; [[nodiscard]] SHMatrix operator* (float rhs) const noexcept;
SHMatrix operator/ (const SHMatrix& rhs) const noexcept; [[nodiscard]] SHMatrix operator/ (const SHMatrix& rhs) const noexcept;
SHMatrix operator/ (float rhs) const noexcept; [[nodiscard]] SHMatrix operator/ (float rhs) const noexcept;
bool operator== (const SHMatrix& rhs) const noexcept; [[nodiscard]] bool operator== (const SHMatrix& rhs) const noexcept;
bool operator!= (const SHMatrix& rhs) const noexcept; [[nodiscard]] bool operator!= (const SHMatrix& rhs) const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
void Transpose () noexcept; void Transpose () noexcept;
void Invert () noexcept; void Invert () noexcept;
[[nodiscard]] float Determinant () const noexcept; [[nodiscard]] float Determinant () const noexcept;
[[nodiscard]] std::string ToString () const noexcept; [[nodiscard]] std::string ToString () const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Static Function Members */ /* Static Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] static SHMatrix Transpose (const SHMatrix& matrix) noexcept; [[nodiscard]] static SHMatrix Transpose (const SHMatrix& matrix) noexcept;
[[nodiscard]] static SHMatrix Inverse (const SHMatrix& matrix) noexcept; [[nodiscard]] static SHMatrix Inverse (const SHMatrix& matrix) noexcept;
[[nodiscard]] static SHMatrix Translate (float x, float y, float z) noexcept; [[nodiscard]] static SHMatrix Translate (float x, float y, float z) noexcept;
[[nodiscard]] static SHMatrix Translate (const SHVec3& pos) noexcept; [[nodiscard]] static SHMatrix Translate (const SHVec3& pos) noexcept;
[[nodiscard]] static SHMatrix Rotate (const SHVec3& axis, float angleInRad) noexcept; [[nodiscard]] static SHMatrix Rotate (const SHVec3& axis, float angleInRad) noexcept;
[[nodiscard]] static SHMatrix Rotate (float yaw, float pitch, float roll) noexcept; [[nodiscard]] static SHMatrix Rotate (float yaw, float pitch, float roll) noexcept;
[[nodiscard]] static SHMatrix Rotate (const SHVec3& eulerAngles) noexcept; [[nodiscard]] static SHMatrix Rotate (const SHVec3& eulerAngles) noexcept;
[[nodiscard]] static SHMatrix Rotate (const SHQuaternion& q) noexcept; [[nodiscard]] static SHMatrix Rotate (const SHQuaternion& q) noexcept;
[[nodiscard]] static SHMatrix RotateX (float angleInRad) noexcept; [[nodiscard]] static SHMatrix RotateX (float angleInRad) noexcept;
[[nodiscard]] static SHMatrix RotateY (float angleInRad) noexcept; [[nodiscard]] static SHMatrix RotateY (float angleInRad) noexcept;
[[nodiscard]] static SHMatrix RotateZ (float angleInRad) noexcept; [[nodiscard]] static SHMatrix RotateZ (float angleInRad) noexcept;
[[nodiscard]] static SHMatrix Scale (float uniformScaleFactor) noexcept; [[nodiscard]] static SHMatrix Scale (float uniformScaleFactor) noexcept;
[[nodiscard]] static SHMatrix Scale (float x, float y, float z) noexcept; [[nodiscard]] static SHMatrix Scale (float x, float y, float z) noexcept;
[[nodiscard]] static SHMatrix Scale (const SHVec3& scale) noexcept; [[nodiscard]] static SHMatrix Scale (const SHVec3& scale) noexcept;
[[nodiscard]] static SHMatrix LookAtRH (const SHVec3& eye, const SHVec3& target, const SHVec3& up) noexcept; [[nodiscard]] static SHMatrix LookAtRH (const SHVec3& eye, const SHVec3& target, const SHVec3& up) noexcept;
[[nodiscard]] static SHMatrix LookAtLH (const SHVec3& eye, const SHVec3& target, const SHVec3& up) noexcept; [[nodiscard]] static SHMatrix LookAtLH (const SHVec3& eye, const SHVec3& target, const SHVec3& up) noexcept;
[[nodiscard]] static SHMatrix CamToWorldRH (const SHVec3& pos, const SHVec3& forward, const SHVec3& up) noexcept; [[nodiscard]] static SHMatrix CamToWorldRH (const SHVec3& pos, const SHVec3& forward, const SHVec3& up) noexcept;
[[nodiscard]] static SHMatrix CamToWorldLH (const SHVec3& pos, const SHVec3& forward, const SHVec3& up) noexcept; [[nodiscard]] static SHMatrix CamToWorldLH (const SHVec3& pos, const SHVec3& forward, const SHVec3& up) noexcept;
[[nodiscard]] static SHMatrix PerspectiveFovRH (float fov, float aspectRatio, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix PerspectiveFovRH (float fov, float aspectRatio, float nearPlane, float farPlane) noexcept;
[[nodiscard]] static SHMatrix PerspectiveFovLH (float fov, float aspectRatio, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix PerspectiveFovLH (float fov, float aspectRatio, float nearPlane, float farPlane) noexcept;
[[nodiscard]] static SHMatrix PerspectiveRH (float width, float height, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix PerspectiveRH (float width, float height, float nearPlane, float farPlane) noexcept;
[[nodiscard]] static SHMatrix PerspectiveLH (float width, float height, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix PerspectiveLH (float width, float height, float nearPlane, float farPlane) noexcept;
[[nodiscard]] static SHMatrix OrthographicRH (float width, float height, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix OrthographicRH (float width, float height, float nearPlane, float farPlane) noexcept;
[[nodiscard]] static SHMatrix OrthographicLH (float width, float height, float nearPlane, float farPlane) noexcept; [[nodiscard]] static SHMatrix OrthographicLH (float width, float height, float nearPlane, float farPlane) noexcept;
// TODO(Diren): Billboard, Shadow, Projection & Reflection // TODO(Diren): Billboard, Shadow, Projection & Reflection
}; };
SHMatrix operator*(float lhs, const SHMatrix& rhs) noexcept; SHMatrix operator*(float lhs, const SHMatrix& rhs) noexcept;
} // namespace SHADE } // namespace SHADE

View File

@ -180,6 +180,34 @@ namespace SHADE
return rhs * lhs; return rhs * lhs;
} }
/*-----------------------------------------------------------------------------------*/
/* Getter Function Definitions */
/*-----------------------------------------------------------------------------------*/
float SHQuaternion::GetAngle() const noexcept
{
XMVECTOR axis;
float angle;
const XMVECTOR Q = XMLoadFloat4(this);
XMQuaternionToAxisAngle(&axis, &angle, Q);
return angle;
}
SHVec4 SHQuaternion::GetAxisAngle() const noexcept
{
XMVECTOR axis;
float angle;
const XMVECTOR Q = XMLoadFloat4(this);
XMQuaternionToAxisAngle(&axis, &angle, Q);
return SHVec4{XMVectorGetX(axis), XMVectorGetY(axis), XMVectorGetZ(axis), angle};
}
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
/* Function Member Definitions */ /* Function Member Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -230,7 +258,7 @@ namespace SHADE
{ {
std::stringstream ss; std::stringstream ss;
ss << std::fixed << std::setprecision(3); ss << std::fixed << std::setprecision(3);
ss << "<" << x << ", " << y << ", " << z << ", " << w <<">"; ss << "<" << w << ", " << x << ", " << y << ", " << z <<">";
return ss.str(); return ss.str();
} }

View File

@ -13,6 +13,9 @@
#include <DirectXMath.h> #include <DirectXMath.h>
#include <string> #include <string>
// Project Headers
#include "SH_API.h"
namespace SHADE namespace SHADE
{ {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -20,13 +23,14 @@ namespace SHADE
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHVec3; class SHVec3;
class SHVec4;
class SHMatrix; class SHMatrix;
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
/* Type Definitions */ /* Type Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHQuaternion : public DirectX::XMFLOAT4 class SH_API SHQuaternion : public DirectX::XMFLOAT4
{ {
public: public:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -39,68 +43,75 @@ namespace SHADE
/* Constructors & Destructor */ /* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHQuaternion (const SHQuaternion& rhs) = default; SHQuaternion (const SHQuaternion& rhs) = default;
SHQuaternion (SHQuaternion&& rhs) = default; SHQuaternion (SHQuaternion&& rhs) = default;
SHQuaternion () noexcept; SHQuaternion () noexcept;
SHQuaternion (float x, float y, float z, float w) noexcept; SHQuaternion (float x, float y, float z, float w) noexcept;
SHQuaternion (float yaw, float pitch, float roll) noexcept; SHQuaternion (float yaw, float pitch, float roll) noexcept;
SHQuaternion (const SHVec3& eulerAngles) noexcept; SHQuaternion (const SHVec3& eulerAngles) noexcept;
SHQuaternion (const SHVec3& axis, float angleInRad) noexcept; SHQuaternion (const SHVec3& axis, float angleInRad) noexcept;
SHQuaternion (const SHMatrix& rotationMatrix) noexcept; SHQuaternion (const SHMatrix& rotationMatrix) noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Operator Overloads */ /* Operator Overloads */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] SHQuaternion& operator= (const SHQuaternion& rhs) = default; SHQuaternion& operator= (const SHQuaternion& rhs) = default;
[[nodiscard]] SHQuaternion& operator= (SHQuaternion&& rhs) = default; SHQuaternion& operator= (SHQuaternion&& rhs) = default;
SHQuaternion& operator+= (const SHQuaternion& rhs) noexcept;
SHQuaternion& operator-= (const SHQuaternion& rhs) noexcept;
SHQuaternion& operator*= (const SHQuaternion& rhs) noexcept;
SHQuaternion& operator*= (float rhs) noexcept;
SHQuaternion& operator/= (const SHQuaternion& rhs) noexcept;
[[nodiscard]] SHQuaternion& operator+= (const SHQuaternion& rhs) noexcept; [[nodiscard]] SHQuaternion operator+ (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion& operator-= (const SHQuaternion& rhs) noexcept; [[nodiscard]] SHQuaternion operator- (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion& operator*= (const SHQuaternion& rhs) noexcept; [[nodiscard]] SHQuaternion operator- () const noexcept;
[[nodiscard]] SHQuaternion& operator*= (float rhs) noexcept; [[nodiscard]] SHQuaternion operator* (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion& operator/= (const SHQuaternion& rhs) noexcept; [[nodiscard]] SHQuaternion operator* (float rhs) const noexcept;
[[nodiscard]] SHQuaternion operator/ (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion operator+ (const SHQuaternion& rhs) const noexcept; [[nodiscard]] bool operator== (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion operator- (const SHQuaternion& rhs) const noexcept; [[nodiscard]] bool operator!= (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion operator- () const noexcept;
[[nodiscard]] SHQuaternion operator* (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion operator* (float rhs) const noexcept;
[[nodiscard]] SHQuaternion operator/ (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] bool operator== (const SHQuaternion& rhs) const noexcept; /*---------------------------------------------------------------------------------*/
[[nodiscard]] bool operator!= (const SHQuaternion& rhs) const noexcept; /* Getter Functions */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] float GetAngle () const noexcept;
[[nodiscard]] SHVec4 GetAxisAngle () const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
void Invert () noexcept; void Invert () noexcept;
[[nodiscard]] float Length () const noexcept; [[nodiscard]] float Length () const noexcept;
[[nodiscard]] float LengthSquared () const noexcept; [[nodiscard]] float LengthSquared () const noexcept;
[[nodiscard]] float Dot (const SHQuaternion& rhs) const noexcept; [[nodiscard]] float Dot (const SHQuaternion& rhs) const noexcept;
[[nodiscard]] SHQuaternion RotateTowards (const SHQuaternion& target, float maxAngleInRad) const noexcept; [[nodiscard]] SHQuaternion RotateTowards (const SHQuaternion& target, float maxAngleInRad) const noexcept;
[[nodiscard]] SHVec3 ToEuler () const noexcept; [[nodiscard]] SHVec3 ToEuler () const noexcept;
[[nodiscard]] std::string ToString () const noexcept; [[nodiscard]] std::string ToString () const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Static Function Members */ /* Static Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] static SHQuaternion Normalise (const SHQuaternion& q) noexcept; [[nodiscard]] static SHQuaternion Normalise (const SHQuaternion& q) noexcept;
[[nodiscard]] static SHQuaternion Conjugate (const SHQuaternion& q) noexcept; [[nodiscard]] static SHQuaternion Conjugate (const SHQuaternion& q) noexcept;
[[nodiscard]] static SHQuaternion Inverse (const SHQuaternion& q) noexcept; [[nodiscard]] static SHQuaternion Inverse (const SHQuaternion& q) noexcept;
[[nodiscard]] static float Angle (const SHQuaternion& q1, const SHQuaternion& q2) noexcept; [[nodiscard]] static float Angle (const SHQuaternion& q1, const SHQuaternion& q2) noexcept;
[[nodiscard]] static SHQuaternion Lerp (const SHQuaternion& q1, const SHQuaternion& q2, float t) noexcept; [[nodiscard]] static SHQuaternion Lerp (const SHQuaternion& q1, const SHQuaternion& q2, float t) noexcept;
[[nodiscard]] static SHQuaternion Slerp (const SHQuaternion& q1, const SHQuaternion& q2, float t) noexcept; [[nodiscard]] static SHQuaternion Slerp (const SHQuaternion& q1, const SHQuaternion& q2, float t) noexcept;
[[nodiscard]] static SHQuaternion Rotate (const SHVec3& from, const SHVec3& to) noexcept; [[nodiscard]] static SHQuaternion Rotate (const SHVec3& from, const SHVec3& to) noexcept;
}; };
SHQuaternion operator*(float lhs, const SHQuaternion& rhs) noexcept; SHQuaternion operator*(float lhs, const SHQuaternion& rhs) noexcept;
} // namespace SHADE } // namespace SHADE

View File

@ -0,0 +1,70 @@
/****************************************************************************************
* \file SHTransform.cpp
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Implementation for a Transform.
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#include <SHpch.h>
// Primary Header
#include "SHTransform.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Static Data Member Definitions */
/*-----------------------------------------------------------------------------------*/
const SHTransform SHTransform::Identity { SHVec3::Zero, SHVec3::Zero, SHVec3::One };
/*-----------------------------------------------------------------------------------*/
/* Constructors & Destructor Definitions */
/*-----------------------------------------------------------------------------------*/
SHTransform::SHTransform() noexcept
: position { SHVec3::Zero }
, rotation { SHVec3::Zero }
, scale { SHVec3::One }
{}
SHTransform::SHTransform(const SHVec3& pos, const SHVec3& rot, const SHVec3& scl) noexcept
: position { pos }
, rotation { rot }
, scale { scl }
{}
/*-----------------------------------------------------------------------------------*/
/* Operator Overload Definitions */
/*-----------------------------------------------------------------------------------*/
bool SHTransform::operator==(const SHTransform& rhs) const noexcept
{
return !(position != rhs.position || rotation != rhs.rotation || scale != rhs.scale);
}
bool SHTransform::operator!=(const SHTransform& rhs) const noexcept
{
return (position != rhs.position || rotation != rhs.rotation || scale != rhs.scale);
}
/*-----------------------------------------------------------------------------------*/
/* Public Function Member Definitions */
/*-----------------------------------------------------------------------------------*/
const SHMatrix& SHTransform::ComputeTRS()
{
const SHMatrix T = SHMatrix::Translate(position);
const SHMatrix R = SHMatrix::Rotate(rotation);
const SHMatrix S = SHMatrix::Scale(scale);
trs = S * R * T;
return trs;
}
} // namespace SHADE

View File

@ -0,0 +1,67 @@
/****************************************************************************************
* \file SHTransform.h
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Interface for a Transform.
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#pragma once
// Project Headers
#include "SH_API.h"
#include "Math/SHMath.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Type Definitions */
/*-----------------------------------------------------------------------------------*/
struct SH_API SHTransform
{
public:
/*---------------------------------------------------------------------------------*/
/* Data Members */
/*---------------------------------------------------------------------------------*/
static const SHTransform Identity;
SHVec3 position;
SHVec3 rotation;
SHVec3 scale;
SHMatrix trs;
/*---------------------------------------------------------------------------------*/
/* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/
SHTransform (const SHTransform&) = default;
SHTransform (SHTransform&&) = default;
~SHTransform () = default;
SHTransform () noexcept;
SHTransform (const SHVec3& pos, const SHVec3& rot, const SHVec3& scl) noexcept;
/*---------------------------------------------------------------------------------*/
/* Operator Overloads */
/*---------------------------------------------------------------------------------*/
SHTransform& operator= (const SHTransform&) = default;
SHTransform& operator= (SHTransform&&) = default;
[[nodiscard]] bool operator==(const SHTransform& rhs) const noexcept;
[[nodiscard]] bool operator!=(const SHTransform& rhs) const noexcept;
/*---------------------------------------------------------------------------------*/
/* Function Members */
/*---------------------------------------------------------------------------------*/
const SHMatrix& ComputeTRS();
};
} // namespace SHADE

View File

@ -0,0 +1,184 @@
/****************************************************************************************
* \file SHTransformComponent.cpp
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Implementation for a Transform Component
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#include <SHpch.h>
// Primary Header
#include "SHTransformComponent.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Constructors & Destructor Definitions */
/*-----------------------------------------------------------------------------------*/
SHTransformComponent::SHTransformComponent() noexcept
: SHComponent {}
, dirty { true }
{}
SHTransformComponent::SHTransformComponent(const SHTransformComponent& rhs) noexcept
: SHComponent {}
, dirty { true }
, local { rhs.local }
, world { rhs.world }
{}
SHTransformComponent::SHTransformComponent(SHTransformComponent&& rhs) noexcept
: SHComponent {}
, dirty { true }
, local { std::move(rhs.local) }
, world { std::move(rhs.world) }
{}
/*-----------------------------------------------------------------------------------*/
/* Operator Overload Definitions */
/*-----------------------------------------------------------------------------------*/
SHTransformComponent& SHTransformComponent::operator=(const SHTransformComponent& rhs) noexcept
{
dirty = true;
local = rhs.local;
world = rhs.world;
return *this;
}
SHTransformComponent& SHTransformComponent::operator=(SHTransformComponent&& rhs) noexcept
{
dirty = true;
local = std::move(rhs.local);
world = std::move(rhs.world);
return *this;
}
/*-----------------------------------------------------------------------------------*/
/* Getter Function Definitions */
/*-----------------------------------------------------------------------------------*/
bool SHTransformComponent::HasChanged() const noexcept
{
return dirty;
}
const SHVec3& SHTransformComponent::GetLocalPosition() const noexcept
{
return local.position;
}
const SHVec3& SHTransformComponent::GetLocalRotation() const noexcept
{
return local.rotation;
}
const SHVec3& SHTransformComponent::GetLocalScale() const noexcept
{
return local.scale;
}
const SHVec3& SHTransformComponent::GetWorldPosition() const noexcept
{
return world.position;
}
const SHVec3& SHTransformComponent::GetWorldRotation() const noexcept
{
return world.rotation;
}
const SHVec3& SHTransformComponent::GetWorldScale() const noexcept
{
return world.scale;
}
const SHMatrix& SHTransformComponent::GetLocalToWorld() const noexcept
{
return local.trs;
}
SHMatrix SHTransformComponent::GetWorldToLocal() const noexcept
{
return SHMatrix::Inverse(local.trs);
}
const SHMatrix& SHTransformComponent::GetTRS() const noexcept
{
return world.trs;
}
/*-----------------------------------------------------------------------------------*/
/* Setter Function Definitions */
/*-----------------------------------------------------------------------------------*/
void SHTransformComponent::SetLocalPosition(const SHVec3& newLocalPosition) noexcept
{
dirty = true;
local.position = newLocalPosition;
}
void SHTransformComponent::SetLocalRotation(const SHVec3& newLocalRotation) noexcept
{
dirty = true;
local.rotation = newLocalRotation;
}
void SHTransformComponent::SetLocalRotation(float pitch, float yaw, float roll) noexcept
{
dirty = true;
local.rotation.x = pitch;
local.rotation.y = yaw;
local.rotation.z = roll;
}
void SHTransformComponent::SetLocalScale(const SHVec3& newLocalScale) noexcept
{
dirty = true;
local.scale = newLocalScale;
}
void SHTransformComponent::SetWorldPosition(const SHVec3& newWorldPosition) noexcept
{
dirty = true;
world.position = newWorldPosition;
updateQueue.push({ UpdateCommandType::WORLD_POSITION, newWorldPosition });
}
void SHTransformComponent::SetWorldRotation(const SHVec3& newWorldRotation) noexcept
{
dirty = true;
world.rotation = newWorldRotation;
updateQueue.push({ UpdateCommandType::WORLD_ROTATION, newWorldRotation });
}
void SHTransformComponent::SetWorldRotation(float pitch, float yaw, float roll) noexcept
{
dirty = true;
world.rotation.x = pitch;
world.rotation.y = yaw;
world.rotation.z = roll;
updateQueue.push({ UpdateCommandType::WORLD_ROTATION, SHVec3{ pitch, yaw, roll} });
}
void SHTransformComponent::SetWorldScale(const SHVec3& newWorldScale) noexcept
{
dirty = true;
world.scale = newWorldScale;
updateQueue.push({ UpdateCommandType::WORLD_SCALE, newWorldScale });
}
} // namespace SHADE

View File

@ -0,0 +1,122 @@
/****************************************************************************************
* \file SHTransformComponent.h
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Interface for a Transform Component
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#pragma once
#include <queue>
// Project Headers
#include "SH_API.h"
#include "ECS_Base/Components/SHComponent.h"
#include "SHTransform.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Type Definitions */
/*-----------------------------------------------------------------------------------*/
class SH_API SHTransformComponent : public SHComponent
{
private:
/*---------------------------------------------------------------------------------*/
/* Friends */
/*---------------------------------------------------------------------------------*/
friend class SHTransformSystem;
public:
/*---------------------------------------------------------------------------------*/
/* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/
~SHTransformComponent () override = default;
SHTransformComponent () noexcept;
SHTransformComponent (const SHTransformComponent& rhs) noexcept;
SHTransformComponent (SHTransformComponent&& rhs) noexcept;
/*---------------------------------------------------------------------------------*/
/* Operator Overloads */
/*---------------------------------------------------------------------------------*/
SHTransformComponent& operator=(const SHTransformComponent& rhs) noexcept;
SHTransformComponent& operator=(SHTransformComponent&& rhs) noexcept;
/*---------------------------------------------------------------------------------*/
/* Getter Functions */
/*---------------------------------------------------------------------------------*/
[[nodiscard]] bool HasChanged () const noexcept;
[[nodiscard]] const SHVec3& GetLocalPosition () const noexcept;
[[nodiscard]] const SHVec3& GetLocalRotation () const noexcept;
[[nodiscard]] const SHVec3& GetLocalScale () const noexcept;
[[nodiscard]] const SHVec3& GetWorldPosition () const noexcept;
[[nodiscard]] const SHVec3& GetWorldRotation () const noexcept;
[[nodiscard]] const SHVec3& GetWorldScale () const noexcept;
[[nodiscard]] const SHMatrix& GetLocalToWorld () const noexcept;
[[nodiscard]] SHMatrix GetWorldToLocal () const noexcept;
[[nodiscard]] const SHMatrix& GetTRS () const noexcept;
/*---------------------------------------------------------------------------------*/
/* Setter Functions */
/*---------------------------------------------------------------------------------*/
void SetLocalPosition (const SHVec3& newLocalPosition) noexcept;
void SetLocalRotation (const SHVec3& newLocalRotation) noexcept;
void SetLocalRotation (float pitch, float yaw, float roll) noexcept;
void SetLocalScale (const SHVec3& newLocalScale) noexcept;
void SetWorldPosition (const SHVec3& newWorldPosition) noexcept;
void SetWorldRotation (const SHVec3& newWorldRotation) noexcept;
void SetWorldRotation (float pitch, float yaw, float roll) noexcept;
void SetWorldScale (const SHVec3& newWorldScale) noexcept;
private:
/*---------------------------------------------------------------------------------*/
/* Type Definitions */
/*---------------------------------------------------------------------------------*/
enum class UpdateCommandType
{
WORLD_POSITION
, WORLD_ROTATION
, WORLD_SCALE
};
struct UpdateCommand
{
public:
/*-------------------------------------------------------------------------------*/
/* Data Members */
/*-------------------------------------------------------------------------------*/
UpdateCommandType type;
SHVec3 data;
};
using UpdateQueue = std::queue<UpdateCommand>;
/*---------------------------------------------------------------------------------*/
/* Data Members */
/*---------------------------------------------------------------------------------*/
bool dirty;
SHTransform local; // Local TRS holds Local To World Transform
SHTransform world;
UpdateQueue updateQueue;
};
} // namespace SHADE

View File

@ -0,0 +1,139 @@
/****************************************************************************************
* \file SHTransformSystem.cpp
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Implementation for the Transform System
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#include <SHpch.h>
// Primary Header
#include "SHTransformSystem.h"
// Project Headers
#include "Scene/SHSceneManager.h"
#include "ECS_Base/Managers/SHComponentManager.h"
#include "ECS_Base/Managers/SHEntityManager.h"
#include "Tools/SHException.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Constructors & Destructor Definitions */
/*-----------------------------------------------------------------------------------*/
SHTransformSystem::SHTransformSystem()
: SHSystemRoutine { "Transform Routine", false }
{}
/*-----------------------------------------------------------------------------------*/
/* Public Function Member Definitions */
/*-----------------------------------------------------------------------------------*/
void SHTransformSystem::Execute(double dt) noexcept
{
// Get the current scene graph to traverse and update
const auto& SCENE_GRAPH = SHSceneManager::GetCurrentSceneGraph();
UpdateEntity(SCENE_GRAPH.GetRoot());
}
/*-----------------------------------------------------------------------------------*/
/* Private Function Member Definitions */
/*-----------------------------------------------------------------------------------*/
void SHTransformSystem::UpdateEntity(const SHSceneNode* node)
{
const auto* NODE_TRANSFORM = SHComponentManager::GetComponent_s<SHTransformComponent>(node->GetEntityID());
const bool HAS_PARENT_CHANGED = NODE_TRANSFORM && NODE_TRANSFORM->dirty;
for (const auto* child : node->GetChildren())
{
// Active states of entities should sync with scene nodes
const bool IS_NODE_ACTIVE = child->isActive;
#ifdef _DEBUG
const bool IS_ENTITY_ACTIVE = SHEntityManager::GetEntityByID(child->GetEntityID())->GetActive();
SHASSERT(IS_NODE_ACTIVE == IS_ENTITY_ACTIVE, "Entity and Node active states are not synced!")
#endif
if (!IS_NODE_ACTIVE)
{
UpdateEntity(child);
continue;
}
const bool HAS_TRANSFORM = SHComponentManager::HasComponent<SHTransformComponent>(child->GetEntityID());
if (!HAS_TRANSFORM)
continue;
auto* childTransform = SHComponentManager::GetComponent<SHTransformComponent>(child->GetEntityID());
if (childTransform->dirty || HAS_PARENT_CHANGED)
UpdateTransform(*childTransform, NODE_TRANSFORM);
UpdateEntity(child);
// Clear dirty flag after all children are updated
childTransform->dirty = false;
}
}
void SHTransformSystem::UpdateTransform(SHTransformComponent& tf, const SHTransformComponent* parent)
{
SHMatrix localToWorld = SHMatrix::Identity;
SHMatrix worldToLocal = SHMatrix::Identity;
if (parent)
{
localToWorld = parent->GetTRS();
worldToLocal = SHMatrix::Inverse(tf.local.trs);
}
while (!tf.updateQueue.empty())
{
const auto& UPDATE_COMMAND = tf.updateQueue.front();
switch (UPDATE_COMMAND.type)
{
case SHTransformComponent::UpdateCommandType::WORLD_POSITION:
{
tf.local.position = SHVec3::Transform(UPDATE_COMMAND.data, worldToLocal);
break;
}
case SHTransformComponent::UpdateCommandType::WORLD_ROTATION:
{
tf.local.rotation = tf.world.rotation;
if (parent)
tf.local.rotation -= parent->GetLocalRotation();
break;
}
case SHTransformComponent::UpdateCommandType::WORLD_SCALE:
{
tf.local.scale = tf.world.scale;
if (parent)
tf.local.scale /= parent->GetLocalScale();
break;
}
// Redundant
default: break;
}
tf.updateQueue.pop();
}
tf.local.trs = localToWorld;
tf.world.position = SHVec3::Transform(tf.local.position, localToWorld);
tf.world.rotation = tf.local.rotation + (parent ? parent->GetLocalRotation() : SHVec3::Zero);
tf.world.scale = tf.local.scale * (parent ? parent->GetLocalScale() : SHVec3::One);
tf.world.ComputeTRS();
}
} // namespace SHADE

View File

@ -0,0 +1,61 @@
/****************************************************************************************
* \file SHTransformSystem.h
* \author Diren D Bharwani, diren.dbharwani, 390002520
* \brief Interface for the Transform System
*
* \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or
* disclosure of this file or its contents without the prior written consent
* of DigiPen Institute of Technology is prohibited.
****************************************************************************************/
#pragma once
// Project Headers
#include "SHTransformComponent.h"
#include "Scene/SHSceneGraph.h"
#include "ECS_Base/System/SHSystemRoutine.h"
namespace SHADE
{
/*-----------------------------------------------------------------------------------*/
/* Type Definitions */
/*-----------------------------------------------------------------------------------*/
class SH_API SHTransformSystem : public SHSystemRoutine
{
public:
/*---------------------------------------------------------------------------------*/
/* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/
SHTransformSystem ();
~SHTransformSystem () = default;
SHTransformSystem (const SHTransformSystem&) = delete;
SHTransformSystem (SHTransformSystem&&) = delete;
/*---------------------------------------------------------------------------------*/
/* Operator Overloads */
/*---------------------------------------------------------------------------------*/
SHTransformSystem& operator= (const SHTransformSystem&) = delete;
SHTransformSystem& operator= (SHTransformSystem&&) = delete;
/*---------------------------------------------------------------------------------*/
/* Function Members */
/*---------------------------------------------------------------------------------*/
void Execute(double dt) noexcept override;
private:
/*---------------------------------------------------------------------------------*/
/* Function Members */
/*---------------------------------------------------------------------------------*/
static void UpdateEntity (const SHSceneNode* node);
static void UpdateTransform(SHTransformComponent& tf, const SHTransformComponent* parent = nullptr);
};
} // namespace SHADE

View File

@ -38,6 +38,10 @@ namespace SHADE
: XMFLOAT2( 0.0f, 0.0f ) : XMFLOAT2( 0.0f, 0.0f )
{} {}
SHVec2::SHVec2(float n) noexcept
: XMFLOAT2( n, n )
{}
SHVec2::SHVec2(float _x, float _y) noexcept SHVec2::SHVec2(float _x, float _y) noexcept
: XMFLOAT2( _x, _y ) : XMFLOAT2( _x, _y )
{} {}

View File

@ -14,6 +14,9 @@
#include <string> #include <string>
#include <initializer_list> #include <initializer_list>
// Project Headers
#include "SH_API.h"
namespace SHADE namespace SHADE
{ {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -25,7 +28,7 @@ namespace SHADE
/* Type Definitions */ /* Type Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHVec2 : public DirectX::XMFLOAT2 class SH_API SHVec2 : public DirectX::XMFLOAT2
{ {
public: public:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -45,53 +48,54 @@ namespace SHADE
/* Constructors & Destructor */ /* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHVec2 (const SHVec2& rhs) = default; SHVec2 (const SHVec2& rhs) = default;
SHVec2 (SHVec2&& rhs) = default; SHVec2 (SHVec2&& rhs) = default;
~SHVec2 () = default; ~SHVec2 () = default;
SHVec2 () noexcept; SHVec2 () noexcept;
SHVec2 (float x, float y) noexcept; SHVec2 (float n) noexcept;
SHVec2 (float x, float y) noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Operator Overloads */ /* Operator Overloads */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] SHVec2& operator= (const SHVec2& rhs) = default; SHVec2& operator= (const SHVec2& rhs) = default;
[[nodiscard]] SHVec2& operator= (SHVec2&& rhs) = default; SHVec2& operator= (SHVec2&& rhs) = default;
[[nodiscard]] SHVec2& operator+= (const SHVec2& rhs) noexcept; SHVec2& operator+= (const SHVec2& rhs) noexcept;
[[nodiscard]] SHVec2& operator-= (const SHVec2& rhs) noexcept; SHVec2& operator-= (const SHVec2& rhs) noexcept;
[[nodiscard]] SHVec2& operator*= (const SHVec2& rhs) noexcept; SHVec2& operator*= (const SHVec2& rhs) noexcept;
[[nodiscard]] SHVec2& operator*= (float rhs) noexcept; SHVec2& operator*= (float rhs) noexcept;
[[nodiscard]] SHVec2& operator/= (const SHVec2& rhs) noexcept; SHVec2& operator/= (const SHVec2& rhs) noexcept;
[[nodiscard]] SHVec2& operator/= (float rhs) noexcept; SHVec2& operator/= (float rhs) noexcept;
[[nodiscard]] SHVec2 operator+ (const SHVec2& rhs) const noexcept; [[nodiscard]] SHVec2 operator+ (const SHVec2& rhs) const noexcept;
[[nodiscard]] SHVec2 operator- (const SHVec2& rhs) const noexcept; [[nodiscard]] SHVec2 operator- (const SHVec2& rhs) const noexcept;
[[nodiscard]] SHVec2 operator- () const noexcept; [[nodiscard]] SHVec2 operator- () const noexcept;
[[nodiscard]] SHVec2 operator* (const SHVec2& rhs) const noexcept; [[nodiscard]] SHVec2 operator* (const SHVec2& rhs) const noexcept;
[[nodiscard]] SHVec2 operator* (float rhs) const noexcept; [[nodiscard]] SHVec2 operator* (float rhs) const noexcept;
[[nodiscard]] SHVec2 operator/ (const SHVec2& rhs) const noexcept; [[nodiscard]] SHVec2 operator/ (const SHVec2& rhs) const noexcept;
[[nodiscard]] SHVec2 operator/ (float rhs) const noexcept; [[nodiscard]] SHVec2 operator/ (float rhs) const noexcept;
[[nodiscard]] bool operator== (const SHVec2& rhs) const noexcept; [[nodiscard]] bool operator== (const SHVec2& rhs) const noexcept;
[[nodiscard]] bool operator!= (const SHVec2& rhs) const noexcept; [[nodiscard]] bool operator!= (const SHVec2& rhs) const noexcept;
[[nodiscard]] float operator[] (int index); [[nodiscard]] float operator[] (int index);
[[nodiscard]] float operator[] (size_t index); [[nodiscard]] float operator[] (size_t index);
[[nodiscard]] float operator[] (int index) const; [[nodiscard]] float operator[] (int index) const;
[[nodiscard]] float operator[] (size_t index) const; [[nodiscard]] float operator[] (size_t index) const;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] float Length () const noexcept; [[nodiscard]] float Length () const noexcept;
[[nodiscard]] float LengthSquared () const noexcept; [[nodiscard]] float LengthSquared () const noexcept;
[[nodiscard]] std::string ToString () const noexcept; [[nodiscard]] std::string ToString () const noexcept;
[[nodiscard]] float Dot (const SHVec2& rhs) const noexcept; [[nodiscard]] float Dot (const SHVec2& rhs) const noexcept;
[[nodiscard]] SHVec2 Cross (const SHVec2& rhs) const noexcept; [[nodiscard]] SHVec2 Cross (const SHVec2& rhs) const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Static Function Members */ /* Static Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -117,6 +121,6 @@ namespace SHADE
[[nodiscard]] static float Cross (const SHVec2& lhs, const SHVec2& rhs) noexcept; [[nodiscard]] static float Cross (const SHVec2& lhs, const SHVec2& rhs) noexcept;
}; };
SHVec2 operator* (float lhs, const SHVec2& rhs) noexcept; SHVec2 operator* (float lhs, const SHVec2& rhs) noexcept;
} // namespace SHADE } // namespace SHADE

View File

@ -43,6 +43,10 @@ namespace SHADE
: XMFLOAT3( 0.0f, 0.0f, 0.0f ) : XMFLOAT3( 0.0f, 0.0f, 0.0f )
{} {}
SHVec3::SHVec3(float n) noexcept
: XMFLOAT3( n, n, n )
{}
SHVec3::SHVec3(float _x, float _y, float _z) noexcept SHVec3::SHVec3(float _x, float _y, float _z) noexcept
: XMFLOAT3( _x, _y, _z ) : XMFLOAT3( _x, _y, _z )
{} {}

View File

@ -14,6 +14,9 @@
#include <string> #include <string>
#include <initializer_list> #include <initializer_list>
// Project Headers
#include "SH_API.h"
namespace SHADE namespace SHADE
{ {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -25,7 +28,7 @@ namespace SHADE
/* Type Definitions */ /* Type Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHVec3 : public DirectX::XMFLOAT3 class SH_API SHVec3 : public DirectX::XMFLOAT3
{ {
public: public:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -50,62 +53,63 @@ namespace SHADE
/* Constructors & Destructor */ /* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHVec3 (const SHVec3& rhs) = default; SHVec3 (const SHVec3& rhs) = default;
SHVec3 (SHVec3&& rhs) = default; SHVec3 (SHVec3&& rhs) = default;
~SHVec3 () = default; ~SHVec3 () = default;
SHVec3 () noexcept; SHVec3 () noexcept;
SHVec3 (float x, float y, float z) noexcept; SHVec3 (float n) noexcept;
SHVec3 (float x, float y, float z) noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Operator Overloads */ /* Operator Overloads */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] SHVec3& operator= (const SHVec3& rhs) = default; SHVec3& operator= (const SHVec3& rhs) = default;
[[nodiscard]] SHVec3& operator= (SHVec3&& rhs) = default; SHVec3& operator= (SHVec3&& rhs) = default;
[[nodiscard]] SHVec3& operator+= (const SHVec3& rhs) noexcept; SHVec3& operator+= (const SHVec3& rhs) noexcept;
[[nodiscard]] SHVec3& operator-= (const SHVec3& rhs) noexcept; SHVec3& operator-= (const SHVec3& rhs) noexcept;
[[nodiscard]] SHVec3& operator*= (const SHVec3& rhs) noexcept; SHVec3& operator*= (const SHVec3& rhs) noexcept;
[[nodiscard]] SHVec3& operator*= (float rhs) noexcept; SHVec3& operator*= (float rhs) noexcept;
[[nodiscard]] SHVec3& operator/= (const SHVec3& rhs) noexcept; SHVec3& operator/= (const SHVec3& rhs) noexcept;
[[nodiscard]] SHVec3& operator/= (float rhs) noexcept; SHVec3& operator/= (float rhs) noexcept;
[[nodiscard]] SHVec3 operator+ (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 operator+ (const SHVec3& rhs) const noexcept;
[[nodiscard]] SHVec3 operator- (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 operator- (const SHVec3& rhs) const noexcept;
[[nodiscard]] SHVec3 operator- () const noexcept; [[nodiscard]] SHVec3 operator- () const noexcept;
[[nodiscard]] SHVec3 operator* (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 operator* (const SHVec3& rhs) const noexcept;
[[nodiscard]] SHVec3 operator* (float rhs) const noexcept; [[nodiscard]] SHVec3 operator* (float rhs) const noexcept;
[[nodiscard]] SHVec3 operator/ (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 operator/ (const SHVec3& rhs) const noexcept;
[[nodiscard]] SHVec3 operator/ (float rhs) const noexcept; [[nodiscard]] SHVec3 operator/ (float rhs) const noexcept;
[[nodiscard]] bool operator== (const SHVec3& rhs) const noexcept; [[nodiscard]] bool operator== (const SHVec3& rhs) const noexcept;
[[nodiscard]] bool operator!= (const SHVec3& rhs) const noexcept; [[nodiscard]] bool operator!= (const SHVec3& rhs) const noexcept;
[[nodiscard]] float operator[] (int index); [[nodiscard]] float operator[] (int index);
[[nodiscard]] float operator[] (size_t index); [[nodiscard]] float operator[] (size_t index);
[[nodiscard]] float operator[] (int index) const; [[nodiscard]] float operator[] (int index) const;
[[nodiscard]] float operator[] (size_t index) const; [[nodiscard]] float operator[] (size_t index) const;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] float Length () const noexcept; [[nodiscard]] float Length () const noexcept;
[[nodiscard]] float LengthSquared () const noexcept; [[nodiscard]] float LengthSquared () const noexcept;
[[nodiscard]] std::string ToString () const noexcept; [[nodiscard]] std::string ToString () const noexcept;
[[nodiscard]] float Dot (const SHVec3& rhs) const noexcept; [[nodiscard]] float Dot (const SHVec3& rhs) const noexcept;
[[nodiscard]] SHVec3 Cross (const SHVec3& rhs) const noexcept; [[nodiscard]] SHVec3 Cross (const SHVec3& rhs) const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Static Function Members */ /* Static Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] static SHVec3 Normalise (const SHVec3& v) noexcept; [[nodiscard]] static SHVec3 Normalise (const SHVec3& v) noexcept;
[[nodiscard]] static SHVec3 Abs (const SHVec3& v) noexcept; [[nodiscard]] static SHVec3 Abs (const SHVec3& v) noexcept;
[[nodiscard]] static SHVec3 Min (const std::initializer_list<SHVec3>& vs) noexcept; [[nodiscard]] static SHVec3 Min (const std::initializer_list<SHVec3>& vs) noexcept;
[[nodiscard]] static SHVec3 Max (const std::initializer_list<SHVec3>& vs) noexcept; [[nodiscard]] static SHVec3 Max (const std::initializer_list<SHVec3>& vs) noexcept;
[[nodiscard]] static SHVec3 Clamp (const SHVec3& v, const SHVec3& vMin, const SHVec3& vMax) noexcept; [[nodiscard]] static SHVec3 Clamp (const SHVec3& v, const SHVec3& vMin, const SHVec3& vMax) noexcept;
[[nodiscard]] static SHVec3 Lerp (const SHVec3& a, const SHVec3& b, float t) noexcept; [[nodiscard]] static SHVec3 Lerp (const SHVec3& a, const SHVec3& b, float t) noexcept;
[[nodiscard]] static SHVec3 ClampedLerp (const SHVec3& a, const SHVec3& b, float t, float tMin = 0.0f, float tMax = 1.0f) noexcept; [[nodiscard]] static SHVec3 ClampedLerp (const SHVec3& a, const SHVec3& b, float t, float tMin = 0.0f, float tMax = 1.0f) noexcept;
@ -124,6 +128,6 @@ namespace SHADE
[[nodiscard]] static SHVec3 Transform (const SHVec3& v, const SHMatrix& transformMtx) noexcept; [[nodiscard]] static SHVec3 Transform (const SHVec3& v, const SHMatrix& transformMtx) noexcept;
}; };
SHVec3 operator* (float lhs, const SHVec3& rhs) noexcept; SHVec3 operator* (float lhs, const SHVec3& rhs) noexcept;
} // namespace SHADE } // namespace SHADE

View File

@ -14,6 +14,9 @@
#include <string> #include <string>
#include <initializer_list> #include <initializer_list>
// Project Headers
#include "SH_API.h"
namespace SHADE namespace SHADE
{ {
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
@ -25,7 +28,7 @@ namespace SHADE
/* Type Definitions */ /* Type Definitions */
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
class SHVec4 : public DirectX::XMFLOAT4 class SH_API SHVec4 : public DirectX::XMFLOAT4
{ {
public: public:
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
@ -45,57 +48,57 @@ namespace SHADE
/* Constructors & Destructor */ /* Constructors & Destructor */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
SHVec4 (const SHVec4& rhs) = default; SHVec4 (const SHVec4& rhs) = default;
SHVec4 (SHVec4&& rhs) = default; SHVec4 (SHVec4&& rhs) = default;
~SHVec4 () = default; ~SHVec4 () = default;
SHVec4 () noexcept; SHVec4 () noexcept;
SHVec4 (float x, float y, float z, float w) noexcept; SHVec4 (float x, float y, float z, float w) noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Operator Overloads */ /* Operator Overloads */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] SHVec4& operator= (const SHVec4& rhs) = default; SHVec4& operator= (const SHVec4& rhs) = default;
[[nodiscard]] SHVec4& operator= (SHVec4&& rhs) = default; SHVec4& operator= (SHVec4&& rhs) = default;
[[nodiscard]] SHVec4& operator+= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4& operator-= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4& operator*= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4& operator*= (float rhs) noexcept;
[[nodiscard]] SHVec4& operator/= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4& operator/= (float rhs) noexcept;
[[nodiscard]] SHVec4 operator+ (const SHVec4& rhs) const noexcept; SHVec4& operator+= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4 operator- (const SHVec4& rhs) const noexcept; SHVec4& operator-= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4 operator- () const noexcept; SHVec4& operator*= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4 operator* (const SHVec4& rhs) const noexcept; SHVec4& operator*= (float rhs) noexcept;
[[nodiscard]] SHVec4 operator* (float rhs) const noexcept; SHVec4& operator/= (const SHVec4& rhs) noexcept;
[[nodiscard]] SHVec4 operator/ (const SHVec4& rhs) const noexcept; SHVec4& operator/= (float rhs) noexcept;
[[nodiscard]] SHVec4 operator/ (float rhs) const noexcept;
[[nodiscard]] bool operator== (const SHVec4& rhs) const noexcept; [[nodiscard]] SHVec4 operator+ (const SHVec4& rhs) const noexcept;
[[nodiscard]] bool operator!= (const SHVec4& rhs) const noexcept; [[nodiscard]] SHVec4 operator- (const SHVec4& rhs) const noexcept;
[[nodiscard]] SHVec4 operator- () const noexcept;
[[nodiscard]] SHVec4 operator* (const SHVec4& rhs) const noexcept;
[[nodiscard]] SHVec4 operator* (float rhs) const noexcept;
[[nodiscard]] SHVec4 operator/ (const SHVec4& rhs) const noexcept;
[[nodiscard]] SHVec4 operator/ (float rhs) const noexcept;
[[nodiscard]] float operator[] (int index); [[nodiscard]] bool operator== (const SHVec4& rhs) const noexcept;
[[nodiscard]] float operator[] (size_t index); [[nodiscard]] bool operator!= (const SHVec4& rhs) const noexcept;
[[nodiscard]] float operator[] (int index) const;
[[nodiscard]] float operator[] (size_t index) const; [[nodiscard]] float operator[] (int index);
[[nodiscard]] float operator[] (size_t index);
[[nodiscard]] float operator[] (int index) const;
[[nodiscard]] float operator[] (size_t index) const;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] float Length () const noexcept; [[nodiscard]] float Length () const noexcept;
[[nodiscard]] float Length3D () const noexcept; [[nodiscard]] float Length3D () const noexcept;
[[nodiscard]] float LengthSquared () const noexcept; [[nodiscard]] float LengthSquared () const noexcept;
[[nodiscard]] float LengthSquared3D () const noexcept; [[nodiscard]] float LengthSquared3D () const noexcept;
[[nodiscard]] std::string ToString () const noexcept; [[nodiscard]] std::string ToString () const noexcept;
[[nodiscard]] float Dot (const SHVec4& rhs) const noexcept; [[nodiscard]] float Dot (const SHVec4& rhs) const noexcept;
[[nodiscard]] float Dot3D (const SHVec4& rhs) const noexcept; [[nodiscard]] float Dot3D (const SHVec4& rhs) const noexcept;
[[nodiscard]] SHVec4 Cross3D (const SHVec4& rhs) const noexcept; [[nodiscard]] SHVec4 Cross3D (const SHVec4& rhs) const noexcept;
[[nodiscard]] SHVec4 Cross (const SHVec4& v1, const SHVec4& v2) const noexcept; [[nodiscard]] SHVec4 Cross (const SHVec4& v1, const SHVec4& v2) const noexcept;
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Static Function Members */ /* Static Function Members */
@ -128,6 +131,6 @@ namespace SHADE
}; };
SHVec4 operator* (float lhs, const SHVec4& rhs) noexcept; SHVec4 operator* (float lhs, const SHVec4& rhs) noexcept;
} // namespace SHADE } // namespace SHADE

View File

@ -9,7 +9,10 @@
#pragma once #pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#define NOMINMAX
// Windows Header Files // Windows Header Files
#include <Windows.h> #include <Windows.h>
// C RunTime Header Files // C RunTime Header Files
@ -34,3 +37,4 @@
#include <span> #include <span>
#include "Common/SHCommonTypes.h" #include "Common/SHCommonTypes.h"
#include "Tools/SHLogger.h"

View File

@ -13,11 +13,15 @@
#define SH_SCENE_MANAGER_H #define SH_SCENE_MANAGER_H
#include "ECS_Base/General/SHFamily.h"
#include "SHScene.h" #include "SHScene.h"
#include <functional> #include <functional>
#include "SH_API.h" #include "SH_API.h"
//Project Headers
#include "SH_API.h"
#include "ECS_Base/General/SHFamily.h"
namespace SHADE namespace SHADE
{ {

View File

@ -74,33 +74,33 @@ namespace SHADE
/* Getter Functions */ /* Getter Functions */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
[[nodiscard]] static const std::string& GetTrivialPattern () noexcept { return trivialPattern; } [[nodiscard]] static const std::string& GetTrivialPattern () noexcept { return trivialPattern; }
[[nodiscard]] static const std::string& GetVerbosePattern () noexcept { return verbosePattern; } [[nodiscard]] static const std::string& GetVerbosePattern () noexcept { return verbosePattern; }
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Setter Functions */ /* Setter Functions */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
static void SetTrivialPattern (const std::string& pattern) noexcept { trivialPattern = pattern; } static void SetTrivialPattern (const std::string& pattern) noexcept { trivialPattern = pattern; }
static void SetVerbosePattern (const std::string& pattern) noexcept { verbosePattern = pattern; } static void SetVerbosePattern (const std::string& pattern) noexcept { verbosePattern = pattern; }
static void SetConfig (const Config& config) noexcept; static void SetConfig (const Config& config) noexcept;
static void SetShowTime (bool showTime) noexcept; static void SetShowTime (bool showTime) noexcept;
static void SetShowDate (bool showDate) noexcept; static void SetShowDate (bool showDate) noexcept;
static void SetShowFunctionFileName (bool showFunctionFileName) noexcept; static void SetShowFunctionFileName (bool showFunctionFileName) noexcept;
static void SetShowFunctionLineNumber (bool showFunctionLineNumber) noexcept; static void SetShowFunctionLineNumber (bool showFunctionLineNumber) noexcept;
static void SetClockFormat (ClockFormat newClockFormat) noexcept; static void SetClockFormat (ClockFormat newClockFormat) noexcept;
static void SetDateFormat (DateFormat newDateFormat) noexcept; static void SetDateFormat (DateFormat newDateFormat) noexcept;
static void SetFileName (const std::string& logFileName) noexcept; static void SetFileName (const std::string& logFileName) noexcept;
static void SetDirectoryPath (const std::filesystem::path& logDirectoryPath) noexcept; static void SetDirectoryPath (const std::filesystem::path& logDirectoryPath) noexcept;
static void SetFlushTime (int seconds) noexcept; static void SetFlushTime (int seconds) noexcept;
static void SetFlushTime (size_t seconds) noexcept { spdlog::flush_every(std::chrono::seconds(seconds)); } static void SetFlushTime (size_t seconds) noexcept { spdlog::flush_every(std::chrono::seconds(seconds)); }
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* Function Members */ /* Function Members */