Merge branch 'develop' of https://code.google.com/p/reactphysics3d into develop

This commit is contained in:
Daniel Chappuis 2013-10-06 18:46:58 +02:00
commit 0cc8b592ff
7 changed files with 33 additions and 14 deletions

View File

@ -4,8 +4,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Project configuration # Project configuration
PROJECT(REACTPHYSICS3D) PROJECT(REACTPHYSICS3D)
# Default build type
SET(CMAKE_BUILD_TYPE "Debug")
# Where to build the library # Where to build the library
SET(LIBRARY_OUTPUT_PATH lib/) SET(LIBRARY_OUTPUT_PATH "lib")
# Where to build the executables
SET(OUR_EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin")
# Options # Options
OPTION(COMPILE_EXAMPLES "Select this if you want to build the examples" OFF) OPTION(COMPILE_EXAMPLES "Select this if you want to build the examples" OFF)

View File

@ -1 +1 @@
0.3.0 0.4.0

View File

@ -4,8 +4,11 @@ cmake_minimum_required(VERSION 2.6)
# Project configuration # Project configuration
PROJECT(CollisionShapes) PROJECT(CollisionShapes)
# Where to build the executable # Where to build the executables
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/collisionshapes/) SET(EXECUTABLE_OUTPUT_PATH "${OUR_EXECUTABLE_OUTPUT_PATH}/collisionshapes")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${EXECUTABLE_OUTPUT_PATH})
# Copy the shaders used for the demo into the build directory # Copy the shaders used for the demo into the build directory
FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/") FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/")

View File

@ -4,8 +4,11 @@ cmake_minimum_required(VERSION 2.6)
# Project configuration # Project configuration
PROJECT(Cubes) PROJECT(Cubes)
# Where to build the executable # Where to build the executables
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/cubes/) SET(EXECUTABLE_OUTPUT_PATH "${OUR_EXECUTABLE_OUTPUT_PATH}/cubes")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${EXECUTABLE_OUTPUT_PATH})
# Copy the shaders used for the demo into the build directory # Copy the shaders used for the demo into the build directory
FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/") FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/")

View File

@ -4,8 +4,11 @@ cmake_minimum_required(VERSION 2.6)
# Project configuration # Project configuration
PROJECT(Joints) PROJECT(Joints)
# Where to build the executable # Where to build the executables
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/joints/) SET(EXECUTABLE_OUTPUT_PATH "${OUR_EXECUTABLE_OUTPUT_PATH}/joints")
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${EXECUTABLE_OUTPUT_PATH})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${EXECUTABLE_OUTPUT_PATH})
# Copy the shaders used for the demo into the build directory # Copy the shaders used for the demo into the build directory
FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/") FILE(COPY "${OPENGLFRAMEWORK_DIR}/src/shaders/" DESTINATION "${EXECUTABLE_OUTPUT_PATH}/shaders/")

View File

@ -188,7 +188,7 @@ class RigidBody : public CollisionBody {
/// Apply an external force to the body at its gravity center. /// Apply an external force to the body at its gravity center.
void applyForceToCenter(const Vector3& force); void applyForceToCenter(const Vector3& force);
/// Apply an external force to the body at a given point (in world-coordinates). /// Apply an external force to the body at a given point (in world-space coordinates).
void applyForce(const Vector3& force, const Vector3& point); void applyForce(const Vector3& force, const Vector3& point);
/// Apply an external torque to the body. /// Apply an external torque to the body.
@ -361,7 +361,7 @@ inline void RigidBody::applyForceToCenter(const Vector3& force) {
mExternalForce += force; mExternalForce += force;
} }
// Apply an external force to the body at a given point (in world-coordinates). // Apply an external force to the body at a given point (in world-space coordinates).
/// If the point is not at the center of gravity of the body, it will also /// If the point is not at the center of gravity of the body, it will also
/// generate some torque and therefore, change the angular velocity of the body. /// generate some torque and therefore, change the angular velocity of the body.
/// If the body is sleeping, calling this method will wake it up. Note that the /// If the body is sleeping, calling this method will wake it up. Note that the

View File

@ -66,13 +66,13 @@ class Material {
/// Return the bounciness /// Return the bounciness
decimal getBounciness() const; decimal getBounciness() const;
/// Set the bounciness /// Set the bounciness.
void setBounciness(decimal bounciness); void setBounciness(decimal bounciness);
/// Return the friction coefficient /// Return the friction coefficient
decimal getFrictionCoefficient() const; decimal getFrictionCoefficient() const;
/// Set the friction coefficient /// Set the friction coefficient.
void setFrictionCoefficient(decimal frictionCoefficient); void setFrictionCoefficient(decimal frictionCoefficient);
/// Overloaded assignment operator /// Overloaded assignment operator
@ -84,7 +84,9 @@ inline decimal Material::getBounciness() const {
return mBounciness; return mBounciness;
} }
// Set the bounciness // Set the bounciness.
/// The bounciness should be a value between 0 and 1. The value 1 is used for a
/// very bouncy body and zero is used for a body that is not bouncy at all.
inline void Material::setBounciness(decimal bounciness) { inline void Material::setBounciness(decimal bounciness) {
assert(bounciness >= decimal(0.0) && bounciness <= decimal(1.0)); assert(bounciness >= decimal(0.0) && bounciness <= decimal(1.0));
mBounciness = bounciness; mBounciness = bounciness;
@ -95,7 +97,9 @@ inline decimal Material::getFrictionCoefficient() const {
return mFrictionCoefficient; return mFrictionCoefficient;
} }
// Set the friction coefficient // Set the friction coefficient.
/// The friction coefficient has to be a positive value. The value zero is used for no
/// friction at all.
inline void Material::setFrictionCoefficient(decimal frictionCoefficient) { inline void Material::setFrictionCoefficient(decimal frictionCoefficient) {
assert(frictionCoefficient >= decimal(0.0)); assert(frictionCoefficient >= decimal(0.0));
mFrictionCoefficient = frictionCoefficient; mFrictionCoefficient = frictionCoefficient;