LiquidFun
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
b2TimeStep.h
1 /*
2 * Copyright (c) 2006-2011 Erin Catto http://www.box2d.org
3 * Copyright (c) 2014 Google, Inc.
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 * Permission is granted to anyone to use this software for any purpose,
9 * including commercial applications, and to alter it and redistribute it
10 * freely, subject to the following restrictions:
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
15 * 2. Altered source versions must be plainly marked as such, and must not be
16 * misrepresented as being the original software.
17 * 3. This notice may not be removed or altered from any source distribution.
18 */
19 
20 #ifndef B2_TIME_STEP_H
21 #define B2_TIME_STEP_H
22 
23 #include <Box2D/Common/b2Math.h>
24 
26 struct b2Profile
27 {
28  float32 step;
29  float32 collide;
30  float32 solve;
31  float32 solveInit;
32  float32 solveVelocity;
33  float32 solvePosition;
34  float32 broadphase;
35  float32 solveTOI;
36 };
37 
39 struct b2TimeStep
40 {
41  float32 dt; // time step
42  float32 inv_dt; // inverse time step (0 if dt == 0).
43  float32 dtRatio; // dt * inv_dt0
44  int32 velocityIterations;
45  int32 positionIterations;
46  int32 particleIterations;
47  bool warmStarting;
48 };
49 
51 struct b2Position
52 {
53  b2Vec2 c;
54  float32 a;
55 };
56 
58 struct b2Velocity
59 {
60  b2Vec2 v;
61  float32 w;
62 };
63 
66 {
67  b2TimeStep step;
68  b2Position* positions;
69  b2Velocity* velocities;
70 };
71 
72 #endif
Profiling data. Times are in milliseconds.
Definition: b2TimeStep.h:26
This is an internal structure.
Definition: b2TimeStep.h:51
Solver Data.
Definition: b2TimeStep.h:65
This is an internal structure.
Definition: b2TimeStep.h:39
This is an internal structure.
Definition: b2TimeStep.h:58
A 2D column vector.
Definition: b2Math.h:56