[DEV] change namespace and header type
This commit is contained in:
parent
247f3e6c11
commit
cd59604b4b
189
CMakeLists.txt
189
CMakeLists.txt
@ -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/)
|
|
10
README.md
10
README.md
@ -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
|
||||||
|
|
||||||
ReactPhysics3D is an open source C++ physics engine library that can be used in 3D simulations and games.
|
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
|
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
|
## Features
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ The ReactPhysics3D library is released under the open-source BSD 3 clauses licen
|
|||||||
|
|
||||||
## Documentation
|
## 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
|
## Branches
|
||||||
|
|
||||||
@ -48,4 +48,4 @@ your application, it is recommended to checkout the "master" branch.
|
|||||||
|
|
||||||
## Issues
|
## 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).
|
||||||
|
@ -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)
|
|
1869
doc/API/Doxyfile
1869
doc/API/Doxyfile
File diff suppressed because it is too large
Load Diff
@ -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
|
|
@ -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/
|
|
@ -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
|
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/Body.h>
|
#include <ephysics/body/Body.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
// Libraries
|
// Libraries
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
|
|
||||||
/// Namespace reactphysics3d
|
/// Namespace ephysics
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// TODO : Make this class abstract
|
// TODO : Make this class abstract
|
||||||
// Class Body
|
// Class Body
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/engine/CollisionWorld.h>
|
#include <ephysics/engine/CollisionWorld.hpp>
|
||||||
#include <ephysics/collision/ContactManifold.h>
|
#include <ephysics/collision/ContactManifold.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -8,16 +8,16 @@
|
|||||||
// Libraries
|
// Libraries
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ephysics/body/Body.h>
|
#include <ephysics/body/Body.hpp>
|
||||||
#include <etk/math/Transform3D.hpp>
|
#include <etk/math/Transform3D.hpp>
|
||||||
#include <ephysics/collision/shapes/AABB.h>
|
#include <ephysics/collision/shapes/AABB.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
#include <ephysics/collision/RaycastInfo.h>
|
#include <ephysics/collision/RaycastInfo.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
|
|
||||||
/// Namespace reactphysics3d
|
/// Namespace ephysics
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class declarations
|
// Class declarations
|
||||||
struct ContactManifoldListElement;
|
struct ContactManifoldListElement;
|
@ -5,14 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/RigidBody.h>
|
#include <ephysics/body/RigidBody.hpp>
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
#include <ephysics/engine/DynamicsWorld.h>
|
#include <ephysics/engine/DynamicsWorld.hpp>
|
||||||
#include <ephysics/debug.hpp>
|
#include <ephysics/debug.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
|
|
||||||
RigidBody::RigidBody(const etk::Transform3D& transform, CollisionWorld& world, bodyindex id)
|
RigidBody::RigidBody(const etk::Transform3D& transform, CollisionWorld& world, bodyindex id)
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/engine/Material.h>
|
#include <ephysics/engine/Material.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class declarations
|
// Class declarations
|
||||||
struct JointListElement;
|
struct JointListElement;
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/CollisionDetection.h>
|
#include <ephysics/collision/CollisionDetection.hpp>
|
||||||
#include <ephysics/engine/CollisionWorld.h>
|
#include <ephysics/engine/CollisionWorld.hpp>
|
||||||
#include <ephysics/body/Body.h>
|
#include <ephysics/body/Body.hpp>
|
||||||
#include <ephysics/collision/shapes/BoxShape.h>
|
#include <ephysics/collision/shapes/BoxShape.hpp>
|
||||||
#include <ephysics/body/RigidBody.h>
|
#include <ephysics/body/RigidBody.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -6,20 +6,20 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
|
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/engine/OverlappingPair.h>
|
#include <ephysics/engine/OverlappingPair.hpp>
|
||||||
#include <ephysics/engine/EventListener.h>
|
#include <ephysics/engine/EventListener.hpp>
|
||||||
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.h>
|
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
class BroadPhaseAlgorithm;
|
class BroadPhaseAlgorithm;
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
class OverlappingPair;
|
class OverlappingPair;
|
||||||
|
|
@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ephysics/collision/ContactManifold.h>
|
#include <ephysics/collision/ContactManifold.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ContactManifold::ContactManifold(ProxyShape* shape1, ProxyShape* shape2,
|
ContactManifold::ContactManifold(ProxyShape* shape1, ProxyShape* shape2,
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const uint32_t MAX_CONTACT_POINTS_IN_MANIFOLD = 4; // Maximum number of contacts in the manifold
|
const uint32_t MAX_CONTACT_POINTS_IN_MANIFOLD = 4; // Maximum number of contacts in the manifold
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/ContactManifoldSet.h>
|
#include <ephysics/collision/ContactManifoldSet.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ContactManifoldSet::ContactManifoldSet(ProxyShape* shape1, ProxyShape* shape2,
|
ContactManifoldSet::ContactManifoldSet(ProxyShape* shape1, ProxyShape* shape2,
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/ContactManifold.h>
|
#include <ephysics/collision/ContactManifold.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const int32_t MAX_MANIFOLDS_IN_CONTACT_MANIFOLD_SET = 3; // Maximum number of contact manifolds in the set
|
const int32_t MAX_MANIFOLDS_IN_CONTACT_MANIFOLD_SET = 3; // Maximum number of contact manifolds in the set
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class ProxyShape
|
// Class ProxyShape
|
||||||
/**
|
/**
|
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
|
|
||||||
#include <ephysics/collision/RaycastInfo.h>
|
#include <ephysics/collision/RaycastInfo.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Ray cast test against a proxy shape
|
// Ray cast test against a proxy shape
|
||||||
float RaycastTest::raycastAgainstShape(ProxyShape* shape, const Ray& ray) {
|
float RaycastTest::raycastAgainstShape(ProxyShape* shape, const Ray& ray) {
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <etk/math/Vector3D.hpp>
|
#include <etk/math/Vector3D.hpp>
|
||||||
#include <ephysics/mathematics/Ray.h>
|
#include <ephysics/mathematics/Ray.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
class CollisionBody;
|
class CollisionBody;
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/TriangleMesh.h>
|
#include <ephysics/collision/TriangleMesh.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
TriangleMesh::TriangleMesh() {
|
TriangleMesh::TriangleMesh() {
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
// Libraries
|
// Libraries
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <ephysics/collision/TriangleVertexArray.h>
|
#include <ephysics/collision/TriangleVertexArray.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class TriangleMesh
|
// Class TriangleMesh
|
||||||
/**
|
/**
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/TriangleVertexArray.h>
|
#include <ephysics/collision/TriangleVertexArray.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/// Note that your data will not be copied int32_to the TriangleVertexArray and
|
/// Note that your data will not be copied int32_to the TriangleVertexArray and
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class TriangleVertexArray
|
// Class TriangleVertexArray
|
||||||
/**
|
/**
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
|
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/collision/CollisionDetection.h>
|
#include <ephysics/collision/CollisionDetection.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
BroadPhaseAlgorithm::BroadPhaseAlgorithm(CollisionDetection& collisionDetection)
|
BroadPhaseAlgorithm::BroadPhaseAlgorithm(CollisionDetection& collisionDetection)
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
|
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
class CollisionDetection;
|
class CollisionDetection;
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
|
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
|
||||||
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.h>
|
#include <ephysics/collision/broadphase/BroadPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/memory/Stack.h>
|
#include <ephysics/memory/Stack.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <ephysics/debug.hpp>
|
#include <ephysics/debug.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Initialization of static variables
|
// Initialization of static variables
|
||||||
const int32_t TreeNode::NULL_TREE_NODE = -1;
|
const int32_t TreeNode::NULL_TREE_NODE = -1;
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/collision/shapes/AABB.h>
|
#include <ephysics/collision/shapes/AABB.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
class BroadPhaseAlgorithm;
|
class BroadPhaseAlgorithm;
|
@ -6,9 +6,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class CollisionDispatch
|
// Class CollisionDispatch
|
||||||
/**
|
/**
|
@ -5,14 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConcaveShape.h>
|
#include <ephysics/collision/shapes/ConcaveShape.hpp>
|
||||||
#include <ephysics/collision/shapes/TriangleShape.h>
|
#include <ephysics/collision/shapes/TriangleShape.hpp>
|
||||||
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.h>
|
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.hpp>
|
||||||
#include <ephysics/collision/CollisionDetection.h>
|
#include <ephysics/collision/CollisionDetection.hpp>
|
||||||
#include <ephysics/engine/CollisionWorld.h>
|
#include <ephysics/engine/CollisionWorld.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ConcaveVsConvexAlgorithm::ConcaveVsConvexAlgorithm() {
|
ConcaveVsConvexAlgorithm::ConcaveVsConvexAlgorithm() {
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/collision/shapes/ConcaveShape.h>
|
#include <ephysics/collision/shapes/ConcaveShape.hpp>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class ConvexVsTriangleCallback
|
// Class ConvexVsTriangleCallback
|
||||||
/**
|
/**
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.h>
|
#include <ephysics/collision/narrowphase/DefaultCollisionDispatch.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
DefaultCollisionDispatch::DefaultCollisionDispatch() {
|
DefaultCollisionDispatch::DefaultCollisionDispatch() {
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/CollisionDispatch.h>
|
#include <ephysics/collision/narrowphase/CollisionDispatch.hpp>
|
||||||
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.h>
|
#include <ephysics/collision/narrowphase/ConcaveVsConvexAlgorithm.hpp>
|
||||||
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.h>
|
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.hpp>
|
||||||
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
|
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class DefaultCollisionDispatch
|
// Class DefaultCollisionDispatch
|
||||||
/**
|
/**
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.h>
|
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
|
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
|
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
EPAAlgorithm::EPAAlgorithm() {
|
EPAAlgorithm::EPAAlgorithm() {
|
||||||
|
@ -6,18 +6,18 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
|
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
#include <ephysics/collision/CollisionShapeInfo.h>
|
#include <ephysics/collision/CollisionShapeInfo.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// ---------- Constants ---------- //
|
// ---------- Constants ---------- //
|
||||||
|
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
|
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
|
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class declarations
|
// Class declarations
|
||||||
class TriangleEPA;
|
class TriangleEPA;
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
|
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
|
||||||
|
|
||||||
// We use the ReactPhysics3D namespace
|
// We use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
TriangleEPA::TriangleEPA() {
|
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
|
/// 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
|
/// be associated with the edge of another triangle in order that both triangles
|
||||||
/// are neighbour along both edges).
|
/// 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() &&
|
bool isPossible = (edge0.getSourceVertexIndex() == edge1.getTargetVertexIndex() &&
|
||||||
edge0.getTargetVertexIndex() == edge1.getSourceVertexIndex());
|
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
|
/// 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
|
/// adjacent edge of "edge0" but not the opposite. The opposite edge connection will
|
||||||
/// be made later.
|
/// 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() &&
|
assert(edge0.getSourceVertexIndex() == edge1.getTargetVertexIndex() &&
|
||||||
edge0.getTargetVertexIndex() == edge1.getSourceVertexIndex());
|
edge0.getTargetVertexIndex() == edge1.getSourceVertexIndex());
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/EdgeEPA.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Prototypes
|
// Prototypes
|
||||||
bool link(const EdgeEPA& edge0, const EdgeEPA& edge1);
|
bool link(const EdgeEPA& edge0, const EdgeEPA& edge1);
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.h>
|
#include <ephysics/collision/narrowphase/EPA/TrianglesStore.hpp>
|
||||||
|
|
||||||
// We use the ReactPhysics3D namespace
|
// We use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
TrianglesStore::TrianglesStore() : m_numberTriangles(0) {
|
TrianglesStore::TrianglesStore() : m_numberTriangles(0) {
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.h>
|
#include <ephysics/collision/narrowphase/EPA/TriangleEPA.hpp>
|
||||||
|
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const uint32_t MAX_TRIANGLES = 200; // Maximum number of triangles
|
const uint32_t MAX_TRIANGLES = 200; // Maximum number of triangles
|
@ -5,18 +5,18 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
|
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
|
||||||
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
|
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
GJKAlgorithm::GJKAlgorithm() : NarrowPhaseAlgorithm() {
|
GJKAlgorithm::GJKAlgorithm() : NarrowPhaseAlgorithm() {
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.h>
|
#include <ephysics/collision/narrowphase/EPA/EPAAlgorithm.hpp>
|
||||||
|
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const float REL_ERROR = float(1.0e-3);
|
const float REL_ERROR = float(1.0e-3);
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/GJK/Simplex.h>
|
#include <ephysics/collision/narrowphase/GJK/Simplex.hpp>
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Simplex::Simplex() : mBitsCurrentSimplex(0x0), mAllBits(0x0) {
|
Simplex::Simplex() : mBitsCurrentSimplex(0x0), mAllBits(0x0) {
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Type definitions
|
// Type definitions
|
||||||
typedef uint32_t Bits;
|
typedef uint32_t Bits;
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
NarrowPhaseAlgorithm::NarrowPhaseAlgorithm()
|
NarrowPhaseAlgorithm::NarrowPhaseAlgorithm()
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/Body.h>
|
#include <ephysics/body/Body.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
#include <ephysics/engine/OverlappingPair.h>
|
#include <ephysics/engine/OverlappingPair.hpp>
|
||||||
#include <ephysics/collision/CollisionShapeInfo.h>
|
#include <ephysics/collision/CollisionShapeInfo.hpp>
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
class CollisionDetection;
|
class CollisionDetection;
|
||||||
|
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.h>
|
#include <ephysics/collision/narrowphase/SphereVsSphereAlgorithm.hpp>
|
||||||
#include <ephysics/collision/shapes/SphereShape.h>
|
#include <ephysics/collision/shapes/SphereShape.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
SphereVsSphereAlgorithm::SphereVsSphereAlgorithm() :
|
SphereVsSphereAlgorithm::SphereVsSphereAlgorithm() :
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/Body.h>
|
#include <ephysics/body/Body.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.h>
|
#include <ephysics/collision/narrowphase/NarrowPhaseAlgorithm.hpp>
|
||||||
|
|
||||||
|
|
||||||
/// Namespace ReactPhysics3D
|
/// Namespace ReactPhysics3D
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class SphereVsSphereAlgorithm
|
// Class SphereVsSphereAlgorithm
|
||||||
/**
|
/**
|
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/AABB.h>
|
#include <ephysics/collision/shapes/AABB.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
AABB::AABB():
|
AABB::AABB():
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class AABB
|
// Class AABB
|
||||||
/**
|
/**
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/BoxShape.h>
|
#include <ephysics/collision/shapes/BoxShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class BoxShape
|
// Class BoxShape
|
||||||
/**
|
/**
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CapsuleShape.h>
|
#include <ephysics/collision/shapes/CapsuleShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
// ReactPhysics3D namespace
|
// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class CapsuleShape
|
// Class CapsuleShape
|
||||||
/**
|
/**
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
CollisionShape::CollisionShape(CollisionShapeType type) :
|
CollisionShape::CollisionShape(CollisionShapeType type) :
|
||||||
m_type(type),
|
m_type(type),
|
||||||
|
@ -10,13 +10,13 @@
|
|||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <etk/math/Vector3D.hpp>
|
#include <etk/math/Vector3D.hpp>
|
||||||
#include <etk/math/Matrix3x3.hpp>
|
#include <etk/math/Matrix3x3.hpp>
|
||||||
#include <ephysics/mathematics/Ray.h>
|
#include <ephysics/mathematics/Ray.hpp>
|
||||||
#include <ephysics/collision/shapes/AABB.h>
|
#include <ephysics/collision/shapes/AABB.hpp>
|
||||||
#include <ephysics/collision/RaycastInfo.h>
|
#include <ephysics/collision/RaycastInfo.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
/// Type of the collision shape
|
/// Type of the collision shape
|
||||||
enum CollisionShapeType {TRIANGLE, BOX, SPHERE, CONE, CYLINDER,
|
enum CollisionShapeType {TRIANGLE, BOX, SPHERE, CONE, CYLINDER,
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConcaveMeshShape.h>
|
#include <ephysics/collision/shapes/ConcaveMeshShape.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ConcaveMeshShape::ConcaveMeshShape(TriangleMesh* triangleMesh):
|
ConcaveMeshShape::ConcaveMeshShape(TriangleMesh* triangleMesh):
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConcaveShape.h>
|
#include <ephysics/collision/shapes/ConcaveShape.hpp>
|
||||||
#include <ephysics/collision/broadphase/DynamicAABBTree.h>
|
#include <ephysics/collision/broadphase/DynamicAABBTree.hpp>
|
||||||
#include <ephysics/collision/TriangleMesh.h>
|
#include <ephysics/collision/TriangleMesh.hpp>
|
||||||
#include <ephysics/collision/shapes/TriangleShape.h>
|
#include <ephysics/collision/shapes/TriangleShape.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
class ConcaveMeshShape;
|
class ConcaveMeshShape;
|
||||||
|
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConcaveShape.h>
|
#include <ephysics/collision/shapes/ConcaveShape.hpp>
|
||||||
|
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ConcaveShape::ConcaveShape(CollisionShapeType type)
|
ConcaveShape::ConcaveShape(CollisionShapeType type)
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
#include <ephysics/collision/shapes/TriangleShape.h>
|
#include <ephysics/collision/shapes/TriangleShape.hpp>
|
||||||
|
|
||||||
// ReactPhysics3D namespace
|
// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class TriangleCallback
|
// Class TriangleCallback
|
||||||
/**
|
/**
|
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/collision/shapes/ConeShape.h>
|
#include <ephysics/collision/shapes/ConeShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class ConeShape
|
// Class ConeShape
|
||||||
/**
|
/**
|
@ -6,10 +6,10 @@
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/collision/shapes/ConvexMeshShape.h>
|
#include <ephysics/collision/shapes/ConvexMeshShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor to initialize with an array of 3D vertices.
|
// Constructor to initialize with an array of 3D vertices.
|
||||||
/// This method creates an int32_ternal copy of the input vertices.
|
/// This method creates an int32_ternal copy of the input vertices.
|
||||||
|
@ -6,17 +6,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/engine/CollisionWorld.h>
|
#include <ephysics/engine/CollisionWorld.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/collision/TriangleMesh.h>
|
#include <ephysics/collision/TriangleMesh.hpp>
|
||||||
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.h>
|
#include <ephysics/collision/narrowphase/GJK/GJKAlgorithm.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declaration
|
// Declaration
|
||||||
class CollisionWorld;
|
class CollisionWorld;
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
|
|
||||||
|
|
||||||
// We want to use the ReactPhysics3D namespace
|
// We want to use the ReactPhysics3D namespace
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ConvexShape::ConvexShape(CollisionShapeType type, float margin)
|
ConvexShape::ConvexShape(CollisionShapeType type, float margin)
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CollisionShape.h>
|
#include <ephysics/collision/shapes/CollisionShape.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class ConvexShape
|
// Class ConvexShape
|
||||||
/**
|
/**
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/CylinderShape.h>
|
#include <ephysics/collision/shapes/CylinderShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class CylinderShape
|
// Class CylinderShape
|
||||||
/**
|
/**
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/HeightFieldShape.h>
|
#include <ephysics/collision/shapes/HeightFieldShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConcaveShape.h>
|
#include <ephysics/collision/shapes/ConcaveShape.hpp>
|
||||||
#include <ephysics/collision/shapes/TriangleShape.h>
|
#include <ephysics/collision/shapes/TriangleShape.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
class HeightFieldShape;
|
class HeightFieldShape;
|
||||||
/**
|
/**
|
||||||
* @brief This class is used for testing AABB and triangle overlap for raycasting
|
* @brief This class is used for testing AABB and triangle overlap for raycasting
|
@ -5,12 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/SphereShape.h>
|
#include <ephysics/collision/shapes/SphereShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
// ReactPhysics3D namespace
|
// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Class SphereShape
|
// Class SphereShape
|
||||||
/**
|
/**
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/collision/shapes/TriangleShape.h>
|
#include <ephysics/collision/shapes/TriangleShape.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
/**
|
/**
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/collision/shapes/ConvexShape.h>
|
#include <ephysics/collision/shapes/ConvexShape.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
/// Raycast test side for the triangle
|
/// Raycast test side for the triangle
|
||||||
enum TriangleRaycastSide {
|
enum TriangleRaycastSide {
|
@ -11,8 +11,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
/// Namespace reactphysics3d
|
/// Namespace ephysics
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
// ------------------- Type definitions ------------------- //
|
// ------------------- Type definitions ------------------- //
|
||||||
typedef uint64_t bodyindex;
|
typedef uint64_t bodyindex;
|
||||||
typedef std::pair<bodyindex, bodyindex> bodyindexpair;
|
typedef std::pair<bodyindex, bodyindex> bodyindexpair;
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/BallAndSocketJoint.h>
|
#include <ephysics/constraint/BallAndSocketJoint.hpp>
|
||||||
#include <ephysics/engine/ConstraintSolver.h>
|
#include <ephysics/engine/ConstraintSolver.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Static variables definition
|
// Static variables definition
|
||||||
const float BallAndSocketJoint::BETA = float(0.2);
|
const float BallAndSocketJoint::BETA = float(0.2);
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure BallAndSocketJointInfo
|
// Structure BallAndSocketJointInfo
|
||||||
/**
|
/**
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/collision/ProxyShape.h>
|
#include <ephysics/collision/ProxyShape.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/CollisionShapeInfo.h>
|
#include <ephysics/collision/CollisionShapeInfo.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure ContactPointInfo
|
// Structure ContactPointInfo
|
||||||
/**
|
/**
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/FixedJoint.h>
|
#include <ephysics/constraint/FixedJoint.hpp>
|
||||||
#include <ephysics/engine/ConstraintSolver.h>
|
#include <ephysics/engine/ConstraintSolver.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Static variables definition
|
// Static variables definition
|
||||||
const float FixedJoint::BETA = float(0.2);
|
const float FixedJoint::BETA = float(0.2);
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure FixedJointInfo
|
// Structure FixedJointInfo
|
||||||
/**
|
/**
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/HingeJoint.h>
|
#include <ephysics/constraint/HingeJoint.hpp>
|
||||||
#include <ephysics/engine/ConstraintSolver.h>
|
#include <ephysics/engine/ConstraintSolver.hpp>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Static variables definition
|
// Static variables definition
|
||||||
const float HingeJoint::BETA = float(0.2);
|
const float HingeJoint::BETA = float(0.2);
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure HingeJointInfo
|
// Structure HingeJointInfo
|
||||||
/**
|
/**
|
@ -6,9 +6,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Joint::Joint(const JointInfo& jointInfo)
|
Joint::Joint(const JointInfo& jointInfo)
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/body/RigidBody.h>
|
#include <ephysics/body/RigidBody.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
|
|
||||||
// ReactPhysics3D namespace
|
// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
/// Enumeration for the type of a constraint
|
/// Enumeration for the type of a constraint
|
||||||
enum JointType {BALLSOCKETJOINT, SLIDERJOINT, HINGEJOINT, FIXEDJOINT};
|
enum JointType {BALLSOCKETJOINT, SLIDERJOINT, HINGEJOINT, FIXEDJOINT};
|
@ -5,9 +5,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/SliderJoint.h>
|
#include <ephysics/constraint/SliderJoint.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Static variables definition
|
// Static variables definition
|
||||||
const float SliderJoint::BETA = float(0.2);
|
const float SliderJoint::BETA = float(0.2);
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/engine/ConstraintSolver.h>
|
#include <ephysics/engine/ConstraintSolver.hpp>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure SliderJointInfo
|
// Structure SliderJointInfo
|
||||||
/**
|
/**
|
@ -5,11 +5,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/engine/CollisionWorld.h>
|
#include <ephysics/engine/CollisionWorld.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
// Namespaces
|
// Namespaces
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
@ -44,7 +44,7 @@ CollisionBody* CollisionWorld::createCollisionBody(const etk::Transform3D& trans
|
|||||||
bodyindex bodyID = computeNextAvailableBodyID();
|
bodyindex bodyID = computeNextAvailableBodyID();
|
||||||
|
|
||||||
// Largest index cannot be used (it is used for invalid index)
|
// 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
|
// Create the collision body
|
||||||
CollisionBody* collisionBody = new (m_memoryAllocator.allocate(sizeof(CollisionBody)))
|
CollisionBody* collisionBody = new (m_memoryAllocator.allocate(sizeof(CollisionBody)))
|
||||||
|
@ -10,19 +10,19 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <ephysics/body/CollisionBody.h>
|
#include <ephysics/body/CollisionBody.hpp>
|
||||||
#include <ephysics/collision/RaycastInfo.h>
|
#include <ephysics/collision/RaycastInfo.hpp>
|
||||||
#include <ephysics/engine/OverlappingPair.h>
|
#include <ephysics/engine/OverlappingPair.hpp>
|
||||||
#include <ephysics/collision/CollisionDetection.h>
|
#include <ephysics/collision/CollisionDetection.hpp>
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/memory/MemoryAllocator.h>
|
#include <ephysics/memory/MemoryAllocator.hpp>
|
||||||
#include <ephysics/engine/EventListener.h>
|
#include <ephysics/engine/EventListener.hpp>
|
||||||
|
|
||||||
/// Namespace reactphysics3d
|
/// Namespace ephysics
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Declarations
|
// Declarations
|
||||||
class CollisionCallback;
|
class CollisionCallback;
|
@ -5,10 +5,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/engine/ConstraintSolver.h>
|
#include <ephysics/engine/ConstraintSolver.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ConstraintSolver::ConstraintSolver(const std::map<RigidBody*, uint32_t>& mapBodyToVelocityIndex)
|
ConstraintSolver::ConstraintSolver(const std::map<RigidBody*, uint32_t>& mapBodyToVelocityIndex)
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/mathematics/mathematics.h>
|
#include <ephysics/mathematics/mathematics.hpp>
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/engine/Island.h>
|
#include <ephysics/engine/Island.hpp>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
// Structure ConstraintSolverData
|
// Structure ConstraintSolverData
|
||||||
/**
|
/**
|
@ -5,13 +5,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/engine/ContactSolver.h>
|
#include <ephysics/engine/ContactSolver.hpp>
|
||||||
#include <ephysics/engine/DynamicsWorld.h>
|
#include <ephysics/engine/DynamicsWorld.hpp>
|
||||||
#include <ephysics/body/RigidBody.h>
|
#include <ephysics/body/RigidBody.hpp>
|
||||||
#include <ephysics/engine/Profiler.h>
|
#include <ephysics/engine/Profiler.hpp>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Constants initialization
|
// Constants initialization
|
||||||
|
@ -6,17 +6,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/constraint/ContactPoint.h>
|
#include <ephysics/constraint/ContactPoint.hpp>
|
||||||
#include <ephysics/configuration.h>
|
#include <ephysics/configuration.hpp>
|
||||||
#include <ephysics/constraint/Joint.h>
|
#include <ephysics/constraint/Joint.hpp>
|
||||||
#include <ephysics/collision/ContactManifold.h>
|
#include <ephysics/collision/ContactManifold.hpp>
|
||||||
#include <ephysics/engine/Island.h>
|
#include <ephysics/engine/Island.hpp>
|
||||||
#include <ephysics/engine/Impulse.h>
|
#include <ephysics/engine/Impulse.hpp>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
/// ReactPhysics3D namespace
|
/// ReactPhysics3D namespace
|
||||||
namespace reactphysics3d {
|
namespace ephysics {
|
||||||
|
|
||||||
|
|
||||||
// Class Contact Solver
|
// Class Contact Solver
|
@ -5,14 +5,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
#include <ephysics/engine/DynamicsWorld.h>
|
#include <ephysics/engine/DynamicsWorld.hpp>
|
||||||
#include <ephysics/constraint/BallAndSocketJoint.h>
|
#include <ephysics/constraint/BallAndSocketJoint.hpp>
|
||||||
#include <ephysics/constraint/SliderJoint.h>
|
#include <ephysics/constraint/SliderJoint.hpp>
|
||||||
#include <ephysics/constraint/HingeJoint.h>
|
#include <ephysics/constraint/HingeJoint.hpp>
|
||||||
#include <ephysics/constraint/FixedJoint.h>
|
#include <ephysics/constraint/FixedJoint.hpp>
|
||||||
|
|
||||||
// Namespaces
|
// Namespaces
|
||||||
using namespace reactphysics3d;
|
using namespace ephysics;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
@ -432,7 +432,7 @@ RigidBody* DynamicsWorld::createRigidBody(const etk::Transform3D& transform) {
|
|||||||
bodyindex bodyID = computeNextAvailableBodyID();
|
bodyindex bodyID = computeNextAvailableBodyID();
|
||||||
|
|
||||||
// Largest index cannot be used (it is used for invalid index)
|
// 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
|
// Create the rigid body
|
||||||
RigidBody* rigidBody = new (m_memoryAllocator.allocate(sizeof(RigidBody))) RigidBody(transform,
|
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
Loading…
x
Reference in New Issue
Block a user