Skip to content

Commit eb66f69

Browse files
committed
add build project for VS2013
1 parent 4d2b393 commit eb66f69

File tree

171 files changed

+32823
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+32823
-9
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Debug
2+
Release

build/VS2013/extlibs/bin/Box2D.lib

1.71 MB
Binary file not shown.
668 KB
Binary file not shown.
1.21 MB
Binary file not shown.
120 KB
Binary file not shown.
120 KB
Binary file not shown.
42.5 KB
Binary file not shown.
169 KB
Binary file not shown.
39.6 KB
Binary file not shown.
39.3 KB
Binary file not shown.
76 KB
Binary file not shown.
254 KB
Binary file not shown.
27.8 KB
Binary file not shown.
27.7 KB
Binary file not shown.

build/VS2013/extlibs/bin/zlibstat.lib

671 KB
Binary file not shown.

build/VS2013/extlibs/bin/zlibwapi.dll

167 KB
Binary file not shown.

build/VS2013/extlibs/bin/zlibwapi.lib

26.1 KB
Binary file not shown.
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
3+
*
4+
* This software is provided 'as-is', without any express or implied
5+
* warranty. In no event will the authors be held liable for any damages
6+
* arising from the use of this software.
7+
* Permission is granted to anyone to use this software for any purpose,
8+
* including commercial applications, and to alter it and redistribute it
9+
* freely, subject to the following restrictions:
10+
* 1. The origin of this software must not be misrepresented; you must not
11+
* claim that you wrote the original software. If you use this software
12+
* in a product, an acknowledgment in the product documentation would be
13+
* appreciated but is not required.
14+
* 2. Altered source versions must be plainly marked as such, and must not be
15+
* misrepresented as being the original software.
16+
* 3. This notice may not be removed or altered from any source distribution.
17+
*/
18+
19+
#ifndef BOX2D_H
20+
#define BOX2D_H
21+
22+
/**
23+
\mainpage Box2D API Documentation
24+
25+
\section intro_sec Getting Started
26+
27+
For documentation please see http://box2d.org/documentation.html
28+
29+
For discussion please visit http://box2d.org/forum
30+
*/
31+
32+
// These include files constitute the main Box2D API
33+
34+
#include <Box2D/Common/b2Settings.h>
35+
#include <Box2D/Common/b2Draw.h>
36+
#include <Box2D/Common/b2Timer.h>
37+
38+
#include <Box2D/Collision/Shapes/b2CircleShape.h>
39+
#include <Box2D/Collision/Shapes/b2EdgeShape.h>
40+
#include <Box2D/Collision/Shapes/b2ChainShape.h>
41+
#include <Box2D/Collision/Shapes/b2PolygonShape.h>
42+
43+
#include <Box2D/Collision/b2BroadPhase.h>
44+
#include <Box2D/Collision/b2Distance.h>
45+
#include <Box2D/Collision/b2DynamicTree.h>
46+
#include <Box2D/Collision/b2TimeOfImpact.h>
47+
48+
#include <Box2D/Dynamics/b2Body.h>
49+
#include <Box2D/Dynamics/b2Fixture.h>
50+
#include <Box2D/Dynamics/b2WorldCallbacks.h>
51+
#include <Box2D/Dynamics/b2TimeStep.h>
52+
#include <Box2D/Dynamics/b2World.h>
53+
54+
#include <Box2D/Dynamics/Contacts/b2Contact.h>
55+
56+
#include <Box2D/Dynamics/Joints/b2DistanceJoint.h>
57+
#include <Box2D/Dynamics/Joints/b2FrictionJoint.h>
58+
#include <Box2D/Dynamics/Joints/b2GearJoint.h>
59+
#include <Box2D/Dynamics/Joints/b2MotorJoint.h>
60+
#include <Box2D/Dynamics/Joints/b2MouseJoint.h>
61+
#include <Box2D/Dynamics/Joints/b2PrismaticJoint.h>
62+
#include <Box2D/Dynamics/Joints/b2PulleyJoint.h>
63+
#include <Box2D/Dynamics/Joints/b2RevoluteJoint.h>
64+
#include <Box2D/Dynamics/Joints/b2RopeJoint.h>
65+
#include <Box2D/Dynamics/Joints/b2WeldJoint.h>
66+
#include <Box2D/Dynamics/Joints/b2WheelJoint.h>
67+
68+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/*
2+
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
3+
*
4+
* This software is provided 'as-is', without any express or implied
5+
* warranty. In no event will the authors be held liable for any damages
6+
* arising from the use of this software.
7+
* Permission is granted to anyone to use this software for any purpose,
8+
* including commercial applications, and to alter it and redistribute it
9+
* freely, subject to the following restrictions:
10+
* 1. The origin of this software must not be misrepresented; you must not
11+
* claim that you wrote the original software. If you use this software
12+
* in a product, an acknowledgment in the product documentation would be
13+
* appreciated but is not required.
14+
* 2. Altered source versions must be plainly marked as such, and must not be
15+
* misrepresented as being the original software.
16+
* 3. This notice may not be removed or altered from any source distribution.
17+
*/
18+
19+
#ifndef B2_CHAIN_SHAPE_H
20+
#define B2_CHAIN_SHAPE_H
21+
22+
#include <Box2D/Collision/Shapes/b2Shape.h>
23+
24+
class b2EdgeShape;
25+
26+
/// A chain shape is a free form sequence of line segments.
27+
/// The chain has two-sided collision, so you can use inside and outside collision.
28+
/// Therefore, you may use any winding order.
29+
/// Since there may be many vertices, they are allocated using b2Alloc.
30+
/// Connectivity information is used to create smooth collisions.
31+
/// WARNING: The chain will not collide properly if there are self-intersections.
32+
class b2ChainShape : public b2Shape
33+
{
34+
public:
35+
b2ChainShape();
36+
37+
/// The destructor frees the vertices using b2Free.
38+
~b2ChainShape();
39+
40+
/// Clear all data.
41+
void Clear();
42+
43+
/// Create a loop. This automatically adjusts connectivity.
44+
/// @param vertices an array of vertices, these are copied
45+
/// @param count the vertex count
46+
void CreateLoop(const b2Vec2* vertices, int32 count);
47+
48+
/// Create a chain with isolated end vertices.
49+
/// @param vertices an array of vertices, these are copied
50+
/// @param count the vertex count
51+
void CreateChain(const b2Vec2* vertices, int32 count);
52+
53+
/// Establish connectivity to a vertex that precedes the first vertex.
54+
/// Don't call this for loops.
55+
void SetPrevVertex(const b2Vec2& prevVertex);
56+
57+
/// Establish connectivity to a vertex that follows the last vertex.
58+
/// Don't call this for loops.
59+
void SetNextVertex(const b2Vec2& nextVertex);
60+
61+
/// Implement b2Shape. Vertices are cloned using b2Alloc.
62+
b2Shape* Clone(b2BlockAllocator* allocator) const;
63+
64+
/// @see b2Shape::GetChildCount
65+
int32 GetChildCount() const;
66+
67+
/// Get a child edge.
68+
void GetChildEdge(b2EdgeShape* edge, int32 index) const;
69+
70+
/// This always return false.
71+
/// @see b2Shape::TestPoint
72+
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
73+
74+
/// Implement b2Shape.
75+
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
76+
const b2Transform& transform, int32 childIndex) const;
77+
78+
/// @see b2Shape::ComputeAABB
79+
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
80+
81+
/// Chains have zero mass.
82+
/// @see b2Shape::ComputeMass
83+
void ComputeMass(b2MassData* massData, float32 density) const;
84+
85+
/// The vertices. Owned by this class.
86+
b2Vec2* m_vertices;
87+
88+
/// The vertex count.
89+
int32 m_count;
90+
91+
b2Vec2 m_prevVertex, m_nextVertex;
92+
bool m_hasPrevVertex, m_hasNextVertex;
93+
};
94+
95+
inline b2ChainShape::b2ChainShape()
96+
{
97+
m_type = e_chain;
98+
m_radius = b2_polygonRadius;
99+
m_vertices = NULL;
100+
m_count = 0;
101+
m_hasPrevVertex = false;
102+
m_hasNextVertex = false;
103+
}
104+
105+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
3+
*
4+
* This software is provided 'as-is', without any express or implied
5+
* warranty. In no event will the authors be held liable for any damages
6+
* arising from the use of this software.
7+
* Permission is granted to anyone to use this software for any purpose,
8+
* including commercial applications, and to alter it and redistribute it
9+
* freely, subject to the following restrictions:
10+
* 1. The origin of this software must not be misrepresented; you must not
11+
* claim that you wrote the original software. If you use this software
12+
* in a product, an acknowledgment in the product documentation would be
13+
* appreciated but is not required.
14+
* 2. Altered source versions must be plainly marked as such, and must not be
15+
* misrepresented as being the original software.
16+
* 3. This notice may not be removed or altered from any source distribution.
17+
*/
18+
19+
#ifndef B2_CIRCLE_SHAPE_H
20+
#define B2_CIRCLE_SHAPE_H
21+
22+
#include <Box2D/Collision/Shapes/b2Shape.h>
23+
24+
/// A circle shape.
25+
class b2CircleShape : public b2Shape
26+
{
27+
public:
28+
b2CircleShape();
29+
30+
/// Implement b2Shape.
31+
b2Shape* Clone(b2BlockAllocator* allocator) const;
32+
33+
/// @see b2Shape::GetChildCount
34+
int32 GetChildCount() const;
35+
36+
/// Implement b2Shape.
37+
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
38+
39+
/// Implement b2Shape.
40+
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
41+
const b2Transform& transform, int32 childIndex) const;
42+
43+
/// @see b2Shape::ComputeAABB
44+
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
45+
46+
/// @see b2Shape::ComputeMass
47+
void ComputeMass(b2MassData* massData, float32 density) const;
48+
49+
/// Get the supporting vertex index in the given direction.
50+
int32 GetSupport(const b2Vec2& d) const;
51+
52+
/// Get the supporting vertex in the given direction.
53+
const b2Vec2& GetSupportVertex(const b2Vec2& d) const;
54+
55+
/// Get the vertex count.
56+
int32 GetVertexCount() const { return 1; }
57+
58+
/// Get a vertex by index. Used by b2Distance.
59+
const b2Vec2& GetVertex(int32 index) const;
60+
61+
/// Position
62+
b2Vec2 m_p;
63+
};
64+
65+
inline b2CircleShape::b2CircleShape()
66+
{
67+
m_type = e_circle;
68+
m_radius = 0.0f;
69+
m_p.SetZero();
70+
}
71+
72+
inline int32 b2CircleShape::GetSupport(const b2Vec2 &d) const
73+
{
74+
B2_NOT_USED(d);
75+
return 0;
76+
}
77+
78+
inline const b2Vec2& b2CircleShape::GetSupportVertex(const b2Vec2 &d) const
79+
{
80+
B2_NOT_USED(d);
81+
return m_p;
82+
}
83+
84+
inline const b2Vec2& b2CircleShape::GetVertex(int32 index) const
85+
{
86+
B2_NOT_USED(index);
87+
b2Assert(index == 0);
88+
return m_p;
89+
}
90+
91+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright (c) 2006-2010 Erin Catto http://www.box2d.org
3+
*
4+
* This software is provided 'as-is', without any express or implied
5+
* warranty. In no event will the authors be held liable for any damages
6+
* arising from the use of this software.
7+
* Permission is granted to anyone to use this software for any purpose,
8+
* including commercial applications, and to alter it and redistribute it
9+
* freely, subject to the following restrictions:
10+
* 1. The origin of this software must not be misrepresented; you must not
11+
* claim that you wrote the original software. If you use this software
12+
* in a product, an acknowledgment in the product documentation would be
13+
* appreciated but is not required.
14+
* 2. Altered source versions must be plainly marked as such, and must not be
15+
* misrepresented as being the original software.
16+
* 3. This notice may not be removed or altered from any source distribution.
17+
*/
18+
19+
#ifndef B2_EDGE_SHAPE_H
20+
#define B2_EDGE_SHAPE_H
21+
22+
#include <Box2D/Collision/Shapes/b2Shape.h>
23+
24+
/// A line segment (edge) shape. These can be connected in chains or loops
25+
/// to other edge shapes. The connectivity information is used to ensure
26+
/// correct contact normals.
27+
class b2EdgeShape : public b2Shape
28+
{
29+
public:
30+
b2EdgeShape();
31+
32+
/// Set this as an isolated edge.
33+
void Set(const b2Vec2& v1, const b2Vec2& v2);
34+
35+
/// Implement b2Shape.
36+
b2Shape* Clone(b2BlockAllocator* allocator) const;
37+
38+
/// @see b2Shape::GetChildCount
39+
int32 GetChildCount() const;
40+
41+
/// @see b2Shape::TestPoint
42+
bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
43+
44+
/// Implement b2Shape.
45+
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
46+
const b2Transform& transform, int32 childIndex) const;
47+
48+
/// @see b2Shape::ComputeAABB
49+
void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
50+
51+
/// @see b2Shape::ComputeMass
52+
void ComputeMass(b2MassData* massData, float32 density) const;
53+
54+
/// These are the edge vertices
55+
b2Vec2 m_vertex1, m_vertex2;
56+
57+
/// Optional adjacent vertices. These are used for smooth collision.
58+
b2Vec2 m_vertex0, m_vertex3;
59+
bool m_hasVertex0, m_hasVertex3;
60+
};
61+
62+
inline b2EdgeShape::b2EdgeShape()
63+
{
64+
m_type = e_edge;
65+
m_radius = b2_polygonRadius;
66+
m_vertex0.x = 0.0f;
67+
m_vertex0.y = 0.0f;
68+
m_vertex3.x = 0.0f;
69+
m_vertex3.y = 0.0f;
70+
m_hasVertex0 = false;
71+
m_hasVertex3 = false;
72+
}
73+
74+
#endif

0 commit comments

Comments
 (0)