-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,254 changed files
with
253,232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org | ||
* | ||
* This software is provided 'as-is', without any express or implied | ||
* warranty. In no event will the authors be held liable for any damages | ||
* arising from the use of this software. | ||
* Permission is granted to anyone to use this software for any purpose, | ||
* including commercial applications, and to alter it and redistribute it | ||
* freely, subject to the following restrictions: | ||
* 1. The origin of this software must not be misrepresented; you must not | ||
* claim that you wrote the original software. If you use this software | ||
* in a product, an acknowledgment in the product documentation would be | ||
* appreciated but is not required. | ||
* 2. Altered source versions must be plainly marked as such, and must not be | ||
* misrepresented as being the original software. | ||
* 3. This notice may not be removed or altered from any source distribution. | ||
*/ | ||
|
||
#ifndef BOX2D_H | ||
#define BOX2D_H | ||
|
||
/** | ||
\mainpage Box2D API Documentation | ||
\section intro_sec Getting Started | ||
For documentation please see http://box2d.org/documentation.html | ||
For discussion please visit http://box2d.org/forum | ||
*/ | ||
|
||
// These include files constitute the main Box2D API | ||
|
||
#include <Box2D/Common/b2Settings.h> | ||
#include <Box2D/Common/b2Draw.h> | ||
#include <Box2D/Common/b2Timer.h> | ||
|
||
#include <Box2D/Collision/Shapes/b2CircleShape.h> | ||
#include <Box2D/Collision/Shapes/b2EdgeShape.h> | ||
#include <Box2D/Collision/Shapes/b2ChainShape.h> | ||
#include <Box2D/Collision/Shapes/b2PolygonShape.h> | ||
|
||
#include <Box2D/Collision/b2BroadPhase.h> | ||
#include <Box2D/Collision/b2Distance.h> | ||
#include <Box2D/Collision/b2DynamicTree.h> | ||
#include <Box2D/Collision/b2TimeOfImpact.h> | ||
|
||
#include <Box2D/Dynamics/b2Body.h> | ||
#include <Box2D/Dynamics/b2Fixture.h> | ||
#include <Box2D/Dynamics/b2WorldCallbacks.h> | ||
#include <Box2D/Dynamics/b2TimeStep.h> | ||
#include <Box2D/Dynamics/b2World.h> | ||
|
||
#include <Box2D/Dynamics/Contacts/b2Contact.h> | ||
|
||
#include <Box2D/Dynamics/Joints/b2DistanceJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2FrictionJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2GearJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2WheelJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2MouseJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2PulleyJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2RopeJoint.h> | ||
#include <Box2D/Dynamics/Joints/b2WeldJoint.h> | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
include(${SELF_DIR}/Box2D-targets.cmake) | ||
get_filename_component(Box2D_INCLUDE_DIRS "${SELF_DIR}/../../include" ABSOLUTE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
set(BOX2D_Collision_SRCS | ||
Collision/b2BroadPhase.cpp | ||
Collision/b2CollideCircle.cpp | ||
Collision/b2CollideEdge.cpp | ||
Collision/b2CollidePolygon.cpp | ||
Collision/b2Collision.cpp | ||
Collision/b2Distance.cpp | ||
Collision/b2DynamicTree.cpp | ||
Collision/b2TimeOfImpact.cpp | ||
) | ||
set(BOX2D_Collision_HDRS | ||
Collision/b2BroadPhase.h | ||
Collision/b2Collision.h | ||
Collision/b2Distance.h | ||
Collision/b2DynamicTree.h | ||
Collision/b2TimeOfImpact.h | ||
) | ||
set(BOX2D_Shapes_SRCS | ||
Collision/Shapes/b2CircleShape.cpp | ||
Collision/Shapes/b2EdgeShape.cpp | ||
Collision/Shapes/b2ChainShape.cpp | ||
Collision/Shapes/b2PolygonShape.cpp | ||
) | ||
set(BOX2D_Shapes_HDRS | ||
Collision/Shapes/b2CircleShape.h | ||
Collision/Shapes/b2EdgeShape.h | ||
Collision/Shapes/b2ChainShape.h | ||
Collision/Shapes/b2PolygonShape.h | ||
Collision/Shapes/b2Shape.h | ||
) | ||
set(BOX2D_Common_SRCS | ||
Common/b2BlockAllocator.cpp | ||
Common/b2Draw.cpp | ||
Common/b2Math.cpp | ||
Common/b2Settings.cpp | ||
Common/b2StackAllocator.cpp | ||
Common/b2Timer.cpp | ||
) | ||
set(BOX2D_Common_HDRS | ||
Common/b2BlockAllocator.h | ||
Common/b2Draw.h | ||
Common/b2GrowableStack.h | ||
Common/b2Math.h | ||
Common/b2Settings.h | ||
Common/b2StackAllocator.h | ||
Common/b2Timer.h | ||
) | ||
set(BOX2D_Dynamics_SRCS | ||
Dynamics/b2Body.cpp | ||
Dynamics/b2ContactManager.cpp | ||
Dynamics/b2Fixture.cpp | ||
Dynamics/b2Island.cpp | ||
Dynamics/b2World.cpp | ||
Dynamics/b2WorldCallbacks.cpp | ||
) | ||
set(BOX2D_Dynamics_HDRS | ||
Dynamics/b2Body.h | ||
Dynamics/b2ContactManager.h | ||
Dynamics/b2Fixture.h | ||
Dynamics/b2Island.h | ||
Dynamics/b2TimeStep.h | ||
Dynamics/b2World.h | ||
Dynamics/b2WorldCallbacks.h | ||
) | ||
set(BOX2D_Contacts_SRCS | ||
Dynamics/Contacts/b2CircleContact.cpp | ||
Dynamics/Contacts/b2Contact.cpp | ||
Dynamics/Contacts/b2ContactSolver.cpp | ||
Dynamics/Contacts/b2PolygonAndCircleContact.cpp | ||
Dynamics/Contacts/b2EdgeAndCircleContact.cpp | ||
Dynamics/Contacts/b2EdgeAndPolygonContact.cpp | ||
Dynamics/Contacts/b2ChainAndCircleContact.cpp | ||
Dynamics/Contacts/b2ChainAndPolygonContact.cpp | ||
Dynamics/Contacts/b2PolygonContact.cpp | ||
) | ||
set(BOX2D_Contacts_HDRS | ||
Dynamics/Contacts/b2CircleContact.h | ||
Dynamics/Contacts/b2Contact.h | ||
Dynamics/Contacts/b2ContactSolver.h | ||
Dynamics/Contacts/b2PolygonAndCircleContact.h | ||
Dynamics/Contacts/b2EdgeAndCircleContact.h | ||
Dynamics/Contacts/b2EdgeAndPolygonContact.h | ||
Dynamics/Contacts/b2ChainAndCircleContact.h | ||
Dynamics/Contacts/b2ChainAndPolygonContact.h | ||
Dynamics/Contacts/b2PolygonContact.h | ||
) | ||
set(BOX2D_Joints_SRCS | ||
Dynamics/Joints/b2DistanceJoint.cpp | ||
Dynamics/Joints/b2FrictionJoint.cpp | ||
Dynamics/Joints/b2GearJoint.cpp | ||
Dynamics/Joints/b2Joint.cpp | ||
Dynamics/Joints/b2MouseJoint.cpp | ||
Dynamics/Joints/b2PrismaticJoint.cpp | ||
Dynamics/Joints/b2PulleyJoint.cpp | ||
Dynamics/Joints/b2RevoluteJoint.cpp | ||
Dynamics/Joints/b2RopeJoint.cpp | ||
Dynamics/Joints/b2WeldJoint.cpp | ||
Dynamics/Joints/b2WheelJoint.cpp | ||
) | ||
set(BOX2D_Joints_HDRS | ||
Dynamics/Joints/b2DistanceJoint.h | ||
Dynamics/Joints/b2FrictionJoint.h | ||
Dynamics/Joints/b2GearJoint.h | ||
Dynamics/Joints/b2Joint.h | ||
Dynamics/Joints/b2MouseJoint.h | ||
Dynamics/Joints/b2PrismaticJoint.h | ||
Dynamics/Joints/b2PulleyJoint.h | ||
Dynamics/Joints/b2RevoluteJoint.h | ||
Dynamics/Joints/b2RopeJoint.h | ||
Dynamics/Joints/b2WeldJoint.h | ||
Dynamics/Joints/b2WheelJoint.h | ||
) | ||
set(BOX2D_Rope_SRCS | ||
Rope/b2Rope.cpp | ||
) | ||
set(BOX2D_Rope_HDRS | ||
Rope/b2Rope.h | ||
) | ||
set(BOX2D_General_HDRS | ||
Box2D.h | ||
) | ||
include_directories( ../ ) | ||
|
||
if(BOX2D_BUILD_SHARED) | ||
add_library(Box2D_shared SHARED | ||
${BOX2D_General_HDRS} | ||
${BOX2D_Joints_SRCS} | ||
${BOX2D_Joints_HDRS} | ||
${BOX2D_Contacts_SRCS} | ||
${BOX2D_Contacts_HDRS} | ||
${BOX2D_Dynamics_SRCS} | ||
${BOX2D_Dynamics_HDRS} | ||
${BOX2D_Common_SRCS} | ||
${BOX2D_Common_HDRS} | ||
${BOX2D_Shapes_SRCS} | ||
${BOX2D_Shapes_HDRS} | ||
${BOX2D_Collision_SRCS} | ||
${BOX2D_Collision_HDRS} | ||
${BOX2D_Rope_SRCS} | ||
${BOX2D_Rope_HDRS} | ||
) | ||
set_target_properties(Box2D_shared PROPERTIES | ||
OUTPUT_NAME "Box2D" | ||
CLEAN_DIRECT_OUTPUT 1 | ||
VERSION ${BOX2D_VERSION} | ||
) | ||
endif() | ||
|
||
if(BOX2D_BUILD_STATIC) | ||
add_library(Box2D STATIC | ||
${BOX2D_General_HDRS} | ||
${BOX2D_Joints_SRCS} | ||
${BOX2D_Joints_HDRS} | ||
${BOX2D_Contacts_SRCS} | ||
${BOX2D_Contacts_HDRS} | ||
${BOX2D_Dynamics_SRCS} | ||
${BOX2D_Dynamics_HDRS} | ||
${BOX2D_Common_SRCS} | ||
${BOX2D_Common_HDRS} | ||
${BOX2D_Shapes_SRCS} | ||
${BOX2D_Shapes_HDRS} | ||
${BOX2D_Collision_SRCS} | ||
${BOX2D_Collision_HDRS} | ||
${BOX2D_Rope_SRCS} | ||
${BOX2D_Rope_HDRS} | ||
) | ||
set_target_properties(Box2D PROPERTIES | ||
CLEAN_DIRECT_OUTPUT 1 | ||
VERSION ${BOX2D_VERSION} | ||
) | ||
endif() | ||
|
||
# These are used to create visual studio folders. | ||
source_group(Collision FILES ${BOX2D_Collision_SRCS} ${BOX2D_Collision_HDRS}) | ||
source_group(Collision\\Shapes FILES ${BOX2D_Shapes_SRCS} ${BOX2D_Shapes_HDRS}) | ||
source_group(Common FILES ${BOX2D_Common_SRCS} ${BOX2D_Common_HDRS}) | ||
source_group(Dynamics FILES ${BOX2D_Dynamics_SRCS} ${BOX2D_Dynamics_HDRS}) | ||
source_group(Dynamics\\Contacts FILES ${BOX2D_Contacts_SRCS} ${BOX2D_Contacts_HDRS}) | ||
source_group(Dynamics\\Joints FILES ${BOX2D_Joints_SRCS} ${BOX2D_Joints_HDRS}) | ||
source_group(Include FILES ${BOX2D_General_HDRS}) | ||
source_group(Rope FILES ${BOX2D_Rope_SRCS} ${BOX2D_Rope_HDRS}) | ||
|
||
if(BOX2D_INSTALL) | ||
# install headers | ||
install(FILES ${BOX2D_General_HDRS} DESTINATION include/Box2D) | ||
install(FILES ${BOX2D_Collision_HDRS} DESTINATION include/Box2D/Collision) | ||
install(FILES ${BOX2D_Shapes_HDRS} DESTINATION include/Box2D/Collision/Shapes) | ||
install(FILES ${BOX2D_Common_HDRS} DESTINATION include/Box2D/Common) | ||
install(FILES ${BOX2D_Dynamics_HDRS} DESTINATION include/Box2D/Dynamics) | ||
install(FILES ${BOX2D_Contacts_HDRS} DESTINATION include/Box2D/Dynamics/Contacts) | ||
install(FILES ${BOX2D_Joints_HDRS} DESTINATION include/Box2D/Dynamics/Joints) | ||
install(FILES ${BOX2D_Rope_HDRS} DESTINATION include/Box2D/Rope) | ||
|
||
# install libraries | ||
if(BOX2D_BUILD_SHARED) | ||
install(TARGETS Box2D_shared EXPORT Box2D-targets DESTINATION lib) | ||
endif() | ||
if(BOX2D_BUILD_STATIC) | ||
install(TARGETS Box2D EXPORT Box2D-targets DESTINATION lib) | ||
endif() | ||
|
||
# install build system hooks for third-party apps | ||
install(EXPORT Box2D-targets DESTINATION lib/Box2D) | ||
install(FILES Box2DConfig.cmake DESTINATION lib/Box2D) | ||
endif(BOX2D_INSTALL) |
Oops, something went wrong.