3#include <box2d/box2d.h>
55 bool in_pixels =
false);
117 const Vector3& velocity)
noexcept;
132 const Vector3& impulse)
noexcept;
Represents a point in 2D space.
Definition point.h:6
Represents a 3D vector with x, y, and z components. This class provides basic vector operations such ...
Definition vector3.h:8
Structure representing a 2D physics body.
Definition body_2d.h:26
static void set_body_type(const Body2D &body, BodyType2D::Type type)
Sets the type of the specified body.
static void set_body_mass(const Body2D &body, float mass)
Sets the mass of the specified body.
static struct Body2DTransform get_body_transform(const Body2D &body)
Retrieves the transform of the specified body.
static void set_body_velocity(const Body2D &body, const Vector3 &velocity) noexcept
Sets the velocity of the specified body.
static void set_body_transform(const struct Body2DTransform &transform, bool in_pixels=false)
Sets the transform of the specified body.
static void set_body_gravity_scale(const Body2D &body, float scale)
Sets the size of the specified body.
static void apply_impulse(const Body2D &body, const Vector3 &impulse) noexcept
Applies an impulse to the specified body.
static Vector3 get_body_velocity(const Body2D &body) noexcept
Retrieves the current velocity of the specified body.
static void apply_force(const Body2D &body, const Vector3 &force) noexcept
Applies a force to the specified body.
static void set_body_size(const Body2D &body, const Vector3 &size, Point offset)
Sets the size of the specified body.
static void set_body_friction(const Body2D &body, float friction, ShapeType2D::Type type)
Sets the friction of the specified body for a given shape type.
static struct Body2DTransform get_pixel_transform(const Body2D &body)
Retrieves the pixel transform of the specified body.
static void set_body_bounciness(const Body2D &body, float bounciness, ShapeType2D::Type type)
Sets the bounciness of the specified body for a given shape type.
static void set_body_radius(const Body2D &body, float radius, Point offset)
Sets the radius of the specified body.
std::vector< Shape2D > shapes
Definition body_2d.h:28
Structure representing the transform of a 2D physics body.
Definition body_2d.h:147
Body2D body
Definition body_2d.h:148
Vector3 center_of_mass
Definition body_2d.h:151
float rotation
Definition body_2d.h:150
Vector3 position
Definition body_2d.h:149
Type
Definition body_type_2d.h:14
Structure representing a 2D physics shape.
Definition body_2d.h:16
b2ShapeType type
Definition body_2d.h:18
Type
Definition shape_type_2d.h:14