Box2D
3.0.0
A Real-Time-Oriented 2-D Physics Engine
|
Edge shape. More...
#include <EdgeShape.hpp>
Classes | |
struct | Conf |
Public Member Functions | |
EdgeShape (const Conf &conf=GetDefaultConf()) noexcept | |
EdgeShape (Length2D v1, Length2D v2, const Conf &conf=GetDefaultConf()) noexcept | |
EdgeShape (const EdgeShape &)=default | |
child_count_t | GetChildCount () const noexcept override |
Gets the number of child primitives. More... | |
DistanceProxy | GetChild (child_count_t index) const noexcept override |
Gets the child for the given index. More... | |
bool | TestPoint (const Transformation &xf, const Length2D p) const noexcept override |
Tests a point for containment in this shape. More... | |
MassData | GetMassData () const noexcept override |
Computes the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin. More... | |
RayCastOutput | RayCast (const RayCastInput &input, const Transformation &xf, child_count_t childIndex) const noexcept override |
Cast a ray against a child shape. More... | |
void | Accept (Visitor &visitor) const override |
Accepts a visitor. More... | |
void | Set (const Length2D v1, const Length2D v2) |
Set this as an isolated edge. More... | |
Length2D | GetVertex1 () const noexcept |
Length2D | GetVertex2 () const noexcept |
UnitVec2 | GetNormal1 () const noexcept |
UnitVec2 | GetNormal2 () const noexcept |
![]() | |
Shape ()=delete | |
Default constructor is deleted. More... | |
Shape (const Conf &conf) noexcept | |
Initializing constructor. More... | |
Shape (const Shape &)=default | |
virtual | ~Shape ()=default |
Length | GetVertexRadius () const noexcept |
Gets the vertex radius. More... | |
void | SetVertexRadius (Length vertexRadius) |
Density | GetDensity () const noexcept |
Gets the density of this fixture. More... | |
void | SetDensity (Density density) noexcept |
Sets the density of this fixture. More... | |
RealNum | GetFriction () const noexcept |
Gets the coefficient of friction. More... | |
void | SetFriction (RealNum friction) noexcept |
Sets the coefficient of friction. This will not change the friction of existing contacts. More... | |
RealNum | GetRestitution () const noexcept |
Gets the coefficient of restitution. More... | |
void | SetRestitution (RealNum restitution) noexcept |
Sets the coefficient of restitution. This will not change the restitution of existing contacts. More... | |
Static Public Member Functions | |
static constexpr Length | GetDefaultVertexRadius () noexcept |
static Conf | GetDefaultConf () noexcept |
Edge shape.
A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is used to ensure correct contact normals.
|
inlinenoexcept |
|
inlinenoexcept |
|
default |
|
inlineoverridevirtual |
Accepts a visitor.
Implements box2d::Shape.
|
inlineoverridevirtualnoexcept |
Gets the child for the given index.
Implements box2d::Shape.
|
inlineoverridevirtualnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
|
overridevirtualnoexcept |
Computes the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.
Implements box2d::Shape.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
overridevirtualnoexcept |
Cast a ray against a child shape.
input | the ray-cast input parameters. |
xf | the transform to be applied to the shape. |
childIndex | the child shape index |
Implements box2d::Shape.
|
overridevirtualnoexcept |
Tests a point for containment in this shape.
xf | the shape world transform. |
p | a point in world coordinates. |
true
if point is contained in this shape, false
otherwise. Implements box2d::Shape.