Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PhysX integration #27

Merged
merged 34 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a74f8f2
Added IPhysics and PhysXEngine setup
AtlantiaKing Oct 29, 2023
abc9bc7
Added physX scene wrapper
AtlantiaKing Oct 29, 2023
165d261
Added boxcollider & rigidbody
AtlantiaKing Oct 30, 2023
8ca1fb2
Added sphere collider
AtlantiaKing Oct 30, 2023
228cf44
Added SetRadius and SetSize to shapes
AtlantiaKing Oct 30, 2023
903efc5
Rigidbody now groups together with child colliders
AtlantiaKing Oct 30, 2023
c0030de
Added COM calculations
AtlantiaKing Oct 31, 2023
b5a98f7
Fixed mass calculations and added SetMass function
AtlantiaKing Oct 31, 2023
9792560
Fixed COM being calculated before shapes are applied to an object
AtlantiaKing Oct 31, 2023
10dbc83
Fixed wrong quaterion/euler calculations in transform
AtlantiaKing Oct 31, 2023
f2a27dd
Fixed camera rotation not working when looking in certain directions
AtlantiaKing Oct 31, 2023
e497444
Added Quaternion class with helper functions
AtlantiaKing Nov 1, 2023
ad4346d
Added overloads for functions that take a glm::vec3
AtlantiaKing Nov 1, 2023
26dc466
Added VLD to game project & fixed memory leaks
AtlantiaKing Nov 1, 2023
f0fdbe2
Fixed transform/rigidbody issues + added more rigidbody functions and…
AtlantiaKing Nov 1, 2023
1afc55e
Added physics materials
AtlantiaKing Nov 1, 2023
c4b96aa
Added collision callbacks
AtlantiaKing Nov 2, 2023
b9c94a1
Added AddForce and AddTorque to the rigidbody component
AtlantiaKing Nov 3, 2023
fd9704a
Added SetTrigger function to colliders
AtlantiaKing Nov 4, 2023
5068658
Added more collision & trigger events
AtlantiaKing Nov 5, 2023
d1785f7
Finalized OnTrigger events
AtlantiaKing Nov 6, 2023
bdddb69
Added constraints to rigidbody
AtlantiaKing Nov 6, 2023
77b0fa4
SetSize/SetRadius on colliders can now be called during runtime
AtlantiaKing Nov 7, 2023
9540a6d
Applied code review feedback
AtlantiaKing Nov 9, 2023
2bb2b0b
Added SetAngularVelocity to Rigidbody component
AtlantiaKing Nov 9, 2023
ceeb372
Added get functions for Rigidbody component
AtlantiaKing Nov 10, 2023
23c63f5
Added debug rendering to physx
AtlantiaKing Nov 11, 2023
8c03996
Fixed typo (DrawTriangles should be called DrawLines)
AtlantiaKing Nov 12, 2023
be0a638
Moved OnCollision/OnTrigger callbacks to the component class
AtlantiaKing Nov 12, 2023
cb78c21
Deleted constructor for Quaternion class
AtlantiaKing Nov 12, 2023
610a727
Added clear method to the CustomMesh class
AtlantiaKing Nov 12, 2023
4c9feda
Applied code review feedback
AtlantiaKing Nov 12, 2023
118668e
Merge branch 'main' into Physics-integration
AtlantiaKing Nov 12, 2023
29d1cd7
Cleaned up Leap class
AtlantiaKing Nov 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 3rdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ add_subdirectory(GLM)
add_subdirectory(FMOD)
add_subdirectory(GLFW)
add_subdirectory(FX11)
add_subdirectory(DirectXTex)
add_subdirectory(DirectXTex)
add_subdirectory(VLD)
22 changes: 21 additions & 1 deletion 3rdParty/PhysX/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PhysX CMake
set(PHYSX_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(PHYSX_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE PATH "")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# DLLs
set(PHYSX_DLL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bin/debug/PhysX_64.dll" CACHE PATH "")
Expand All @@ -11,6 +11,16 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(PHYSX_COMMON_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXCommon_64.lib" CACHE PATH "")
set(PHYSX_COOKING_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXCooking_64.lib" CACHE PATH "")
set(PHYSX_FOUNDATION_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXFoundation_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVELAABB_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/LowLevelAABB_static_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVELDYNAMICS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/LowLevelDynamics_static_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVEL_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/LowLevel_static_64.lib" CACHE PATH "")
set(PHYSX_CHARACTERKINEMATIC_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXCharacterKinematic_static_64.lib" CACHE PATH "")
set(PHYSX_EXTENSIONS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXExtensions_static_64.lib" CACHE PATH "")
set(PHYSX_PVDSDK_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXPvdSDK_static_64.lib" CACHE PATH "")
set(PHYSX_TASK_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXTask_static_64.lib" CACHE PATH "")
set(PHYSX_VEHICLE_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/PhysXVehicle_static_64.lib" CACHE PATH "")
set(PHYSX_SCENEQUERY_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/SceneQuery_static_64.lib" CACHE PATH "")
set(PHYSX_SIMULATIONCONTROLLER_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/debug/SimulationController_static_64.lib" CACHE PATH "")
else()
# DLLs
set(PHYSX_DLL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/bin/release/PhysX_64.dll" CACHE PATH "")
Expand All @@ -22,5 +32,15 @@ else()
set(PHYSX_COMMON_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXCommon_64.lib" CACHE PATH "")
set(PHYSX_COOKING_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXCooking_64.lib" CACHE PATH "")
set(PHYSX_FOUNDATION_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXFoundation_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVELAABB_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/LowLevelAABB_static_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVELDYNAMICS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/LowLevelDynamics_static_64.lib" CACHE PATH "")
set(PHYSX_LOWLEVEL_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/LowLevel_static_64.lib" CACHE PATH "")
set(PHYSX_CHARACTERKINEMATIC_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXCharacterKinematic_static_64.lib" CACHE PATH "")
set(PHYSX_EXTENSIONS_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXExtensions_static_64.lib" CACHE PATH "")
set(PHYSX_PVDSDK_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXPvdSDK_static_64.lib" CACHE PATH "")
set(PHYSX_TASK_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXTask_static_64.lib" CACHE PATH "")
set(PHYSX_VEHICLE_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/PhysXVehicle_static_64.lib" CACHE PATH "")
set(PHYSX_SCENEQUERY_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/SceneQuery_static_64.lib" CACHE PATH "")
set(PHYSX_SIMULATIONCONTROLLER_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release/SimulationController_static_64.lib" CACHE PATH "")
endif()
message("Include dir: ${PHYSX_INCLUDE_DIR}")
5 changes: 5 additions & 0 deletions 3rdParty/VLD/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# VLD CMake
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(VLD_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE PATH "")
set(VLD_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/vld.lib" CACHE PATH "")
endif()
Loading