[DEV] change namespace and header type

This commit is contained in:
Edouard DUPIN 2017-06-16 22:34:37 +02:00
parent 247f3e6c11
commit cd59604b4b
215 changed files with 1287 additions and 3467 deletions

View File

@ -1,189 +0,0 @@
# Minimum cmake version required
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3)
# Project configuration
PROJECT(REACTPHYSICS3D CXX)
# Build type
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE)
# Where to build the library
SET(LIBRARY_OUTPUT_PATH "lib")
# Where to build the executables
SET(OUR_EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin")
ENABLE_TESTING()
# Options
OPTION(COMPILE_TESTBED "Select this if you want to build the testbed application" OFF)
OPTION(COMPILE_TESTS "Select this if you want to build the tests" OFF)
OPTION(PROFILING_ENABLED "Select this if you want to compile with enabled profiling" OFF)
OPTION(DOUBLE_PRECISION_ENABLED "Select this if you want to compile using double precision floating
values" OFF)
# Warning Compiler flags
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# C++11 flags
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
IF(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ELSE()
message("The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
ENDIF()
ENDIF()
# Headers
INCLUDE_DIRECTORIES(src)
IF(PROFILING_ENABLED)
ADD_DEFINITIONS(-DIS_PROFILING_ACTIVE)
ENDIF(PROFILING_ENABLED)
IF(DOUBLE_PRECISION_ENABLED)
ADD_DEFINITIONS(-DIS_DOUBLE_PRECISION_ENABLED)
ENDIF(DOUBLE_PRECISION_ENABLED)
# 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/CollisionDispatch.h"
"src/collision/narrowphase/DefaultCollisionDispatch.h"
"src/collision/narrowphase/DefaultCollisionDispatch.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/narrowphase/ConcaveVsConvexAlgorithm.h"
"src/collision/narrowphase/ConcaveVsConvexAlgorithm.cpp"
"src/collision/shapes/AABB.h"
"src/collision/shapes/AABB.cpp"
"src/collision/shapes/ConvexShape.h"
"src/collision/shapes/ConvexShape.cpp"
"src/collision/shapes/ConcaveShape.h"
"src/collision/shapes/ConcaveShape.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/shapes/TriangleShape.h"
"src/collision/shapes/TriangleShape.cpp"
"src/collision/shapes/ConcaveMeshShape.h"
"src/collision/shapes/ConcaveMeshShape.cpp"
"src/collision/shapes/HeightFieldShape.h"
"src/collision/shapes/HeightFieldShape.cpp"
"src/collision/RaycastInfo.h"
"src/collision/RaycastInfo.cpp"
"src/collision/ProxyShape.h"
"src/collision/ProxyShape.cpp"
"src/collision/TriangleVertexArray.h"
"src/collision/TriangleVertexArray.cpp"
"src/collision/TriangleMesh.h"
"src/collision/TriangleMesh.cpp"
"src/collision/CollisionDetection.h"
"src/collision/CollisionDetection.cpp"
"src/collision/CollisionShapeInfo.h"
"src/collision/ContactManifold.h"
"src/collision/ContactManifold.cpp"
"src/collision/ContactManifoldSet.h"
"src/collision/ContactManifoldSet.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/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/engine/Timer.h"
"src/engine/Timer.cpp"
"src/mathematics/mathematics.h"
"src/mathematics/mathematics_functions.h"
"src/mathematics/mathematics_functions.cpp"
"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"
)
# Create the library
ADD_LIBRARY(reactphysics3d STATIC ${REACTPHYSICS3D_SOURCES})
# If we need to compile the testbed application
add_subdirectory(tools/testbed/)
# If we need to compile the tests
add_subdirectory(test/)

View File

@ -1,14 +1,14 @@
[![Travis Build Status](https://travis-ci.org/DanielChappuis/reactphysics3d.svg?branch=master)](https://travis-ci.org/DanielChappuis/reactphysics3d)
[![Travis Build Status](https://travis-ci.org/DanielChappuis/ephysics.svg?branch=master)](https://travis-ci.org/DanielChappuis/ephysics)
## ReactPhysics3D
ReactPhysics3D is an open source C++ physics engine library that can be used in 3D simulations and games.
Website : [http://www.reactphysics3d.com](http://www.reactphysics3d.com)
Website : [http://www.ephysics.com](http://www.ephysics.com)
Author : Daniel Chappuis
<img src="https://raw.githubusercontent.com/DanielChappuis/reactphysics3d/master/documentation/UserManual/images/testbed.png" alt="Drawing" height="400" />
<img src="https://raw.githubusercontent.com/DanielChappuis/ephysics/master/documentation/UserManual/images/testbed.png" alt="Drawing" height="400" />
## Features
@ -38,7 +38,7 @@ The ReactPhysics3D library is released under the open-source BSD 3 clauses licen
## Documentation
You can find the User Manual and the Doxygen API Documentation [here](http://www.reactphysics3d.com/documentation.html)
You can find the User Manual and the Doxygen API Documentation [here](http://www.ephysics.com/documentation.html)
## Branches
@ -48,4 +48,4 @@ your application, it is recommended to checkout the "master" branch.
## Issues
If you find any issue with the library, you can report it on the issue tracker [here](https://github.com/DanielChappuis/reactphysics3d/issues).
If you find any issue with the library, you can report it on the issue tracker [here](https://github.com/DanielChappuis/ephysics/issues).

View File

@ -1,65 +0,0 @@
#
# Try to find GLEW library and include path.
# Once done this will define
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
IF (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
$ENV{PROGRAMFILES}/GLEW/include
${GLEW_ROOT_DIR}/include
DOC "The directory where GL/glew.h resides")
IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew64 glew64s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library (64-bit)"
)
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
FIND_LIBRARY( GLEW_LIBRARY
NAMES glew GLEW glew32 glew32s
PATHS
$ENV{PROGRAMFILES}/GLEW/lib
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
DOC "The GLEW library"
)
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
ELSE (WIN32)
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
/usr/include
/usr/local/include
/sw/include
/opt/local/include
${GLEW_ROOT_DIR}/include
DOC "The directory where GL/glew.h resides")
FIND_LIBRARY( GLEW_LIBRARY
NAMES GLEW glew
PATHS
/usr/lib64
/usr/lib
/usr/local/lib64
/usr/local/lib
/sw/lib
/opt/local/lib
${GLEW_ROOT_DIR}/lib
DOC "The GLEW library")
ENDIF (WIN32)
SET(GLEW_FOUND "NO")
IF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY)
SET(GLEW_LIBRARIES ${GLEW_LIBRARY})
SET(GLEW_FOUND "YES")
ENDIF (GLEW_INCLUDE_PATH AND GLEW_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_LIBRARY GLEW_INCLUDE_PATH)

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
\Preamble{html}
\begin{document}
% Upper case PNG file extensions
\Configure{graphics*}
{PNG}
{\Picture[pict]{\csname Gin@base\endcsname.PNG align=center border=0}}
% Lower case png extensions
\Configure{graphics*}
{png}
{\Picture[pict]{\csname Gin@base\endcsname.png align=center border=0}}
% Problems with spanish babel
\makeatletter
\let\ifes@LaTeXe\iftrue
\makeatother
\EndPreamble

View File

@ -1,13 +0,0 @@
#!/bin/bash
# Delete the /html folder
rm -R html/
# Create the /html folder
mkdir html
# Use the htlatex command to generate the HTML user manual from the .tex file
htlatex ReactPhysics3D-UserManual.tex "configHTLatex.cfg,html" "" -dhtml/
# Copy the images/ folder into the html/ folder
cp -R images/ html/images/

View File

@ -1,27 +0,0 @@
% Title page definition
\makeatletter
\def\maketitle{%
\null
\thispagestyle{empty}%
\begin{center}\leavevmode
\normalfont
{}
\vskip 1.3cm
{\Huge \@title\par}%
\vskip 0.3cm
{\Large Version: 0.6.0\par}%
\vskip 0.3cm
{\Large \@author\par}%
\vskip 2cm
{\includegraphics[height=5cm]{images/ReactPhysics3DLogo.png}}
\vskip 2cm
{\large{\url{http://www.reactphysics3d.com}}}
\vskip 0.2cm
{\large \@date}%
\end{center}%
\vfill
\null
\cleardoublepage
}
\makeatother

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/body/Body.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/body/Body.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -8,10 +8,10 @@
// Libraries
#include <stdexcept>
#include <cassert>
#include <ephysics/configuration.h>
#include <ephysics/configuration.hpp>
/// Namespace reactphysics3d
namespace reactphysics3d {
/// Namespace ephysics
namespace ephysics {
// TODO : Make this class abstract
// Class Body

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/body/CollisionBody.h>
#include <ephysics/engine/CollisionWorld.h>
#include <ephysics/collision/ContactManifold.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/engine/CollisionWorld.hpp>
#include <ephysics/collision/ContactManifold.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -8,16 +8,16 @@
// Libraries
#include <stdexcept>
#include <cassert>
#include <ephysics/body/Body.h>
#include <ephysics/body/Body.hpp>
#include <etk/math/Transform3D.hpp>
#include <ephysics/collision/shapes/AABB.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/RaycastInfo.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/AABB.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
#include <ephysics/collision/RaycastInfo.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
#include <ephysics/configuration.hpp>
/// Namespace reactphysics3d
namespace reactphysics3d {
/// Namespace ephysics
namespace ephysics {
// Class declarations
struct ContactManifoldListElement;

View File

@ -5,14 +5,14 @@
*/
// Libraries
#include <ephysics/body/RigidBody.h>
#include <ephysics/constraint/Joint.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/engine/DynamicsWorld.h>
#include <ephysics/body/RigidBody.hpp>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
#include <ephysics/engine/DynamicsWorld.hpp>
#include <ephysics/debug.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
RigidBody::RigidBody(const etk::Transform3D& transform, CollisionWorld& world, bodyindex id)

View File

@ -6,12 +6,12 @@
#pragma once
#include <cassert>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/engine/Material.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/engine/Material.hpp>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class declarations
struct JointListElement;

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/CollisionDetection.h>
#include <ephysics/engine/CollisionWorld.h>
#include <ephysics/body/Body.h>
#include <ephysics/collision/shapes/BoxShape.h>
#include <ephysics/body/RigidBody.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/CollisionDetection.hpp>
#include <ephysics/engine/CollisionWorld.hpp>
#include <ephysics/body/Body.hpp>
#include <ephysics/collision/shapes/BoxShape.hpp>
#include <ephysics/body/RigidBody.hpp>
#include <ephysics/configuration.hpp>
#include <cassert>
#include <complex>
#include <set>
@ -18,7 +18,7 @@
#include <utility>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
// Constructor

View File

@ -6,20 +6,20 @@
#pragma once
// Libraries
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
#include <ephysics/engine/OverlappingPair.h>
#include <ephysics/engine/EventListener.h>
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
#include <ephysics/engine/OverlappingPair.hpp>
#include <ephysics/engine/EventListener.hpp>
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <vector>
#include <map>
#include <set>
#include <utility>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Declarations
class BroadPhaseAlgorithm;

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/shapes/CollisionShape.hpp>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
class OverlappingPair;

View File

@ -7,9 +7,9 @@
// Libraries
#include <iostream>
#include <ephysics/collision/ContactManifold.h>
#include <ephysics/collision/ContactManifold.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ContactManifold::ContactManifold(ProxyShape* shape1, ProxyShape* shape2,

View File

@ -7,13 +7,13 @@
// Libraries
#include <vector>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Constants
const uint32_t MAX_CONTACT_POINTS_IN_MANIFOLD = 4; // Maximum number of contacts in the manifold

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/collision/ContactManifoldSet.h>
#include <ephysics/collision/ContactManifoldSet.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ContactManifoldSet::ContactManifoldSet(ProxyShape* shape1, ProxyShape* shape2,

View File

@ -6,9 +6,9 @@
#pragma once
// Libraries
#include <ephysics/collision/ContactManifold.h>
#include <ephysics/collision/ContactManifold.hpp>
namespace reactphysics3d {
namespace ephysics {
// Constants
const int32_t MAX_MANIFOLDS_IN_CONTACT_MANIFOLD_SET = 3; // Maximum number of contact manifolds in the set

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/collision/ProxyShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class ProxyShape
/**

View File

@ -6,10 +6,10 @@
// Libraries
#include <ephysics/collision/RaycastInfo.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/collision/RaycastInfo.hpp>
#include <ephysics/collision/ProxyShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Ray cast test against a proxy shape
float RaycastTest::raycastAgainstShape(ProxyShape* shape, const Ray& ray) {

View File

@ -7,10 +7,10 @@
// Libraries
#include <etk/math/Vector3D.hpp>
#include <ephysics/mathematics/Ray.h>
#include <ephysics/mathematics/Ray.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Declarations
class CollisionBody;

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/collision/TriangleMesh.h>
#include <ephysics/collision/TriangleMesh.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
TriangleMesh::TriangleMesh() {

View File

@ -8,9 +8,9 @@
// Libraries
#include <vector>
#include <cassert>
#include <ephysics/collision/TriangleVertexArray.h>
#include <ephysics/collision/TriangleVertexArray.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class TriangleMesh
/**

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/collision/TriangleVertexArray.h>
#include <ephysics/collision/TriangleVertexArray.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/// Note that your data will not be copied int32_to the TriangleVertexArray and

View File

@ -6,9 +6,9 @@
#pragma once
// Libraries
#include <ephysics/configuration.h>
#include <ephysics/configuration.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class TriangleVertexArray
/**

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
#include <ephysics/collision/CollisionDetection.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
#include <ephysics/collision/CollisionDetection.hpp>
#include <ephysics/engine/Profiler.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
BroadPhaseAlgorithm::BroadPhaseAlgorithm(CollisionDetection& collisionDetection)

View File

@ -7,13 +7,13 @@
// Libraries
#include <vector>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
#include <ephysics/engine/Profiler.hpp>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
// Declarations
class CollisionDetection;

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
#include <ephysics/memory/Stack.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
#include <ephysics/memory/Stack.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <ephysics/debug.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Initialization of static variables
const int32_t TreeNode::NULL_TREE_NODE = -1;

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/AABB.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/configuration.hpp>
#include <ephysics/collision/shapes/AABB.hpp>
#include <ephysics/body/CollisionBody.hpp>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
// Declarations
class BroadPhaseAlgorithm;

View File

@ -6,9 +6,9 @@
#pragma once
// Libraries
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class CollisionDispatch
/**

View File

@ -5,14 +5,14 @@
*/
// Libraries
#include <ephysics/collision/shapes/ConcaveShape.h>
#include <ephysics/collision/shapes/TriangleShape.h>
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.h>
#include <ephysics/collision/CollisionDetection.h>
#include <ephysics/engine/CollisionWorld.h>
#include <ephysics/collision/shapes/ConcaveShape.hpp>
#include <ephysics/collision/shapes/TriangleShape.hpp>
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.hpp>
#include <ephysics/collision/CollisionDetection.hpp>
#include <ephysics/engine/CollisionWorld.hpp>
#include <algorithm>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ConcaveVsConvexAlgorithm::ConcaveVsConvexAlgorithm() {

View File

@ -6,13 +6,13 @@
#pragma once
// Libraries
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/collision/shapes/ConcaveShape.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/collision/shapes/ConcaveShape.hpp>
#include <unordered_map>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
// Class ConvexVsTriangleCallback
/**

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
DefaultCollisionDispatch::DefaultCollisionDispatch() {

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/collision/narrowphase/CollisionDispatch.h>
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.h>
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.h>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
#include <ephysics/collision/narrowphase/CollisionDispatch.hpp>
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.hpp>
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.hpp>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
namespace reactphysics3d {
namespace ephysics {
// Class DefaultCollisionDispatch
/**

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
EPAAlgorithm::EPAAlgorithm() {

View File

@ -6,18 +6,18 @@
#pragma once
// Libraries
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/CollisionShapeInfo.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
#include <ephysics/collision/shapes/CollisionShape.hpp>
#include <ephysics/collision/CollisionShapeInfo.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
#include <algorithm>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// ---------- Constants ---------- //

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
#include <cassert>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor

View File

@ -7,10 +7,10 @@
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/mathematics/mathematics.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class declarations
class TriangleEPA;

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
// We use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
TriangleEPA::TriangleEPA() {
@ -66,7 +66,7 @@ bool TriangleEPA::computeClosestPoint(const vec3* vertices) {
/// Link an edge with another one. It means that the current edge of a triangle will
/// be associated with the edge of another triangle in order that both triangles
/// are neighbour along both edges).
bool reactphysics3d::link(const EdgeEPA& edge0, const EdgeEPA& edge1) {
bool ephysics::link(const EdgeEPA& edge0, const EdgeEPA& edge1) {
bool isPossible = (edge0.getSourceVertexIndex() == edge1.getTargetVertexIndex() &&
edge0.getTargetVertexIndex() == edge1.getSourceVertexIndex());
@ -82,7 +82,7 @@ bool reactphysics3d::link(const EdgeEPA& edge0, const EdgeEPA& edge1) {
/// between an edge "edge0" and an edge "edge1" represents the fact that "edge1" is an
/// adjacent edge of "edge0" but not the opposite. The opposite edge connection will
/// be made later.
void reactphysics3d::halfLink(const EdgeEPA& edge0, const EdgeEPA& edge1) {
void ephysics::halfLink(const EdgeEPA& edge0, const EdgeEPA& edge1) {
assert(edge0.getSourceVertexIndex() == edge1.getTargetVertexIndex() &&
edge0.getTargetVertexIndex() == edge1.getSourceVertexIndex());

View File

@ -6,13 +6,13 @@
#pragma once
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/configuration.hpp>
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
#include <cassert>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Prototypes
bool link(const EdgeEPA& edge0, const EdgeEPA& edge1);

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
// We use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
TrianglesStore::TrianglesStore() : m_numberTriangles(0) {

View File

@ -5,14 +5,14 @@
*/
#pragma once
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
// Libraries
#include <cassert>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Constants
const uint32_t MAX_TRIANGLES = 200; // Maximum number of triangles

View File

@ -5,18 +5,18 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/configuration.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/configuration.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <algorithm>
#include <cmath>
#include <cfloat>
#include <cassert>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
GJKAlgorithm::GJKAlgorithm() : NarrowPhaseAlgorithm() {

View File

@ -6,14 +6,14 @@
#pragma once
// Libraries
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Constants
const float REL_ERROR = float(1.0e-3);

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
#include <cfloat>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
Simplex::Simplex() : mBitsCurrentSimplex(0x0), mAllBits(0x0) {

View File

@ -6,11 +6,11 @@
#pragma once
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/mathematics/mathematics.hpp>
#include <vector>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Type definitions
typedef uint32_t Bits;

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
NarrowPhaseAlgorithm::NarrowPhaseAlgorithm()

View File

@ -6,14 +6,14 @@
#pragma once
// Libraries
#include <ephysics/body/Body.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/engine/OverlappingPair.h>
#include <ephysics/collision/CollisionShapeInfo.h>
#include <ephysics/body/Body.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
#include <ephysics/engine/OverlappingPair.hpp>
#include <ephysics/collision/CollisionShapeInfo.hpp>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
class CollisionDetection;

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.h>
#include <ephysics/collision/shapes/SphereShape.h>
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.hpp>
#include <ephysics/collision/shapes/SphereShape.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
SphereVsSphereAlgorithm::SphereVsSphereAlgorithm() :

View File

@ -6,13 +6,13 @@
#pragma once
// Libraries
#include <ephysics/body/Body.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
#include <ephysics/body/Body.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
/// Namespace ReactPhysics3D
namespace reactphysics3d {
namespace ephysics {
// Class SphereVsSphereAlgorithm
/**

View File

@ -6,11 +6,11 @@
// Libraries
#include <ephysics/collision/shapes/AABB.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/AABB.hpp>
#include <ephysics/configuration.hpp>
#include <cassert>
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
AABB::AABB():

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/mathematics/mathematics.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class AABB
/**

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/collision/shapes/BoxShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/BoxShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/configuration.hpp>
#include <vector>
#include <cassert>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -7,13 +7,13 @@
// Libraries
#include <cfloat>
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class BoxShape
/**

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/shapes/CapsuleShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/CapsuleShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/configuration.hpp>
#include <cassert>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class CapsuleShape
/**

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/shapes/CollisionShape.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <ephysics/body/CollisionBody.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
CollisionShape::CollisionShape(CollisionShapeType type) :
m_type(type),

View File

@ -10,13 +10,13 @@
#include <typeinfo>
#include <etk/math/Vector3D.hpp>
#include <etk/math/Matrix3x3.hpp>
#include <ephysics/mathematics/Ray.h>
#include <ephysics/collision/shapes/AABB.h>
#include <ephysics/collision/RaycastInfo.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/mathematics/Ray.hpp>
#include <ephysics/collision/shapes/AABB.hpp>
#include <ephysics/collision/RaycastInfo.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
/// Type of the collision shape
enum CollisionShapeType {TRIANGLE, BOX, SPHERE, CONE, CYLINDER,

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/collision/shapes/ConcaveMeshShape.h>
#include <ephysics/collision/shapes/ConcaveMeshShape.hpp>
#include <iostream>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ConcaveMeshShape::ConcaveMeshShape(TriangleMesh* triangleMesh):

View File

@ -6,13 +6,13 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConcaveShape.h>
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
#include <ephysics/collision/TriangleMesh.h>
#include <ephysics/collision/shapes/TriangleShape.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/shapes/ConcaveShape.hpp>
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
#include <ephysics/collision/TriangleMesh.hpp>
#include <ephysics/collision/shapes/TriangleShape.hpp>
#include <ephysics/engine/Profiler.hpp>
namespace reactphysics3d {
namespace ephysics {
class ConcaveMeshShape;

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/collision/shapes/ConcaveShape.h>
#include <ephysics/collision/shapes/ConcaveShape.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ConcaveShape::ConcaveShape(CollisionShapeType type)

View File

@ -6,11 +6,11 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/shapes/TriangleShape.h>
#include <ephysics/collision/shapes/CollisionShape.hpp>
#include <ephysics/collision/shapes/TriangleShape.hpp>
// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class TriangleCallback
/**

View File

@ -6,11 +6,11 @@
// Libraries
#include <complex>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/ConeShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/configuration.hpp>
#include <ephysics/collision/shapes/ConeShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class ConeShape
/**

View File

@ -6,10 +6,10 @@
// Libraries
#include <complex>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/ConvexMeshShape.h>
#include <ephysics/configuration.hpp>
#include <ephysics/collision/shapes/ConvexMeshShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor to initialize with an array of 3D vertices.
/// This method creates an int32_ternal copy of the input vertices.

View File

@ -6,17 +6,17 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/engine/CollisionWorld.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/TriangleMesh.h>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/engine/CollisionWorld.hpp>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/collision/TriangleMesh.hpp>
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
#include <vector>
#include <set>
#include <map>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Declaration
class CollisionWorld;

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
// We want to use the ReactPhysics3D namespace
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ConvexShape::ConvexShape(CollisionShapeType type, float margin)

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/CollisionShape.h>
#include <ephysics/collision/shapes/CollisionShape.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class ConvexShape
/**

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/collision/shapes/CylinderShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/CylinderShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/configuration.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,13 +6,13 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class CylinderShape
/**

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/collision/shapes/HeightFieldShape.h>
#include <ephysics/collision/shapes/HeightFieldShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,11 +6,11 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConcaveShape.h>
#include <ephysics/collision/shapes/TriangleShape.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/collision/shapes/ConcaveShape.hpp>
#include <ephysics/collision/shapes/TriangleShape.hpp>
#include <ephysics/engine/Profiler.hpp>
namespace reactphysics3d {
namespace ephysics {
class HeightFieldShape;
/**
* @brief This class is used for testing AABB and triangle overlap for raycasting

View File

@ -5,12 +5,12 @@
*/
// Libraries
#include <ephysics/collision/shapes/SphereShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/SphereShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/configuration.hpp>
#include <cassert>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class SphereShape
/**

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/collision/shapes/TriangleShape.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/configuration.h>
#include <ephysics/collision/shapes/TriangleShape.hpp>
#include <ephysics/collision/ProxyShape.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <ephysics/configuration.hpp>
#include <cassert>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
/**

View File

@ -6,11 +6,11 @@
#pragma once
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/collision/shapes/ConvexShape.h>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/collision/shapes/ConvexShape.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
/// Raycast test side for the triangle
enum TriangleRaycastSide {

View File

@ -11,8 +11,8 @@
#include <utility>
#include <cstdint>
/// Namespace reactphysics3d
namespace reactphysics3d {
/// Namespace ephysics
namespace ephysics {
// ------------------- Type definitions ------------------- //
typedef uint64_t bodyindex;
typedef std::pair<bodyindex, bodyindex> bodyindexpair;

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/constraint/BallAndSocketJoint.h>
#include <ephysics/engine/ConstraintSolver.h>
#include <ephysics/constraint/BallAndSocketJoint.hpp>
#include <ephysics/engine/ConstraintSolver.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Static variables definition
const float BallAndSocketJoint::BETA = float(0.2);

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/constraint/Joint.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/mathematics/mathematics.hpp>
namespace reactphysics3d {
namespace ephysics {
// Structure BallAndSocketJointInfo
/**

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/collision/ProxyShape.h>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/collision/ProxyShape.hpp>
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
// Constructor

View File

@ -6,14 +6,14 @@
#pragma once
// Libraries
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/CollisionShapeInfo.h>
#include <ephysics/configuration.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/configuration.h>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/CollisionShapeInfo.hpp>
#include <ephysics/configuration.hpp>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/configuration.hpp>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Structure ContactPointInfo
/**

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/constraint/FixedJoint.h>
#include <ephysics/engine/ConstraintSolver.h>
#include <ephysics/constraint/FixedJoint.hpp>
#include <ephysics/engine/ConstraintSolver.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Static variables definition
const float FixedJoint::BETA = float(0.2);

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/constraint/Joint.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/mathematics/mathematics.hpp>
namespace reactphysics3d {
namespace ephysics {
// Structure FixedJointInfo
/**

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/constraint/HingeJoint.h>
#include <ephysics/engine/ConstraintSolver.h>
#include <ephysics/constraint/HingeJoint.hpp>
#include <ephysics/engine/ConstraintSolver.hpp>
#include <cmath>
using namespace reactphysics3d;
using namespace ephysics;
// Static variables definition
const float HingeJoint::BETA = float(0.2);

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/constraint/Joint.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/mathematics/mathematics.hpp>
namespace reactphysics3d {
namespace ephysics {
// Structure HingeJointInfo
/**

View File

@ -6,9 +6,9 @@
#pragma once
// Libraries
#include <ephysics/constraint/Joint.h>
#include <ephysics/constraint/Joint.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
Joint::Joint(const JointInfo& jointInfo)

View File

@ -6,12 +6,12 @@
#pragma once
// Libraries
#include <ephysics/configuration.h>
#include <ephysics/body/RigidBody.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/configuration.hpp>
#include <ephysics/body/RigidBody.hpp>
#include <ephysics/mathematics/mathematics.hpp>
// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
/// Enumeration for the type of a constraint
enum JointType {BALLSOCKETJOINT, SLIDERJOINT, HINGEJOINT, FIXEDJOINT};

View File

@ -5,9 +5,9 @@
*/
// Libraries
#include <ephysics/constraint/SliderJoint.h>
#include <ephysics/constraint/SliderJoint.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Static variables definition
const float SliderJoint::BETA = float(0.2);

View File

@ -6,10 +6,10 @@
#pragma once
// Libraries
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/engine/ConstraintSolver.h>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/engine/ConstraintSolver.hpp>
namespace reactphysics3d {
namespace ephysics {
// Structure SliderJointInfo
/**

View File

View File

@ -5,11 +5,11 @@
*/
// Libraries
#include <ephysics/engine/CollisionWorld.h>
#include <ephysics/engine/CollisionWorld.hpp>
#include <algorithm>
// Namespaces
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
// Constructor
@ -44,7 +44,7 @@ CollisionBody* CollisionWorld::createCollisionBody(const etk::Transform3D& trans
bodyindex bodyID = computeNextAvailableBodyID();
// Largest index cannot be used (it is used for invalid index)
assert(bodyID < std::numeric_limits<reactphysics3d::bodyindex>::max());
assert(bodyID < std::numeric_limits<ephysics::bodyindex>::max());
// Create the collision body
CollisionBody* collisionBody = new (m_memoryAllocator.allocate(sizeof(CollisionBody)))

View File

@ -10,19 +10,19 @@
#include <set>
#include <list>
#include <algorithm>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/body/CollisionBody.h>
#include <ephysics/collision/RaycastInfo.h>
#include <ephysics/engine/OverlappingPair.h>
#include <ephysics/collision/CollisionDetection.h>
#include <ephysics/constraint/Joint.h>
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/memory/MemoryAllocator.h>
#include <ephysics/engine/EventListener.h>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <ephysics/body/CollisionBody.hpp>
#include <ephysics/collision/RaycastInfo.hpp>
#include <ephysics/engine/OverlappingPair.hpp>
#include <ephysics/collision/CollisionDetection.hpp>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/memory/MemoryAllocator.hpp>
#include <ephysics/engine/EventListener.hpp>
/// Namespace reactphysics3d
namespace reactphysics3d {
/// Namespace ephysics
namespace ephysics {
// Declarations
class CollisionCallback;

View File

@ -5,10 +5,10 @@
*/
// Libraries
#include <ephysics/engine/ConstraintSolver.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/engine/ConstraintSolver.hpp>
#include <ephysics/engine/Profiler.hpp>
using namespace reactphysics3d;
using namespace ephysics;
// Constructor
ConstraintSolver::ConstraintSolver(const std::map<RigidBody*, uint32_t>& mapBodyToVelocityIndex)

View File

@ -6,14 +6,14 @@
#pragma once
// Libraries
#include <ephysics/configuration.h>
#include <ephysics/mathematics/mathematics.h>
#include <ephysics/constraint/Joint.h>
#include <ephysics/engine/Island.h>
#include <ephysics/configuration.hpp>
#include <ephysics/mathematics/mathematics.hpp>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/engine/Island.hpp>
#include <map>
#include <set>
namespace reactphysics3d {
namespace ephysics {
// Structure ConstraintSolverData
/**

View File

@ -5,13 +5,13 @@
*/
// Libraries
#include <ephysics/engine/ContactSolver.h>
#include <ephysics/engine/DynamicsWorld.h>
#include <ephysics/body/RigidBody.h>
#include <ephysics/engine/Profiler.h>
#include <ephysics/engine/ContactSolver.hpp>
#include <ephysics/engine/DynamicsWorld.hpp>
#include <ephysics/body/RigidBody.hpp>
#include <ephysics/engine/Profiler.hpp>
#include <limits>
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
// Constants initialization

View File

@ -6,17 +6,17 @@
#pragma once
// Libraries
#include <ephysics/constraint/ContactPoint.h>
#include <ephysics/configuration.h>
#include <ephysics/constraint/Joint.h>
#include <ephysics/collision/ContactManifold.h>
#include <ephysics/engine/Island.h>
#include <ephysics/engine/Impulse.h>
#include <ephysics/constraint/ContactPoint.hpp>
#include <ephysics/configuration.hpp>
#include <ephysics/constraint/Joint.hpp>
#include <ephysics/collision/ContactManifold.hpp>
#include <ephysics/engine/Island.hpp>
#include <ephysics/engine/Impulse.hpp>
#include <map>
#include <set>
/// ReactPhysics3D namespace
namespace reactphysics3d {
namespace ephysics {
// Class Contact Solver

View File

@ -5,14 +5,14 @@
*/
// Libraries
#include <ephysics/engine/DynamicsWorld.h>
#include <ephysics/constraint/BallAndSocketJoint.h>
#include <ephysics/constraint/SliderJoint.h>
#include <ephysics/constraint/HingeJoint.h>
#include <ephysics/constraint/FixedJoint.h>
#include <ephysics/engine/DynamicsWorld.hpp>
#include <ephysics/constraint/BallAndSocketJoint.hpp>
#include <ephysics/constraint/SliderJoint.hpp>
#include <ephysics/constraint/HingeJoint.hpp>
#include <ephysics/constraint/FixedJoint.hpp>
// Namespaces
using namespace reactphysics3d;
using namespace ephysics;
using namespace std;
// Constructor
@ -432,7 +432,7 @@ RigidBody* DynamicsWorld::createRigidBody(const etk::Transform3D& transform) {
bodyindex bodyID = computeNextAvailableBodyID();
// Largest index cannot be used (it is used for invalid index)
assert(bodyID < std::numeric_limits<reactphysics3d::bodyindex>::max());
assert(bodyID < std::numeric_limits<ephysics::bodyindex>::max());
// Create the rigid body
RigidBody* rigidBody = new (m_memoryAllocator.allocate(sizeof(RigidBody))) RigidBody(transform,

Some files were not shown because too many files have changed in this diff Show More