PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::DiskShapeConf Struct Reference

Disk shape configuration. More...

#include <DiskShapeConf.hpp>

Inheritance diagram for playrho::d2::DiskShapeConf:
[legend]
Collaboration diagram for playrho::d2::DiskShapeConf:
[legend]

Public Member Functions

constexpr DiskShapeConf (NonNegative< Length > r)
 Initializing constructor.
 
constexpr DiskShapeConfUseLocation (Length2 value) noexcept
 Uses the given value as the location.
 
constexpr DiskShapeConfUseRadius (NonNegative< Length > r) noexcept
 Uses the given value as the radius.
 
constexpr DiskShapeConfTransform (const Mat22 &m) noexcept
 Transforms the location by the given transformation matrix. More...
 
NonNegative< LengthGetRadius () const noexcept
 Gets the radius property.
 
Length2 GetLocation () const noexcept
 Gets the location.
 
- Public Member Functions inherited from playrho::d2::ShapeBuilder< DiskShapeConf >
constexpr ShapeBuilder ()=default
 Default constructor.
 
constexpr ShapeBuilder (const BaseShapeConf &value) noexcept
 Initializing constructor.
 
constexpr DiskShapeConfUseFriction (NonNegative< Real > value) noexcept
 Uses the given friction.
 
constexpr DiskShapeConfUseRestitution (Finite< Real > value) noexcept
 Uses the given restitution.
 
constexpr DiskShapeConfUseDensity (NonNegative< AreaDensity > value) noexcept
 Uses the given density.
 

Static Public Member Functions

static constexpr NonNegative< LengthGetDefaultRadius () noexcept
 Gets the default radius.
 

Public Attributes

NonNegative< LengthvertexRadius = GetDefaultRadius()
 Vertex radius. More...
 
Length2 location = Length2{}
 Location for the disk shape to be centered at.
 
- Public Attributes inherited from playrho::d2::BaseShapeConf
NonNegative< Realfriction = NonNegative<Real>{Real{2} / Real{10}}
 Friction coefficient. More...
 
Finite< Realrestitution = Finite<Real>{0}
 Restitution (elasticity) of the associated shape. More...
 
NonNegative< AreaDensitydensity = NonNegative<AreaDensity>{0_kgpm2}
 Area density of the associated shape. More...
 

Detailed Description

Disk shape configuration.

A disk shape "is the region in a plane bounded by a circle". This is a two-dimensional solid round shape. This used to be called the circle shape but that's now used for hollow round shapes.

See also
https://en.wikipedia.org/wiki/Disk_(mathematics)
Examples
DistanceJoint.cpp, FrictionJoint.cpp, GearJoint.cpp, HelloWorld.cpp, MotorJoint.cpp, PrismaticJoint.cpp, RevoluteJoint.cpp, RopeJoint.cpp, Shape.cpp, WeldJoint.cpp, WheelJoint.cpp, World.cpp, WorldBody.cpp, WorldContact.cpp, and WorldFixture.cpp.

Member Function Documentation

◆ Transform()

constexpr DiskShapeConf& playrho::d2::DiskShapeConf::Transform ( const Mat22 m)
inlineconstexprnoexcept

Transforms the location by the given transformation matrix.

See also
https://en.wikipedia.org/wiki/Transformation_matrix

Member Data Documentation

◆ vertexRadius

NonNegative<Length> playrho::d2::DiskShapeConf::vertexRadius = GetDefaultRadius()

Vertex radius.

This is the radius from the vertex that the shape's "skin" should extend outward by. While any edges — line segments between multiple vertices — are straight, corners between them (the vertices) are rounded and treated as rounded. Shapes with larger vertex radiuses compared to edge lengths therefore will be more prone to rolling or having other shapes more prone to roll off of them.

Note
This should be a non-negative value.
Examples
WorldBody.cpp.

Referenced by playrho::d2::GetChild(), GetRadius(), and UseRadius().


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