Shape.hpp File Reference
#include <PlayRho/Common/Math.hpp>
#include <PlayRho/Collision/DistanceProxy.hpp>
#include <PlayRho/Collision/MassData.hpp>
#include <PlayRho/Common/BoundedValue.hpp>
#include <memory>
#include <functional>
#include <utility>
#include <typeinfo>

Go to the source code of this file.

Classes

class  playrho::d2::Shape
 Shape. More...
 

Namespaces

 playrho
 
 playrho::d2
 

Typedefs

using playrho::d2::TypeInfoVisitor = std::function< void(const std::type_info &ti, const void *data)>
 Visitor type alias for underlying shape configuration. More...
 

Functions

ChildCounter playrho::d2::GetChildCount (const Shape &shape) noexcept
 Gets the number of child primitives of the shape. More...
 
DistanceProxy playrho::d2::GetChild (const Shape &shape, ChildCounter index)
 Gets the "child" for the given index. More...
 
MassData playrho::d2::GetMassData (const Shape &shape) noexcept
 Gets the mass properties of this shape using its dimensions and density. More...
 
Real playrho::d2::GetFriction (const Shape &shape) noexcept
 Gets the coefficient of friction. More...
 
Real playrho::d2::GetRestitution (const Shape &shape) noexcept
 Gets the coefficient of restitution value of the given shape. More...
 
NonNegative< AreaDensity > playrho::d2::GetDensity (const Shape &shape) noexcept
 Gets the density of the given shape. More...
 
NonNegative< Length > playrho::d2::GetVertexRadius (const Shape &shape, ChildCounter idx)
 Gets the vertex radius of the indexed child of the given shape. More...
 
void playrho::d2::Transform (Shape &shape, const Mat22 &m)
 Transforms all of the given shape's vertices by the given transformation matrix. More...
 
bool playrho::d2::Visit (const Shape &shape, void *userData)
 Visits the given shape with the potentially non-null user data pointer. More...
 
const void * playrho::d2::GetData (const Shape &shape) noexcept
 Gets a pointer to the underlying data. More...
 
const std::type_info & playrho::d2::GetUseTypeInfo (const Shape &shape)
 Gets the type info of the use of the given shape. More...
 
void playrho::d2::Accept (const Shape &shape, const TypeInfoVisitor &visitor)
 Accepts a visitor. More...
 
bool playrho::d2::operator== (const Shape &lhs, const Shape &rhs) noexcept
 Equality operator for shape to shape comparisons. More...
 
bool playrho::d2::operator!= (const Shape &lhs, const Shape &rhs) noexcept
 Inequality operator for shape to shape comparisons. More...
 
bool playrho::d2::TestPoint (const Shape &shape, Length2 point) noexcept
 Test a point for containment in the given shape. More...
 
template<>
bool playrho::Visit< d2::Shape > (const d2::Shape &shape, void *userData)
 Visits the given shape with the potentially non-null user data pointer. More...