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

Fixed the TestbedApplication on case-sensitive systems, enable some warnings for g++ #10

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
214 changes: 112 additions & 102 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)

IF (CMAKE_BUILD_TYPE MATCHES "Debug")
IF (CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter")
ENDIF (CMAKE_COMPILER_IS_GNUCXX)
ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug")

# Where to build the library
SET(LIBRARY_OUTPUT_PATH "lib")

Expand All @@ -22,7 +28,7 @@ OPTION(PROFILING_ENABLED "Select this if you want to compile with enabled profil
OPTION(DOUBLE_PRECISION_ENABLED "Select this if you want to compile using double precision floating
values" OFF)
# Headers
INCLUDE_DIRECTORIES(src)
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include")

IF(PROFILING_ENABLED)
ADD_DEFINITIONS(-DIS_PROFILING_ACTIVE)
Expand All @@ -32,109 +38,113 @@ IF(DOUBLE_PRECISION_ENABLED)
ADD_DEFINITIONS(-DIS_DOUBLE_PRECISION_ENABLED)
ENDIF(DOUBLE_PRECISION_ENABLED)

SET(SRCDIR "${PROJECT_SOURCE_DIR}/src/reactphysics3d")
set(INCDIR "${PROJECT_SOURCE_DIR}/include/reactphysics3d")

# Source files
SET (REACTPHYSICS3D_SOURCES
"src/configuration.h"
"src/decimal.h"
"src/reactphysics3d.h"
"src/body/Body.h"
"src/body/Body.cpp"
"src/body/CollisionBody.h"
"src/body/CollisionBody.cpp"
"src/body/RigidBody.h"
"src/body/RigidBody.cpp"
"src/collision/broadphase/BroadPhaseAlgorithm.h"
"src/collision/broadphase/BroadPhaseAlgorithm.cpp"
"src/collision/broadphase/DynamicAABBTree.h"
"src/collision/broadphase/DynamicAABBTree.cpp"
"src/collision/narrowphase/EPA/EdgeEPA.h"
"src/collision/narrowphase/EPA/EdgeEPA.cpp"
"src/collision/narrowphase/EPA/EPAAlgorithm.h"
"src/collision/narrowphase/EPA/EPAAlgorithm.cpp"
"src/collision/narrowphase/EPA/TriangleEPA.h"
"src/collision/narrowphase/EPA/TriangleEPA.cpp"
"src/collision/narrowphase/EPA/TrianglesStore.h"
"src/collision/narrowphase/EPA/TrianglesStore.cpp"
"src/collision/narrowphase/GJK/Simplex.h"
"src/collision/narrowphase/GJK/Simplex.cpp"
"src/collision/narrowphase/GJK/GJKAlgorithm.h"
"src/collision/narrowphase/GJK/GJKAlgorithm.cpp"
"src/collision/narrowphase/NarrowPhaseAlgorithm.h"
"src/collision/narrowphase/NarrowPhaseAlgorithm.cpp"
"src/collision/narrowphase/SphereVsSphereAlgorithm.h"
"src/collision/narrowphase/SphereVsSphereAlgorithm.cpp"
"src/collision/shapes/AABB.h"
"src/collision/shapes/AABB.cpp"
"src/collision/shapes/BoxShape.h"
"src/collision/shapes/BoxShape.cpp"
"src/collision/shapes/CapsuleShape.h"
"src/collision/shapes/CapsuleShape.cpp"
"src/collision/shapes/CollisionShape.h"
"src/collision/shapes/CollisionShape.cpp"
"src/collision/shapes/ConeShape.h"
"src/collision/shapes/ConeShape.cpp"
"src/collision/shapes/ConvexMeshShape.h"
"src/collision/shapes/ConvexMeshShape.cpp"
"src/collision/shapes/CylinderShape.h"
"src/collision/shapes/CylinderShape.cpp"
"src/collision/shapes/SphereShape.h"
"src/collision/shapes/SphereShape.cpp"
"src/collision/RaycastInfo.h"
"src/collision/RaycastInfo.cpp"
"src/collision/ProxyShape.h"
"src/collision/ProxyShape.cpp"
"src/collision/CollisionDetection.h"
"src/collision/CollisionDetection.cpp"
"src/constraint/BallAndSocketJoint.h"
"src/constraint/BallAndSocketJoint.cpp"
"src/constraint/ContactPoint.h"
"src/constraint/ContactPoint.cpp"
"src/constraint/FixedJoint.h"
"src/constraint/FixedJoint.cpp"
"src/constraint/HingeJoint.h"
"src/constraint/HingeJoint.cpp"
"src/constraint/Joint.h"
"src/constraint/Joint.cpp"
"src/constraint/SliderJoint.h"
"src/constraint/SliderJoint.cpp"
"src/engine/CollisionWorld.h"
"src/engine/CollisionWorld.cpp"
"src/engine/ConstraintSolver.h"
"src/engine/ConstraintSolver.cpp"
"src/engine/ContactManifold.h"
"src/engine/ContactManifold.cpp"
"src/engine/ContactSolver.h"
"src/engine/ContactSolver.cpp"
"src/engine/DynamicsWorld.h"
"src/engine/DynamicsWorld.cpp"
"src/engine/EventListener.h"
"src/engine/Impulse.h"
"src/engine/Island.h"
"src/engine/Island.cpp"
"src/engine/Material.h"
"src/engine/Material.cpp"
"src/engine/OverlappingPair.h"
"src/engine/OverlappingPair.cpp"
"src/engine/Profiler.h"
"src/engine/Profiler.cpp"
"src/mathematics/mathematics.h"
"src/mathematics/mathematics_functions.h"
"src/mathematics/Matrix2x2.h"
"src/mathematics/Matrix2x2.cpp"
"src/mathematics/Matrix3x3.h"
"src/mathematics/Matrix3x3.cpp"
"src/mathematics/Quaternion.h"
"src/mathematics/Quaternion.cpp"
"src/mathematics/Transform.h"
"src/mathematics/Transform.cpp"
"src/mathematics/Vector2.h"
"src/mathematics/Vector2.cpp"
"src/mathematics/Vector3.h"
"src/mathematics/Ray.h"
"src/mathematics/Vector3.cpp"
"src/memory/MemoryAllocator.h"
"src/memory/MemoryAllocator.cpp"
"src/memory/Stack.h"
"${INCDIR}/configuration.h"
"${INCDIR}/decimal.h"
"${INCDIR}/reactphysics3d.h"
"${INCDIR}/body/Body.h"
"${INCDIR}/body/CollisionBody.h"
"${INCDIR}/body/RigidBody.h"
"${INCDIR}/collision/broadphase/BroadPhaseAlgorithm.h"
"${INCDIR}/collision/broadphase/DynamicAABBTree.h"
"${INCDIR}/collision/narrowphase/EPA/EdgeEPA.h"
"${INCDIR}/collision/narrowphase/EPA/EPAAlgorithm.h"
"${INCDIR}/collision/narrowphase/EPA/TriangleEPA.h"
"${INCDIR}/collision/narrowphase/EPA/TrianglesStore.h"
"${INCDIR}/collision/narrowphase/GJK/Simplex.h"
"${INCDIR}/collision/narrowphase/GJK/GJKAlgorithm.h"
"${INCDIR}/collision/narrowphase/NarrowPhaseAlgorithm.h"
"${INCDIR}/collision/narrowphase/SphereVsSphereAlgorithm.h"
"${INCDIR}/collision/shapes/AABB.h"
"${INCDIR}/collision/shapes/BoxShape.h"
"${INCDIR}/collision/shapes/CapsuleShape.h"
"${INCDIR}/collision/shapes/CollisionShape.h"
"${INCDIR}/collision/shapes/ConeShape.h"
"${INCDIR}/collision/shapes/ConvexMeshShape.h"
"${INCDIR}/collision/shapes/CylinderShape.h"
"${INCDIR}/collision/shapes/SphereShape.h"
"${INCDIR}/collision/RaycastInfo.h"
"${INCDIR}/collision/ProxyShape.h"
"${INCDIR}/collision/CollisionDetection.h"
"${INCDIR}/constraint/BallAndSocketJoint.h"
"${INCDIR}/constraint/ContactPoint.h"
"${INCDIR}/constraint/FixedJoint.h"
"${INCDIR}/constraint/HingeJoint.h"
"${INCDIR}/constraint/Joint.h"
"${INCDIR}/constraint/SliderJoint.h"
"${INCDIR}/engine/CollisionWorld.h"
"${INCDIR}/engine/ConstraintSolver.h"
"${INCDIR}/engine/ContactManifold.h"
"${INCDIR}/engine/ContactSolver.h"
"${INCDIR}/engine/DynamicsWorld.h"
"${INCDIR}/engine/EventListener.h"
"${INCDIR}/engine/Impulse.h"
"${INCDIR}/engine/Island.h"
"${INCDIR}/engine/Material.h"
"${INCDIR}/engine/OverlappingPair.h"
"${INCDIR}/engine/Profiler.h"
"${INCDIR}/mathematics/mathematics.h"
"${INCDIR}/mathematics/mathematics_functions.h"
"${INCDIR}/mathematics/Matrix2x2.h"
"${INCDIR}/mathematics/Matrix3x3.h"
"${INCDIR}/mathematics/Quaternion.h"
"${INCDIR}/mathematics/Transform.h"
"${INCDIR}/mathematics/Vector2.h"
"${INCDIR}/mathematics/Vector3.h"
"${INCDIR}/mathematics/Ray.h"
"${INCDIR}/memory/MemoryAllocator.h"
"${INCDIR}/memory/Stack.h"

"${SRCDIR}/body/Body.cpp"
"${SRCDIR}/body/CollisionBody.cpp"
"${SRCDIR}/body/RigidBody.cpp"
"${SRCDIR}/collision/broadphase/BroadPhaseAlgorithm.cpp"
"${SRCDIR}/collision/broadphase/DynamicAABBTree.cpp"
"${SRCDIR}/collision/narrowphase/EPA/EdgeEPA.cpp"
"${SRCDIR}/collision/narrowphase/EPA/EPAAlgorithm.cpp"
"${SRCDIR}/collision/narrowphase/EPA/TriangleEPA.cpp"
"${SRCDIR}/collision/narrowphase/EPA/TrianglesStore.cpp"
"${SRCDIR}/collision/narrowphase/GJK/Simplex.cpp"
"${SRCDIR}/collision/narrowphase/GJK/GJKAlgorithm.cpp"
"${SRCDIR}/collision/narrowphase/NarrowPhaseAlgorithm.cpp"
"${SRCDIR}/collision/narrowphase/SphereVsSphereAlgorithm.cpp"
"${SRCDIR}/collision/shapes/AABB.cpp"
"${SRCDIR}/collision/shapes/BoxShape.cpp"
"${SRCDIR}/collision/shapes/CapsuleShape.cpp"
"${SRCDIR}/collision/shapes/CollisionShape.cpp"
"${SRCDIR}/collision/shapes/ConeShape.cpp"
"${SRCDIR}/collision/shapes/ConvexMeshShape.cpp"
"${SRCDIR}/collision/shapes/CylinderShape.cpp"
"${SRCDIR}/collision/shapes/SphereShape.cpp"
"${SRCDIR}/collision/RaycastInfo.cpp"
"${SRCDIR}/collision/ProxyShape.cpp"
"${SRCDIR}/collision/CollisionDetection.cpp"
"${SRCDIR}/constraint/BallAndSocketJoint.cpp"
"${SRCDIR}/constraint/ContactPoint.cpp"
"${SRCDIR}/constraint/FixedJoint.cpp"
"${SRCDIR}/constraint/HingeJoint.cpp"
"${SRCDIR}/constraint/Joint.cpp"
"${SRCDIR}/constraint/SliderJoint.cpp"
"${SRCDIR}/engine/CollisionWorld.cpp"
"${SRCDIR}/engine/ConstraintSolver.cpp"
"${SRCDIR}/engine/ContactManifold.cpp"
"${SRCDIR}/engine/ContactSolver.cpp"
"${SRCDIR}/engine/DynamicsWorld.cpp"
"${SRCDIR}/engine/Island.cpp"
"${SRCDIR}/engine/Material.cpp"
"${SRCDIR}/engine/OverlappingPair.cpp"
"${SRCDIR}/engine/Profiler.cpp"
"${SRCDIR}/mathematics/Matrix2x2.cpp"
"${SRCDIR}/mathematics/Matrix3x3.cpp"
"${SRCDIR}/mathematics/Quaternion.cpp"
"${SRCDIR}/mathematics/Transform.cpp"
"${SRCDIR}/mathematics/Vector2.cpp"
"${SRCDIR}/mathematics/Vector3.cpp"
"${SRCDIR}/memory/MemoryAllocator.cpp"
)

# Create the library
Expand Down
6 changes: 3 additions & 3 deletions src/body/Body.h → include/reactphysics3d/body/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#define REACTPHYSICS3D_BODY_H

// Libraries
#include <stdexcept>
#include <cassert>
#include "configuration.h"
#include <stdexcept>
#include "reactphysics3d/configuration.h"

/// Namespace reactphysics3d
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// TODO : Make this class abstract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
#define REACTPHYSICS3D_COLLISION_BODY_H

// Libraries
#include <stdexcept>
#include <cassert>
#include "Body.h"
#include "mathematics/Transform.h"
#include "collision/shapes/AABB.h"
#include "collision/shapes/CollisionShape.h"
#include "collision/RaycastInfo.h"
#include "memory/MemoryAllocator.h"
#include "configuration.h"

/// Namespace reactphysics3d
#include <stdexcept>
#include "reactphysics3d/configuration.h"
#include "reactphysics3d/body/Body.h"
#include "reactphysics3d/collision/shapes/AABB.h"
#include "reactphysics3d/collision/shapes/CollisionShape.h"
#include "reactphysics3d/collision/RaycastInfo.h"
#include "reactphysics3d/mathematics/Transform.h"
#include "reactphysics3d/memory/MemoryAllocator.h"

/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Class declarations
Expand Down
10 changes: 5 additions & 5 deletions src/body/RigidBody.h → include/reactphysics3d/body/RigidBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

// Libraries
#include <cassert>
#include "CollisionBody.h"
#include "engine/Material.h"
#include "mathematics/mathematics.h"
#include "memory/MemoryAllocator.h"
#include "reactphysics3d/body/CollisionBody.h"
#include "reactphysics3d/engine/Material.h"
#include "reactphysics3d/mathematics/mathematics.h"
#include "reactphysics3d/memory/MemoryAllocator.h"

/// Namespace reactphysics3d
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Class declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
#define REACTPHYSICS3D_COLLISION_DETECTION_H

// Libraries
#include "body/CollisionBody.h"
#include "broadphase/BroadPhaseAlgorithm.h"
#include "engine/OverlappingPair.h"
#include "narrowphase/GJK/GJKAlgorithm.h"
#include "narrowphase/SphereVsSphereAlgorithm.h"
#include "memory/MemoryAllocator.h"
#include "constraint/ContactPoint.h"
#include <vector>
#include <map>
#include <set>
#include <utility>

/// ReactPhysics3D namespace
#include <vector>
#include "reactphysics3d/body/CollisionBody.h"
#include "reactphysics3d/collision/broadphase/BroadPhaseAlgorithm.h"
#include "reactphysics3d/collision/narrowphase/GJK/GJKAlgorithm.h"
#include "reactphysics3d/collision/narrowphase/SphereVsSphereAlgorithm.h"
#include "reactphysics3d/constraint/ContactPoint.h"
#include "reactphysics3d/engine/OverlappingPair.h"
#include "reactphysics3d/memory/MemoryAllocator.h"

/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
#define REACTPHYSICS3D_PROXY_SHAPE_H

// Libraries
#include "body/CollisionBody.h"
#include "shapes/CollisionShape.h"
#include "reactphysics3d/body/CollisionBody.h"
#include "reactphysics3d/collision/shapes/CollisionShape.h"

namespace reactphysics3d {
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Class ProxyShape
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#define REACTPHYSICS3D_RAYCAST_INFO_H

// Libraries
#include "mathematics/Vector3.h"
#include "mathematics/Ray.h"
#include "reactphysics3d/mathematics/Ray.h"
#include "reactphysics3d/mathematics/Vector3.h"

/// ReactPhysics3D namespace
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

// Libraries
#include <vector>
#include "body/CollisionBody.h"
#include "collision/ProxyShape.h"
#include "DynamicAABBTree.h"
#include "reactphysics3d/body/CollisionBody.h"
#include "reactphysics3d/collision/broadphase/DynamicAABBTree.h"
#include "reactphysics3d/collision/ProxyShape.h"

/// Namespace ReactPhysics3D
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Declarations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#define REACTPHYSICS3D_DYNAMIC_AABB_TREE_H

// Libraries
#include "configuration.h"
#include "collision/shapes/AABB.h"
#include "body/CollisionBody.h"
#include "reactphysics3d/configuration.h"
#include "reactphysics3d/body/CollisionBody.h"
#include "reactphysics3d/collision/shapes/AABB.h"

/// Namespace ReactPhysics3D
/// ReactPhysics3D Namespace
namespace reactphysics3d {

// Declarations
Expand Down
Loading