externals
box2d
include
box2d
b2_time_step.h
Go to the documentation of this file.
1
// MIT License
2
3
// Copyright (c) 2019 Erin Catto
4
5
// Permission is hereby granted, free of charge, to any person obtaining a copy
6
// of this software and associated documentation files (the "Software"), to deal
7
// in the Software without restriction, including without limitation the rights
8
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
// copies of the Software, and to permit persons to whom the Software is
10
// furnished to do so, subject to the following conditions:
11
12
// The above copyright notice and this permission notice shall be included in all
13
// copies or substantial portions of the Software.
14
15
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
// SOFTWARE.
22
#ifndef B2_TIME_STEP_H
23
#define B2_TIME_STEP_H
24
25
#include "
b2_api.h
"
26
#include "
b2_math.h
"
27
29
struct
B2_API
b2Profile
30
{
31
float
step
;
32
float
collide
;
33
float
solve
;
34
float
solveInit
;
35
float
solveVelocity
;
36
float
solvePosition
;
37
float
broadphase
;
38
float
solveTOI
;
39
};
40
42
struct
B2_API
b2TimeStep
43
{
44
float
dt
;
// time step
45
float
inv_dt
;
// inverse time step (0 if dt == 0).
46
float
dtRatio
;
// dt * inv_dt0
47
int32
velocityIterations
;
48
int32
positionIterations
;
49
bool
warmStarting
;
50
};
51
53
struct
B2_API
b2Position
54
{
55
b2Vec2
c
;
56
float
a
;
57
};
58
60
struct
B2_API
b2Velocity
61
{
62
b2Vec2
v
;
63
float
w
;
64
};
65
67
struct
B2_API
b2SolverData
68
{
69
b2TimeStep
step
;
70
b2Position
*
positions
;
71
b2Velocity
*
velocities
;
72
};
73
74
#endif
b2Profile::collide
float collide
Definition:
b2_time_step.h:32
b2SolverData::velocities
b2Velocity * velocities
Definition:
b2_time_step.h:71
b2Velocity
This is an internal structure.
Definition:
b2_time_step.h:60
B2_API
#define B2_API
Definition:
b2_api.h:49
b2SolverData::step
b2TimeStep step
Definition:
b2_time_step.h:69
b2Profile::solve
float solve
Definition:
b2_time_step.h:33
b2Position::c
b2Vec2 c
Definition:
b2_time_step.h:55
b2Profile::solveVelocity
float solveVelocity
Definition:
b2_time_step.h:35
b2TimeStep
This is an internal structure.
Definition:
b2_time_step.h:42
b2SolverData
Solver Data.
Definition:
b2_time_step.h:67
b2Vec2
A 2D column vector.
Definition:
b2_math.h:41
int32
signed int int32
Definition:
b2_types.h:28
b2TimeStep::dt
float dt
Definition:
b2_time_step.h:44
b2Profile::solvePosition
float solvePosition
Definition:
b2_time_step.h:36
b2Velocity::v
b2Vec2 v
Definition:
b2_time_step.h:62
b2Profile
Profiling data. Times are in milliseconds.
Definition:
b2_time_step.h:29
b2Velocity::w
float w
Definition:
b2_time_step.h:63
b2_math.h
b2TimeStep::velocityIterations
int32 velocityIterations
Definition:
b2_time_step.h:47
b2_api.h
b2Profile::solveTOI
float solveTOI
Definition:
b2_time_step.h:38
b2Profile::solveInit
float solveInit
Definition:
b2_time_step.h:34
b2SolverData::positions
b2Position * positions
Definition:
b2_time_step.h:70
b2TimeStep::positionIterations
int32 positionIterations
Definition:
b2_time_step.h:48
b2TimeStep::inv_dt
float inv_dt
Definition:
b2_time_step.h:45
b2Profile::step
float step
Definition:
b2_time_step.h:31
b2Position::a
float a
Definition:
b2_time_step.h:56
b2Position
This is an internal structure.
Definition:
b2_time_step.h:53
b2TimeStep::warmStarting
bool warmStarting
Definition:
b2_time_step.h:49
b2TimeStep::dtRatio
float dtRatio
Definition:
b2_time_step.h:46
b2Profile::broadphase
float broadphase
Definition:
b2_time_step.h:37
mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:19