mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Updated to Box2D 2.2, added new joints, some other updates to match the API changes (still plenty more to go though)
--HG-- branch : box2d-update
This commit is contained in:
Regular → Executable
+45
-10
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.com
|
||||
* Copyright (c) 2006-2011 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
|
||||
@@ -19,17 +19,52 @@
|
||||
#ifndef B2_TIME_STEP_H
|
||||
#define B2_TIME_STEP_H
|
||||
|
||||
#include <Box2D/Common/b2Settings.h>
|
||||
#include <Box2D/Common/b2Math.h>
|
||||
|
||||
/// This is an internal structure.
|
||||
struct b2TimeStep
|
||||
/// Profiling data. Times are in milliseconds.
|
||||
struct b2Profile
|
||||
{
|
||||
float32 dt; // time step
|
||||
float32 inv_dt; // inverse time step (0 if dt == 0).
|
||||
float32 dtRatio; // dt * inv_dt0
|
||||
int32 velocityIterations;
|
||||
int32 positionIterations;
|
||||
bool warmStarting;
|
||||
float32 step;
|
||||
float32 collide;
|
||||
float32 solve;
|
||||
float32 solveInit;
|
||||
float32 solveVelocity;
|
||||
float32 solvePosition;
|
||||
float32 broadphase;
|
||||
float32 solveTOI;
|
||||
};
|
||||
|
||||
/// This is an internal structure.
|
||||
struct b2TimeStep
|
||||
{
|
||||
float32 dt; // time step
|
||||
float32 inv_dt; // inverse time step (0 if dt == 0).
|
||||
float32 dtRatio; // dt * inv_dt0
|
||||
int32 velocityIterations;
|
||||
int32 positionIterations;
|
||||
bool warmStarting;
|
||||
};
|
||||
|
||||
/// This is an internal structure.
|
||||
struct b2Position
|
||||
{
|
||||
b2Vec2 c;
|
||||
float32 a;
|
||||
};
|
||||
|
||||
/// This is an internal structure.
|
||||
struct b2Velocity
|
||||
{
|
||||
b2Vec2 v;
|
||||
float32 w;
|
||||
};
|
||||
|
||||
/// Solver Data
|
||||
struct b2SolverData
|
||||
{
|
||||
b2TimeStep step;
|
||||
b2Position* positions;
|
||||
b2Velocity* velocities;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user