Skip to content

Commit

Permalink
added cdt, delaunaytest, and debugdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0L042 committed Jun 6, 2024
1 parent 7f97db5 commit 3893ebb
Show file tree
Hide file tree
Showing 707 changed files with 101,189 additions and 35 deletions.
9 changes: 6 additions & 3 deletions Duin/Duin.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<PrecompiledHeaderFile>dnpch.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>DN_PLATFORM_WINDOWS;DN_BUILD_DLL;IMGUI_IMPL_OPENGL_LOADER_GLAD;DN_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;vendor\cdt\CDT\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
Expand All @@ -104,7 +104,7 @@ IF EXIST ..\bin\Debug-windows-x86_64\Duin\Duin.dll\ (xcopy /Q /E /Y /I ..\bin\De
<PrecompiledHeaderFile>dnpch.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>DN_PLATFORM_WINDOWS;DN_BUILD_DLL;IMGUI_IMPL_OPENGL_LOADER_GLAD;DN_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;vendor\cdt\CDT\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
Expand Down Expand Up @@ -133,7 +133,7 @@ IF EXIST ..\bin\Release-windows-x86_64\Duin\Duin.dll\ (xcopy /Q /E /Y /I ..\bin\
<PrecompiledHeaderFile>dnpch.h</PrecompiledHeaderFile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>DN_PLATFORM_WINDOWS;DN_BUILD_DLL;IMGUI_IMPL_OPENGL_LOADER_GLAD;DN_DIST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>src;vendor\patches\include;vendor\spdlog\include;vendor\raylib5\include;vendor\raylib5\src;vendor\raylib-cpp\include;vendor\imgui;vendor\rlgui;vendor\entt\single_include;vendor\fmt\include;vendor\cdt\CDT\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
Expand All @@ -160,6 +160,7 @@ IF EXIST ..\bin\Dist-windows-x86_64\Duin\Duin.dll\ (xcopy /Q /E /Y /I ..\bin\Dis
<ClInclude Include="src\Duin.h" />
<ClInclude Include="src\Duin\Core\Application.h" />
<ClInclude Include="src\Duin\Core\Core.h" />
<ClInclude Include="src\Duin\Core\Debug\DebugDraw.h" />
<ClInclude Include="src\Duin\Core\Debug\Log.h" />
<ClInclude Include="src\Duin\Core\Debug\Profiler.h" />
<ClInclude Include="src\Duin\Core\Debug\Timer.h" />
Expand All @@ -176,6 +177,7 @@ IF EXIST ..\bin\Dist-windows-x86_64\Duin\Duin.dll\ (xcopy /Q /E /Y /I ..\bin\Dis
<ClInclude Include="src\Duin\Core\Maths\src\Vector3.h" />
<ClInclude Include="src\Duin\Core\Scene\SceneManager.h" />
<ClInclude Include="src\Duin\Core\Signal.h" />
<ClInclude Include="src\Duin\Core\Structures\Delaunay.h" />
<ClInclude Include="src\Duin\Core\Structures\QuadTree.h" />
<ClInclude Include="src\Duin\Core\Structures\RenderStructs.h" />
<ClInclude Include="src\Duin\Core\UUID.h" />
Expand All @@ -198,6 +200,7 @@ IF EXIST ..\bin\Dist-windows-x86_64\Duin\Duin.dll\ (xcopy /Q /E /Y /I ..\bin\Dis
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Duin\Core\Application.cpp" />
<ClCompile Include="src\Duin\Core\Debug\DebugDraw.cpp" />
<ClCompile Include="src\Duin\Core\Debug\Log.cpp" />
<ClCompile Include="src\Duin\Core\Debug\Profiler.cpp" />
<ClCompile Include="src\Duin\Core\Maths\DuinMaths.cpp" />
Expand Down
5 changes: 5 additions & 0 deletions Duin/Duin.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
<ClInclude Include="src\Duin\Core\Signal.h">
<Filter>Duin\Core</Filter>
</ClInclude>
<ClInclude Include="src\Duin\Core\Structures\Delaunay.h">
<Filter>Duin\Core\Structures</Filter>
</ClInclude>
<ClInclude Include="src\Duin\Core\Structures\QuadTree.h">
<Filter>Duin\Core\Structures</Filter>
</ClInclude>
Expand Down Expand Up @@ -155,6 +158,7 @@
<Filter>Duin\Object</Filter>
</ClInclude>
<ClInclude Include="src\dnpch.h" />
<ClInclude Include="src\Duin\Core\Debug\DebugDraw.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\Duin\Core\Application.cpp">
Expand Down Expand Up @@ -215,5 +219,6 @@
<Filter>Duin\Object</Filter>
</ClCompile>
<ClCompile Include="src\dnpch.cpp" />
<ClCompile Include="src\Duin\Core\Debug\DebugDraw.cpp" />
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions Duin/src/Duin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "Duin/Core/Debug/Log.h"
#include "Duin/Core/Debug/Profiler.h"
#include "Duin/Core/Debug/Timer.h"
#include "Duin/Core/Debug/DebugDraw.h"
#include "Duin/Core/Maths/DuinMaths.h"
#include "Duin/Core/Structures/RenderStructs.h"
#include "Duin/Core/Structures/QuadTree.h"
Expand Down
12 changes: 12 additions & 0 deletions Duin/src/Duin/Core/Debug/DebugDraw.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "dnpch.h"

#include "DebugDraw.h"

namespace Duin
{
void DebugDraw::DrawLine(int x1, int y1, int x2, int y2, Color color)
{
::Color rlColor = { color.r, color.g, color.b, color.a };
::DrawLine(x1, y1, x2, y2, rlColor);
}
}
15 changes: 15 additions & 0 deletions Duin/src/Duin/Core/Debug/DebugDraw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "Duin/Core/Core.h"
#include "Duin/Core/Structures/RenderStructs.h"

#include <RLImGuiComponent.h>

namespace Duin
{
class DUIN_API DebugDraw
{
public:
static void DrawLine(int x1, int y1, int x2, int y2, Color color);
};
}
16 changes: 16 additions & 0 deletions Duin/src/Duin/Core/Structures/Delaunay.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "Duin/Core/Core.h"

#include <CDT.hpp>

namespace Duin
{
class DUIN_API Delauney
{
public:

private:

};
}
52 changes: 52 additions & 0 deletions Duin/vendor/cdt/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# ================================
# Can be used when needed locally:
# ================================
SortIncludes: true
SortUsingDeclarations: true

AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializersBeforeComma: true
ColumnLimit: 80
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
DerivePointerAlignment: false
PointerAlignment: Left
IndentWidth: 4
Language: Cpp
NamespaceIndentation: None
SpaceBeforeParens: Never
SpacesBeforeTrailingComments: 1
Standard: Cpp03
UseTab: Never

# =====================
# Clang 5 new features:
# =====================
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum : true
AfterFunction : true
AfterNamespace : true
AfterStruct : true
AfterUnion : true
BeforeCatch : true
BeforeElse : true
IndentBraces : false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
BreakBeforeInheritanceComma: true
FixNamespaceComments: true
ReflowComments: true
86 changes: 86 additions & 0 deletions Duin/vendor/cdt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------

build/
cmake-build*/
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash

# qtcreator generated files
*.pro.user*

# xemacs temporary files
*.flc

# Vim temporary files
.*.swp

# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*

# MinGW generated files
*.Debug
*.Release

# Python byte code
*.pyc

# Binaries
# --------
*.dll
*.exe

# xcode
*.xcode*
# moc
moc_*.h

# CLion
*.idea*

# Visual code files
*.code-workspace
*.vscode
3 changes: 3 additions & 0 deletions Duin/vendor/cdt/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "CDT/tests/Catch2"]
path = CDT/tests/Catch2
url = https://github.com/catchorg/Catch2.git
4 changes: 4 additions & 0 deletions Duin/vendor/cdt/.mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
artem-ogre <[email protected]> <[email protected]>
artem-ogre <[email protected]> <[email protected]>
artem-ogre <[email protected]> <artem>
kalleakerblom <[email protected]> <[email protected]>
Loading

0 comments on commit 3893ebb

Please sign in to comment.