Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Member Functions | Public Attributes | List of all members
box2d::Shape::Conf Struct Reference

#include <Shape.hpp>

Inheritance diagram for box2d::Shape::Conf:
box2d::ChainShape::Conf box2d::CircleShape::Conf box2d::EdgeShape::Conf box2d::PolygonShape::Conf

Public Member Functions

constexpr ConfUseVertexRadius (Length value) noexcept
 
constexpr ConfUseFriction (RealNum value) noexcept
 
constexpr ConfUseRestitution (RealNum value) noexcept
 
constexpr ConfUseDensity (Density value) noexcept
 

Public Attributes

Length vertexRadius = DefaultLinearSlop
 
RealNum friction = RealNum{2} / RealNum{10}
 Friction coefficient. More...
 
RealNum restitution = RealNum{0}
 Restitution (elasticity) of the associated shape. More...
 
Density density = Density{0}
 Density of the associated shape. More...
 

Member Function Documentation

◆ UseDensity()

constexpr Shape::Conf & box2d::Shape::Conf::UseDensity ( Density  value)
inlinenoexcept

◆ UseFriction()

constexpr Shape::Conf & box2d::Shape::Conf::UseFriction ( RealNum  value)
inlinenoexcept

◆ UseRestitution()

constexpr Shape::Conf & box2d::Shape::Conf::UseRestitution ( RealNum  value)
inlinenoexcept

◆ UseVertexRadius()

constexpr Shape::Conf & box2d::Shape::Conf::UseVertexRadius ( Length  value)
inlinenoexcept

Member Data Documentation

◆ density

Density box2d::Shape::Conf::density = Density{0}

Density of the associated shape.

Note
This is usually in kg/m^2.
This must be a non-negative value.
Use 0 to indicate that the shape's associated mass should be 0.

◆ friction

RealNum box2d::Shape::Conf::friction = RealNum{2} / RealNum{10}

Friction coefficient.

Note
This must be a value between 0 and +infinity.
This is usually in the range [0,1].
The square-root of the product of this value multiplied by a touching fixture's friction becomes the friction coefficient for the contact.

◆ restitution

RealNum box2d::Shape::Conf::restitution = RealNum{0}

Restitution (elasticity) of the associated shape.

Note
This should be a valid finite value.
This is usually in the range [0,1].

◆ vertexRadius

Length box2d::Shape::Conf::vertexRadius = DefaultLinearSlop

The documentation for this struct was generated from the following file: