Classes | |
struct | Acceleration |
2-D acceleration related data structure. More... | |
struct | BaseShapeConf |
Base configuration for initializing shapes. More... | |
class | Body |
Physical entity that exists within a World. More... | |
class | BodyAtty |
Body attorney. More... | |
struct | BodyConf |
Body configuration. More... | |
class | BodyConstraint |
Body Constraint. More... | |
class | ChainShapeConf |
Chain shape configuration. More... | |
struct | ClipVertex |
Clip vertex. More... | |
class | ConstJointVisitor |
Constant joint visitor interface class. More... | |
class | Contact |
A potential contact between the children of two Fixture objects. More... | |
class | ContactAtty |
Contact attorney. More... | |
class | ContactImpulsesList |
class | ContactListener |
A pure-virtual interface for "listeners" for contacts. More... | |
class | ConvexHull |
Convex hull. More... | |
class | DestructionListener |
struct | DiskShapeConf |
Disk shape configuration. More... | |
struct | DistanceConf |
Distance Configuration. More... | |
class | DistanceJoint |
Distance Joint. More... | |
struct | DistanceJointConf |
Distance joint definition. More... | |
struct | DistanceOutput |
Distance Output. More... | |
class | DistanceProxy |
Distance Proxy. More... | |
class | DynamicTree |
A dynamic AABB tree broad-phase. More... | |
class | EdgeShapeConf |
Edge shape configuration. More... | |
class | Fixture |
An association between a body and a shape. More... | |
class | FixtureAtty |
Fixture attorney. More... | |
struct | FixtureConf |
Fixture definition. More... | |
class | FrictionJoint |
Friction joint. More... | |
struct | FrictionJointConf |
Friction joint definition. More... | |
class | FunctionalJointVisitor |
Functional joint visitor class. More... | |
class | GearJoint |
Gear joint. More... | |
struct | GearJointConf |
Gear joint definition. More... | |
struct | Island |
Definition of a self-contained constraint "island". More... | |
class | Joint |
Base joint class. More... | |
class | JointAtty |
Joint attorney. More... | |
struct | JointBuilder |
Joint builder definition structure. More... | |
struct | JointConf |
Abstract base Joint definition class. More... | |
class | JointKey |
Joint key. More... | |
class | JointVisitor |
Visitor interface for Joint instances. More... | |
class | Manifold |
A collision response oriented description of the intersection of two convex shapes. More... | |
class | MotorJoint |
Motor joint. More... | |
struct | MotorJointConf |
Motor joint definition. More... | |
struct | MultiShapeConf |
The "multi-shape" shape configuration. More... | |
class | PolygonShapeConf |
Polygon shape configuration. More... | |
struct | Position |
2-D positional data structure. More... | |
class | PositionConstraint |
struct | PositionSolution |
Solution for position constraint. More... | |
struct | PositionSolverManifold |
class | PrismaticJoint |
Prismatic Joint. More... | |
struct | PrismaticJointConf |
Prismatic joint definition. More... | |
class | PulleyJoint |
Pulley joint. More... | |
struct | PulleyJointConf |
Pulley joint definition. More... | |
struct | RayCastHit |
Ray-cast hit data. More... | |
class | RevoluteJoint |
Revolute Joint. More... | |
struct | RevoluteJointConf |
Revolute joint definition. More... | |
class | RopeJoint |
Rope joint. More... | |
struct | RopeJointConf |
Rope joint definition. More... | |
struct | SeparationScenario |
Separation scenario. More... | |
class | Shape |
Shape. More... | |
struct | ShapeBuilder |
Builder configuration structure. More... | |
struct | ShapeConf |
Shape configuration structure. More... | |
class | Simplex |
An encapsulation of a point, line segment, or triangle. More... | |
class | SimplexEdge |
Simplex edge. More... | |
class | Sweep |
Description of a "sweep" of motion in 2-D space. More... | |
class | TargetJoint |
Target Joint. More... | |
struct | TargetJointConf |
Target joint definition. More... | |
struct | Transformation |
Describes a geometric transformation. More... | |
class | TypeJointVisitor |
Typing JointVisitor . More... | |
class | UnitVec |
2-D unit vector. More... | |
struct | Velocity |
2-D velocity related data structure. More... | |
class | VelocityConstraint |
class | VertexSet |
Vertex Set. More... | |
class | WeldJoint |
Weld joint. More... | |
struct | WeldJointConf |
Weld joint definition. More... | |
class | WheelJoint |
Wheel joint. More... | |
struct | WheelJointConf |
Wheel joint definition. More... | |
class | World |
Definition of an independent and simulatable "world". More... | |
class | WorldAtty |
World attorney. More... | |
struct | WorldConf |
World configuration data. More... | |
class | WorldManifold |
Essentially a Manifold expressed in world coordinate terms. More... | |
Typedefs | |
using | AABB = detail::AABB< 2 > |
2-Dimensional Axis Aligned Bounding Box. More... | |
using | ClipList = ArrayList< ClipVertex, MaxManifoldPoints > |
Clip list for ClipSegmentToLine . More... | |
using | DynamicTreeSizeCB = std::function< DynamicTreeOpcode(DynamicTree::Size)> |
Query callback type. More... | |
using | QueryFixtureCallback = std::function< bool(Fixture *fixture, ChildCounter child)> |
Query AABB for fixtures callback function type. More... | |
using | LengthIndices = detail::LengthIndices< 2 > |
Length and vertex counter array of indices for 2-D space. More... | |
using | SeparationInfo = detail::SeparationInfo< 2 > |
Separation information alias for 2-D space. More... | |
using | MassData = detail::MassData< 2 > |
Mass data alias for 2-D objects. More... | |
using | RayCastInput = playrho::detail::RayCastInput< 2 > |
Ray cast input data for 2-dimensions. More... | |
using | RayCastOutput = Optional< RayCastHit > |
Ray cast output. More... | |
using | DynamicTreeRayCastCB = std::function< Real(Fixture *fixture, ChildCounter child, const RayCastInput &input)> |
Ray cast callback function. More... | |
using | FixtureRayCastCB = std::function< RayCastOpcode(Fixture *fixture, ChildCounter child, Length2 point, UnitVec normal)> |
Ray cast callback function signature. More... | |
using | TypeInfoVisitor = std::function< void(const std::type_info &ti, const void *data)> |
Visitor type alias for underlying shape configuration. More... | |
using | SimplexEdges = ArrayList< SimplexEdge, MaxSimplexEdges, std::remove_const< decltype(MaxSimplexEdges)>::type > |
Simplex edge collection. More... | |
using | VelocityPair = std::pair< Velocity, Velocity > |
Velocity pair. More... | |
using | ContactPtr = Contact * |
Contact pointer type. More... | |
using | KeyedContactPtr = std::pair< ContactKey, Contact * > |
Keyed contact pointer. More... | |
using | BodyConstraintPtr = BodyConstraint * |
A body constraint pointer alias. More... | |
using | BodyConstraintPair = std::pair< const Body *, BodyConstraintPtr > |
A body pointer and body constraint pointer pair alias. More... | |
using | BodyConstraintsMap = std::unordered_map< const Body *, BodyConstraint * > |
A body constraints map alias. More... | |
using | BodyPtr = Body * |
Body pointer alias. More... | |
using | BodyConstraintsPair = std::pair< const Body *const, BodyConstraint * > |
A body pointer and body constraint pointer pair. More... | |
using | BodyConstraints = std::vector< BodyConstraint > |
Collection of body constraints. More... | |
using | PositionConstraints = std::vector< PositionConstraint > |
Collection of position constraints. More... | |
using | VelocityConstraints = std::vector< VelocityConstraint > |
Collection of velocity constraints. More... | |
Enumerations | |
enum | DynamicTreeOpcode { DynamicTreeOpcode::End, DynamicTreeOpcode::Continue } |
Opcodes for dynamic tree callbacks. More... | |
enum | JointType : std::uint8_t { JointType::Unknown, JointType::Revolute, JointType::Prismatic, JointType::Distance, JointType::Pulley, JointType::Target, JointType::Gear, JointType::Wheel, JointType::Weld, JointType::Friction, JointType::Rope, JointType::Motor } |
Enumeration of joint types. More... | |
Functions | |
AABB | ComputeAABB (const DistanceProxy &proxy, const Transformation &xf) noexcept |
Computes the AABB. More... | |
AABB | ComputeAABB (const DistanceProxy &proxy, const Transformation &xfm0, const Transformation &xfm1) noexcept |
Computes the AABB. More... | |
AABB | ComputeAABB (const Shape &shape, const Transformation &xf) noexcept |
Computes the AABB for the given shape with the given transformation. More... | |
AABB | ComputeAABB (const Fixture &fixture) noexcept |
Computes the AABB for the given fixture. More... | |
AABB | ComputeAABB (const Body &body) |
Computes the AABB for the given body. More... | |
AABB | ComputeIntersectingAABB (const Fixture &fA, ChildCounter iA, const Fixture &fB, ChildCounter iB) noexcept |
Computes the intersecting AABB for the given pair of fixtures and indexes. More... | |
AABB | ComputeIntersectingAABB (const Contact &contact) |
Computes the intersecting AABB for the given contact. More... | |
AABB | GetAABB (const playrho::detail::RayCastInput< 2 > &input) noexcept |
Gets the AABB for the given ray cast input data. More... | |
PLAYRHO_CONSTEXPR Length | GetPerimeter (const AABB &aabb) noexcept |
Gets the perimeter length of the 2-dimensional AABB. More... | |
PointStates | GetPointStates (const Manifold &manifold1, const Manifold &manifold2) noexcept |
Computes the point states given two manifolds. More... | |
ClipList | ClipSegmentToLine (const ClipList &vIn, const UnitVec &normal, Length offset, ContactFeature::Index indexA) |
DistanceConf | GetDistanceConf (const ToiConf &conf) noexcept |
Gets the distance configuration for the given time of impact configuration. More... | |
PairLength2 | GetWitnessPoints (const Simplex &simplex) noexcept |
Gets the witness points of the given simplex. More... | |
DistanceOutput | Distance (const DistanceProxy &proxyA, const Transformation &transformA, const DistanceProxy &proxyB, const Transformation &transformB, DistanceConf conf=DistanceConf{}) |
Determines the closest points between two shapes. More... | |
Area | TestOverlap (const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB, DistanceConf conf=DistanceConf{}) |
Determine if two generic shapes overlap. More... | |
PLAYRHO_CONSTEXPR Length2 | GetDelta (PairLength2 arg) noexcept |
Gets the delta to go from the first element to the second. More... | |
bool | operator== (const DistanceProxy &lhs, const DistanceProxy &rhs) noexcept |
Determines with the two given distance proxies are equal. More... | |
std::size_t | FindLowestRightMostVertex (Span< const Length2 > vertices) |
Finds the lowest right most vertex in the given collection. More... | |
std::vector< Length2 > | GetConvexHullAsVector (Span< const Length2 > vertices) |
Gets the convex hull for the given collection of vertices as a vector. More... | |
bool | TestPoint (const DistanceProxy &proxy, Length2 point) noexcept |
Tests a point for containment in the given distance proxy. More... | |
bool | operator!= (const DistanceProxy &lhs, const DistanceProxy &rhs) noexcept |
Determines with the two given distance proxies are not equal. More... | |
NonNegative< Length > | GetVertexRadius (const DistanceProxy &arg) noexcept |
Gets the vertex radius property of a given distance proxy. More... | |
template<class T > | |
VertexCounter | GetSupportIndex (const DistanceProxy &proxy, T dir) noexcept |
Gets the supporting vertex index in the given direction for the given distance proxy. More... | |
void | swap (DynamicTree &lhs, DynamicTree &rhs) noexcept |
void | Query (const DynamicTree &tree, const AABB &aabb, const DynamicTreeSizeCB &callback) |
Query the given dynamic tree and find nodes overlapping the given AABB. More... | |
void | Query (const DynamicTree &tree, const AABB &aabb, QueryFixtureCallback callback) |
Queries the world for all fixtures that potentially overlap the provided AABB. More... | |
Length | ComputeTotalPerimeter (const DynamicTree &tree) noexcept |
Gets the sum of the perimeters of nodes. More... | |
Real | ComputePerimeterRatio (const DynamicTree &tree) noexcept |
Gets the ratio of the sum of the perimeters of nodes to the root perimeter. More... | |
DynamicTree::Height | ComputeHeight (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Computes the height of the tree from a given node. More... | |
DynamicTree::Height | GetMaxImbalance (const DynamicTree &tree) noexcept |
Gets the maximum imbalance. More... | |
bool | ValidateStructure (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Validates the structure of the given tree from the given index. More... | |
bool | ValidateMetrics (const DynamicTree &tree, DynamicTree::Size index) noexcept |
Validates the metrics of the given tree from the given index. More... | |
PLAYRHO_CONSTEXPR bool | operator== (const DynamicTree::LeafData &lhs, const DynamicTree::LeafData &rhs) noexcept |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const DynamicTree::LeafData &lhs, const DynamicTree::LeafData &rhs) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR bool | IsUnused (const DynamicTree::TreeNode &node) noexcept |
Is unused. More... | |
PLAYRHO_CONSTEXPR bool | IsLeaf (const DynamicTree::TreeNode &node) noexcept |
Is leaf. More... | |
PLAYRHO_CONSTEXPR bool | IsBranch (const DynamicTree::TreeNode &node) noexcept |
Is branch. More... | |
PLAYRHO_CONSTEXPR DynamicTree::BranchData | ReplaceChild (DynamicTree::BranchData bd, DynamicTree::Size oldChild, DynamicTree::Size newChild) |
Replaces the old child with the new child. More... | |
PLAYRHO_CONSTEXPR AABB | GetAABB (const DynamicTree::TreeNode &node) noexcept |
Gets the AABB of the given dynamic tree node. More... | |
PLAYRHO_CONSTEXPR DynamicTree::Size | GetNext (const DynamicTree::TreeNode &node) noexcept |
Gets the next index of the given node. More... | |
DynamicTree::Height | GetHeight (const DynamicTree &tree) noexcept |
Gets the height of the binary tree. More... | |
AABB | GetAABB (const DynamicTree &tree) noexcept |
Gets the AABB for the given dynamic tree. More... | |
bool | TestOverlap (const DynamicTree &tree, DynamicTree::Size leafIdA, DynamicTree::Size leafIdB) noexcept |
Tests for overlap of the elements identified in the given dynamic tree. More... | |
DynamicTree::Height | ComputeHeight (const DynamicTree &tree) noexcept |
Computes the height of the given dynamic tree. More... | |
std::size_t | size (const DynamicTree &tree) noexcept |
Gets the "size" of the given tree. More... | |
Manifold | GetManifold (bool flipped, const DistanceProxy &shape0, const Transformation &xf0, const VertexCounter idx0, const DistanceProxy &shape1, const Transformation &xf1, const VertexCounter2 indices1, const Manifold::Conf conf) |
Gets a face-to-face based manifold. More... | |
Manifold | GetManifold (bool flipped, Length totalRadius, const DistanceProxy &shape, const Transformation &sxf, Length2 point, const Transformation &xfm) |
Computes manifolds for face-to-point collision. More... | |
Manifold | GetManifold (Length2 locationA, const Transformation &xfA, Length2 locationB, const Transformation &xfB, Length totalRadius) noexcept |
Gets a point-to-point based manifold. More... | |
Manifold | CollideShapes (const DistanceProxy &shapeA, const Transformation &xfA, const DistanceProxy &shapeB, const Transformation &xfB, Manifold::Conf conf=GetDefaultManifoldConf()) |
Calculates the relevant collision manifold. More... | |
const char * | GetName (Manifold::Type type) noexcept |
Gets a unique name for the given manifold type. More... | |
bool | operator== (const Manifold::Point &lhs, const Manifold::Point &rhs) noexcept |
Determines whether the two given manifold points are equal. More... | |
bool | operator!= (const Manifold::Point &lhs, const Manifold::Point &rhs) noexcept |
Determines whether the two given manifold points are not equal. More... | |
bool | operator== (const Manifold &lhs, const Manifold &rhs) noexcept |
Manifold equality operator. More... | |
bool | operator!= (const Manifold &lhs, const Manifold &rhs) noexcept |
Manifold inequality operator. More... | |
PLAYRHO_CONSTEXPR Manifold::Conf | GetDefaultManifoldConf () noexcept |
Gets the default manifold configuration. More... | |
MassData | GetMassData (Length r, NonNegative< AreaDensity > density, Length2 location) |
Computes the mass data for a circular shape. More... | |
MassData | GetMassData (Length r, NonNegative< AreaDensity > density, Length2 v0, Length2 v1) |
Computes the mass data for a linear shape. More... | |
MassData | GetMassData (Length vertexRadius, NonNegative< AreaDensity > density, Span< const Length2 > vertices) |
Gets the mass data for the given collection of vertices with the given properties. More... | |
MassData | GetMassData (const Fixture &f) |
Computes the mass data for the given fixture. More... | |
MassData | ComputeMassData (const Body &body) noexcept |
Computes the body's mass data. More... | |
MassData | GetMassData (const Body &body) noexcept |
Gets the mass data of the body. More... | |
RayCastOutput | RayCast (Length radius, Length2 location, const RayCastInput &input) noexcept |
Cast a ray against a circle of a given radius at the given location. More... | |
RayCastOutput | RayCast (const detail::AABB< 2 > &aabb, const RayCastInput &input) noexcept |
Cast a ray against the given AABB. More... | |
RayCastOutput | RayCast (const DistanceProxy &proxy, const RayCastInput &input, const Transformation &transform) noexcept |
Cast a ray against the distance proxy. More... | |
RayCastOutput | RayCast (const Shape &shape, ChildCounter childIndex, const RayCastInput &input, const Transformation &transform) noexcept |
Cast a ray against the child of the given shape. More... | |
bool | RayCast (const DynamicTree &tree, RayCastInput input, const DynamicTreeRayCastCB &callback) |
Cast rays against the leafs in the given tree. More... | |
bool | RayCast (const DynamicTree &tree, const RayCastInput &input, FixtureRayCastCB callback) |
Ray-cast the dynamic tree for all fixtures in the path of the ray. More... | |
SeparationScenario | GetSeparationScenario (IndexPair3 indices, const DistanceProxy &proxyA, const Transformation &xfA, const DistanceProxy &proxyB, const Transformation &xfB) |
Gets a separation finder for the given inputs. More... | |
LengthIndexPair | FindMinSeparation (const SeparationScenario &scenario, const Transformation &xfA, const Transformation &xfB) |
Finds the minimum separation. More... | |
Length | Evaluate (const SeparationScenario &scenario, const Transformation &xfA, const Transformation &xfB, IndexPair indexPair) |
ChainShapeConf | GetChainShapeConf (Length2 dimensions) |
Gets an enclosing chain shape configuration for an axis aligned rectangle of the given dimensions (width and height). More... | |
ChainShapeConf | GetChainShapeConf (const AABB &arg) |
Gets an enclosing chain shape configuration for the given axis aligned box. More... | |
ChildCounter | GetChildCount (const ChainShapeConf &arg) noexcept |
Gets the child count for a given chain shape configuration. More... | |
DistanceProxy | GetChild (const ChainShapeConf &arg, ChildCounter index) |
Gets the "child" shape for a given chain shape configuration. More... | |
MassData | GetMassData (const ChainShapeConf &arg) noexcept |
Gets the mass data for a given chain shape configuration. More... | |
bool | IsLooped (const ChainShapeConf &shape) noexcept |
Determines whether the given shape is looped. More... | |
ChildCounter | GetNextIndex (const ChainShapeConf &shape, ChildCounter index) noexcept |
Gets the next index after the given index for the given shape. More... | |
NonNegative< Length > | GetVertexRadius (const ChainShapeConf &arg) |
Gets the vertex radius of the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const ChainShapeConf &arg, ChildCounter) |
Gets the vertex radius of the given shape configuration. More... | |
void | Transform (ChainShapeConf &arg, const Mat22 &m) noexcept |
Transforms the given chain shape configuration's vertices by the given transformation matrix. More... | |
ChainShapeConf | GetChainShapeConf (Length dimension) |
Gets an enclosing chain shape configuration for an axis aligned square of the given dimension. More... | |
bool | operator== (const DiskShapeConf &lhs, const DiskShapeConf &rhs) noexcept |
Equality operator. More... | |
bool | operator!= (const DiskShapeConf &lhs, const DiskShapeConf &rhs) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR ChildCounter | GetChildCount (const DiskShapeConf &) noexcept |
Gets the "child" count of the given disk shape configuration. More... | |
DistanceProxy | GetChild (const DiskShapeConf &arg, ChildCounter index) |
Gets the "child" of the given disk shape configuration. More... | |
PLAYRHO_CONSTEXPR NonNegative< Length > | GetVertexRadius (const DiskShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
PLAYRHO_CONSTEXPR NonNegative< Length > | GetVertexRadius (const DiskShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
MassData | GetMassData (const DiskShapeConf &arg) noexcept |
Gets the mass data of the given disk shape configuration. More... | |
void | Transform (DiskShapeConf &arg, const Mat22 &m) noexcept |
Transforms the given shape configuration's vertices by the given transformation matrix. More... | |
bool | operator== (const EdgeShapeConf &lhs, const EdgeShapeConf &rhs) noexcept |
Equality operator. More... | |
bool | operator!= (const EdgeShapeConf &lhs, const EdgeShapeConf &rhs) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR ChildCounter | GetChildCount (const EdgeShapeConf &) noexcept |
Gets the "child" count for the given shape configuration. More... | |
DistanceProxy | GetChild (const EdgeShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const EdgeShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const EdgeShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
MassData | GetMassData (const EdgeShapeConf &arg) noexcept |
Gets the mass data for the given shape configuration. More... | |
void | Transform (EdgeShapeConf &arg, const Mat22 &m) noexcept |
Transforms the given shape configuration's vertices by the given transformation matrix. More... | |
MassData | GetMassData (const MultiShapeConf &arg) noexcept |
Gets the mass data for the given shape configuration. More... | |
bool | operator== (const MultiShapeConf &lhs, const MultiShapeConf &rhs) noexcept |
Equality operator. More... | |
bool | operator!= (const MultiShapeConf &lhs, const MultiShapeConf &rhs) noexcept |
Inequality operator. More... | |
ChildCounter | GetChildCount (const MultiShapeConf &arg) noexcept |
Gets the "child" count for the given shape configuration. More... | |
DistanceProxy | GetChild (const MultiShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const MultiShapeConf &arg, ChildCounter index) |
Gets the vertex radius of the given shape configuration. More... | |
void | Transform (MultiShapeConf &arg, const Mat22 &m) noexcept |
Transforms the given multi shape configuration by the given transformation matrix. More... | |
Length2 | GetEdge (const PolygonShapeConf &shape, VertexCounter index) |
bool | Validate (const Span< const Length2 > verts) |
Validates the convexity of the given collection of vertices. More... | |
PLAYRHO_CONSTEXPR ChildCounter | GetChildCount (const PolygonShapeConf &) noexcept |
Gets the "child" count for the given shape configuration. More... | |
DistanceProxy | GetChild (const PolygonShapeConf &arg, ChildCounter index) |
Gets the "child" shape for the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const PolygonShapeConf &arg) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
NonNegative< Length > | GetVertexRadius (const PolygonShapeConf &arg, ChildCounter) noexcept |
Gets the vertex radius of the given shape configuration. More... | |
MassData | GetMassData (const PolygonShapeConf &arg) noexcept |
Gets the mass data for the given shape configuration. More... | |
void | Transform (PolygonShapeConf &arg, const Mat22 &m) noexcept |
Transforms the given polygon configuration's vertices by the given transformation matrix. More... | |
bool | TestPoint (const Shape &shape, Length2 point) noexcept |
Test a point for containment in the given shape. More... | |
ChildCounter | GetChildCount (const Shape &shape) noexcept |
Gets the number of child primitives of the shape. More... | |
DistanceProxy | GetChild (const Shape &shape, ChildCounter index) |
Gets the "child" for the given index. More... | |
MassData | GetMassData (const Shape &shape) noexcept |
Gets the mass properties of this shape using its dimensions and density. More... | |
Real | GetFriction (const Shape &shape) noexcept |
Gets the coefficient of friction. More... | |
Real | GetRestitution (const Shape &shape) noexcept |
Gets the coefficient of restitution value of the given shape. More... | |
NonNegative< AreaDensity > | GetDensity (const Shape &shape) noexcept |
Gets the density of the given shape. More... | |
NonNegative< Length > | GetVertexRadius (const Shape &shape, ChildCounter idx) |
Gets the vertex radius of the indexed child of the given shape. More... | |
void | Transform (Shape &shape, const Mat22 &m) |
Transforms all of the given shape's vertices by the given transformation matrix. More... | |
bool | Visit (const Shape &shape, void *userData) |
Visits the given shape with the potentially non-null user data pointer. More... | |
const void * | GetData (const Shape &shape) noexcept |
Gets a pointer to the underlying data. More... | |
const std::type_info & | GetUseTypeInfo (const Shape &shape) |
Gets the type info of the use of the given shape. More... | |
void | Accept (const Shape &shape, const TypeInfoVisitor &visitor) |
Accepts a visitor. More... | |
bool | operator== (const Shape &lhs, const Shape &rhs) noexcept |
Equality operator for shape to shape comparisons. More... | |
bool | operator!= (const Shape &lhs, const Shape &rhs) noexcept |
Inequality operator for shape to shape comparisons. More... | |
PLAYRHO_CONSTEXPR NonNegative< AreaDensity > | GetDensity (const BaseShapeConf &arg) noexcept |
Gets the density of the given shape configuration. More... | |
PLAYRHO_CONSTEXPR Finite< Real > | GetRestitution (const BaseShapeConf &arg) noexcept |
Gets the restitution of the given shape configuration. More... | |
PLAYRHO_CONSTEXPR NonNegative< Real > | GetFriction (const BaseShapeConf &arg) noexcept |
Gets the friction of the given shape configuration. More... | |
SeparationInfo | GetMaxSeparation4x4 (const DistanceProxy &proxy1, Transformation xf1, const DistanceProxy &proxy2, Transformation xf2) |
Gets the max separation information for the first four vertices of the two given shapes. More... | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, Transformation xf1, const DistanceProxy &proxy2, Transformation xf2) |
Gets the max separation information. More... | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, Transformation xf1, const DistanceProxy &proxy2, Transformation xf2, Length stop) |
Gets the max separation information. More... | |
SeparationInfo | GetMaxSeparation (const DistanceProxy &proxy1, const DistanceProxy &proxy2, Length stop=MaxFloat *Meter) |
Gets the max separation information. More... | |
IndexPair3 | GetIndexPairs (const SimplexEdges &collection) noexcept |
Gets index pairs for the given edges collection. More... | |
Length2 | CalcSearchDirection (const SimplexEdges &simplexEdges) noexcept |
Calculates the "search direction" for the given simplex edge list. More... | |
Length2 | GetScaledDelta (const Simplex &simplex, Simplex::size_type index) |
Gets the scaled delta for the given indexed element of the given simplex. More... | |
PLAYRHO_CONSTEXPR Length2 | GetClosestPoint (const Simplex &simplex) |
Gets the "closest point". More... | |
PLAYRHO_CONSTEXPR Length2 | GetPointDelta (const SimplexEdge &sv) noexcept |
Gets "w". More... | |
PLAYRHO_CONSTEXPR bool | operator== (const SimplexEdge &lhs, const SimplexEdge &rhs) noexcept |
Equality operator for SimplexEdge . More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const SimplexEdge &lhs, const SimplexEdge &rhs) noexcept |
Inequality operator for SimplexEdge . More... | |
TOIOutput | GetToiViaSat (const DistanceProxy &proxyA, const Sweep &sweepA, const DistanceProxy &proxyB, const Sweep &sweepB, ToiConf conf=GetDefaultToiConf()) |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem. More... | |
WorldManifold | GetWorldManifold (const Manifold &manifold, Transformation xfA, Length radiusA, Transformation xfB, Length radiusB) |
Gets the world manifold for the given data. More... | |
WorldManifold | GetWorldManifold (const Contact &contact) |
PLAYRHO_CONSTEXPR bool | operator== (const Acceleration &lhs, const Acceleration &rhs) |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const Acceleration &lhs, const Acceleration &rhs) |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR Acceleration & | operator*= (Acceleration &lhs, const Real rhs) |
Multiplication assignment operator. More... | |
PLAYRHO_CONSTEXPR Acceleration & | operator/= (Acceleration &lhs, const Real rhs) |
Division assignment operator. More... | |
PLAYRHO_CONSTEXPR Acceleration & | operator+= (Acceleration &lhs, const Acceleration &rhs) |
Addition assignment operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator+ (const Acceleration &lhs, const Acceleration &rhs) |
Addition operator. More... | |
PLAYRHO_CONSTEXPR Acceleration & | operator-= (Acceleration &lhs, const Acceleration &rhs) |
Subtraction assignment operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator- (const Acceleration &lhs, const Acceleration &rhs) |
Subtraction operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator- (const Acceleration &value) |
Negation operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator+ (const Acceleration &value) |
Positive operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator* (const Acceleration &lhs, const Real rhs) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator* (const Real lhs, const Acceleration &rhs) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Acceleration | operator/ (const Acceleration &lhs, const Real rhs) |
Division operator. More... | |
void | Dump (const World &world) |
void | Dump (const Body &body, std::size_t bodyIndex) |
Dump body to a log file. More... | |
void | Dump (const Joint &joint, std::size_t index) |
Dump joint to the log file. More... | |
void | Dump (const Fixture &fixture, std::size_t bodyIndex) |
Dump fixture to log file. More... | |
void | Dump (const DistanceJoint &joint, std::size_t index) |
Dump joint to log file. More... | |
void | Dump (const FrictionJoint &joint, std::size_t index) |
Dump joint to the log file. More... | |
void | Dump (const GearJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const MotorJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const TargetJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const PrismaticJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const PulleyJoint &joint, std::size_t index) |
Dump joint to log file. More... | |
void | Dump (const RevoluteJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const RopeJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const WeldJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
void | Dump (const WheelJoint &joint, std::size_t index) |
Dumps the joint to the log file. More... | |
LinearVelocity2 | GetContactRelVelocity (const Velocity velA, const Length2 relA, const Velocity velB, const Length2 relB) noexcept |
Gets the contact relative velocity. More... | |
PLAYRHO_CONSTEXPR Vec2 | GetVec2 (const UnitVec value) |
Gets a Vec2 representation of the given value. More... | |
Angle | GetAngle (const UnitVec value) |
Gets the angle of the given unit vector. More... | |
template<class T , LoValueCheck lo, HiValueCheck hi> | |
PLAYRHO_CONSTEXPR Vector2< T > | operator* (BoundedValue< T, lo, hi > s, UnitVec u) noexcept |
Multiplication operator. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR Vector2< T > | operator* (const T s, const UnitVec u) noexcept |
Multiplication operator. More... | |
template<class T , LoValueCheck lo, HiValueCheck hi> | |
PLAYRHO_CONSTEXPR Vector2< T > | operator* (UnitVec u, BoundedValue< T, lo, hi > s) noexcept |
Multiplication operator. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR Vector2< T > | operator* (const UnitVec u, const T s) noexcept |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Vec2 | operator/ (const UnitVec u, const UnitVec::value_type s) noexcept |
Division operator. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR auto | Rotate (const Vector2< T > vector, const UnitVec &angle) noexcept |
Rotates a vector by a given angle. More... | |
template<class T > | |
PLAYRHO_CONSTEXPR auto | InverseRotate (const Vector2< T > vector, const UnitVec &angle) noexcept |
Inverse rotates a vector. More... | |
template<class T > | |
UnitVec | GetUnitVector (Vector2< T > value, UnitVec fallback=UnitVec::GetDefaultFallback()) |
Position | GetNormalized (const Position &val) noexcept |
Gets the "normalized" position. More... | |
Sweep | GetNormalized (Sweep sweep) noexcept |
Gets a sweep with the given sweep's angles normalized. More... | |
PLAYRHO_CONSTEXPR Length2 | Transform (const Length2 v, const Transformation xfm) noexcept |
Transforms the given 2-D vector with the given transformation. More... | |
PLAYRHO_CONSTEXPR Length2 | InverseTransform (const Length2 v, const Transformation T) noexcept |
Inverse transforms the given 2-D vector with the given transformation. More... | |
PLAYRHO_CONSTEXPR Transformation | Mul (const Transformation &A, const Transformation &B) noexcept |
Multiplies a given transformation by another given transformation. More... | |
PLAYRHO_CONSTEXPR Transformation | MulT (const Transformation &A, const Transformation &B) noexcept |
Inverse multiplies a given transformation by another given transformation. More... | |
PLAYRHO_CONSTEXPR Transformation | GetTransformation (const Length2 ctr, const UnitVec rot, const Length2 localCtr) noexcept |
Gets the transformation for the given values. More... | |
Transformation | GetTransformation (const Position pos, const Length2 local_ctr) noexcept |
Gets the transformation for the given values. More... | |
Transformation | GetTransformation (const Sweep &sweep, const Real beta) noexcept |
Gets the interpolated transform at a specific time. More... | |
Transformation | GetTransform0 (const Sweep &sweep) noexcept |
Gets the transform at "time" zero. More... | |
Transformation | GetTransform1 (const Sweep &sweep) noexcept |
Gets the transform at "time" one. More... | |
bool | IsUnderActive (Velocity velocity, LinearVelocity linSleepTol, AngularVelocity angSleepTol) noexcept |
Gets whether the given velocity is "under active" based on the given tolerances. More... | |
PLAYRHO_CONSTEXPR auto | GetReflectionMatrix (UnitVec axis) |
Gets the reflection matrix for the given unit vector that defines the normal of the line through the origin that points should be reflected against. More... | |
PLAYRHO_CONSTEXPR bool | operator== (const Position &lhs, const Position &rhs) |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const Position &lhs, const Position &rhs) |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR Position | operator- (const Position &value) |
Negation operator. More... | |
PLAYRHO_CONSTEXPR Position | operator+ (const Position &value) |
Positive operator. More... | |
PLAYRHO_CONSTEXPR Position & | operator+= (Position &lhs, const Position &rhs) |
Addition assignment operator. More... | |
PLAYRHO_CONSTEXPR Position | operator+ (const Position &lhs, const Position &rhs) |
Addition operator. More... | |
PLAYRHO_CONSTEXPR Position & | operator-= (Position &lhs, const Position &rhs) |
Subtraction assignment operator. More... | |
PLAYRHO_CONSTEXPR Position | operator- (const Position &lhs, const Position &rhs) |
Subtraction operator. More... | |
PLAYRHO_CONSTEXPR Position | operator* (const Position &pos, const Real scalar) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Position | operator* (const Real scalar, const Position &pos) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Position | GetPosition (const Position pos0, const Position pos1, const Real beta) noexcept |
PLAYRHO_CONSTEXPR bool | operator== (Transformation lhs, Transformation rhs) noexcept |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (Transformation lhs, Transformation rhs) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR UnitVec | GetXAxis (UnitVec rot) noexcept |
Gets the "X-axis". More... | |
PLAYRHO_CONSTEXPR UnitVec | GetYAxis (UnitVec rot) noexcept |
Gets the "Y-axis". More... | |
PLAYRHO_CONSTEXPR bool | operator== (const UnitVec a, const UnitVec b) noexcept |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const UnitVec a, const UnitVec b) noexcept |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR UnitVec | GetRevPerpendicular (const UnitVec vector) noexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | GetFwdPerpendicular (const UnitVec vector) noexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | Rotate (const UnitVec vector, const UnitVec &angle) noexcept |
Rotates a unit vector by the angle expressed by the second unit vector. More... | |
PLAYRHO_CONSTEXPR UnitVec | InverseRotate (const UnitVec vector, const UnitVec &angle) noexcept |
Inverse rotates a vector. More... | |
template<std::size_t I> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | get (UnitVec v) noexcept |
Gets the specified element of the given collection. More... | |
template<> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | get< 0 > (UnitVec v) noexcept |
Gets element 0 of the given collection. More... | |
template<> | |
PLAYRHO_CONSTEXPR UnitVec::value_type | get< 1 > (UnitVec v) noexcept |
Gets element 1 of the given collection. More... | |
inline ::std::ostream & | operator<< (::std::ostream &os, const UnitVec &value) |
Output stream operator. More... | |
VelocityPair | CalcWarmStartVelocityDeltas (const VelocityConstraint &vc) |
Calculates the "warm start" velocity deltas for the given velocity constraint. More... | |
PLAYRHO_CONSTEXPR bool | operator== (const Velocity &lhs, const Velocity &rhs) |
Equality operator. More... | |
PLAYRHO_CONSTEXPR bool | operator!= (const Velocity &lhs, const Velocity &rhs) |
Inequality operator. More... | |
PLAYRHO_CONSTEXPR Velocity & | operator*= (Velocity &lhs, const Real rhs) |
Multiplication assignment operator. More... | |
PLAYRHO_CONSTEXPR Velocity & | operator/= (Velocity &lhs, const Real rhs) |
Division assignment operator. More... | |
PLAYRHO_CONSTEXPR Velocity & | operator+= (Velocity &lhs, const Velocity &rhs) |
Addition assignment operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator+ (const Velocity &lhs, const Velocity &rhs) |
Addition operator. More... | |
PLAYRHO_CONSTEXPR Velocity & | operator-= (Velocity &lhs, const Velocity &rhs) |
Subtraction assignment operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator- (const Velocity &lhs, const Velocity &rhs) |
Subtraction operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator- (const Velocity &value) |
Negation operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator+ (const Velocity &value) |
Positive operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator* (const Velocity &lhs, const Real rhs) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator* (const Real lhs, const Velocity &rhs) |
Multiplication operator. More... | |
PLAYRHO_CONSTEXPR Velocity | operator/ (const Velocity &lhs, const Real rhs) |
Division operator. More... | |
bool | ShouldCollide (const Body &lhs, const Body &rhs) noexcept |
Should collide. More... | |
BodyCounter | GetWorldIndex (const Body *body) noexcept |
Gets the world index for the given body. More... | |
Velocity | GetVelocity (const Body &body, Time h) noexcept |
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration. More... | |
Velocity | Cap (Velocity velocity, Time h, MovementConf conf) noexcept |
Caps velocity. More... | |
std::size_t | GetFixtureCount (const Body &body) noexcept |
Gets the fixture count of the given body. More... | |
void | RotateAboutWorldPoint (Body &body, Angle amount, Length2 worldPoint) |
Rotates a body a given amount around a point in world coordinates. More... | |
void | RotateAboutLocalPoint (Body &body, Angle amount, Length2 localPoint) |
Rotates a body a given amount around a point in body local coordinates. More... | |
Force2 | GetCentripetalForce (const Body &body, Length2 axis) |
Gets the centripetal force necessary to put the body into an orbit having the given radius. More... | |
Acceleration | CalcGravitationalAcceleration (const Body &body) noexcept |
Calculates the gravitationally associated acceleration for the given body within its world. More... | |
Acceleration | GetAcceleration (const Body &body) noexcept |
Gets the given body's acceleration. More... | |
void | SetAcceleration (Body &body, Acceleration value) noexcept |
Sets the accelerations on the given body. More... | |
bool | Awaken (Body &body) noexcept |
Awakens the body if it's asleep. More... | |
bool | Unawaken (Body &body) noexcept |
Puts the body to sleep if it's awake. More... | |
Position | GetPosition1 (const Body &body) noexcept |
Gets the "position 1" Position information for the given body. More... | |
Mass | GetMass (const Body &body) noexcept |
Gets the mass of the body. More... | |
void | SetLinearAcceleration (Body &body, LinearAcceleration2 value) noexcept |
Sets the given linear acceleration of the given body. More... | |
void | SetAngularAcceleration (Body &body, AngularAcceleration value) noexcept |
Sets the given angular acceleration of the given body. More... | |
void | ApplyLinearAcceleration (Body &body, LinearAcceleration2 amount) |
Applies the given linear acceleration to the given body. More... | |
void | SetForce (Body &body, Force2 force, Length2 point) noexcept |
Sets the given amount of force at the given point to the given body. More... | |
void | ApplyForce (Body &body, Force2 force, Length2 point) noexcept |
Apply a force at a world point. More... | |
void | ApplyForceToCenter (Body &body, Force2 force) noexcept |
Apply a force to the center of mass. More... | |
void | SetTorque (Body &body, Torque torque) noexcept |
Sets the given amount of torque to the given body. More... | |
void | ApplyTorque (Body &body, Torque torque) noexcept |
Applies a torque. More... | |
void | ApplyLinearImpulse (Body &body, Momentum2 impulse, Length2 point) noexcept |
Applies an impulse at a point. More... | |
void | ApplyAngularImpulse (Body &body, AngularMomentum impulse) noexcept |
Applies an angular impulse. More... | |
RotInertia | GetRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body. More... | |
RotInertia | GetLocalRotInertia (const Body &body) noexcept |
Gets the rotational inertia of the body about the local origin. More... | |
LinearVelocity2 | GetLinearVelocity (const Body &body) noexcept |
Gets the linear velocity of the center of mass. More... | |
AngularVelocity | GetAngularVelocity (const Body &body) noexcept |
Gets the angular velocity. More... | |
void | SetLinearVelocity (Body &body, const LinearVelocity2 v) noexcept |
Sets the linear velocity of the center of mass. More... | |
void | SetAngularVelocity (Body &body, AngularVelocity omega) noexcept |
Sets the angular velocity. More... | |
Length2 | GetWorldPoint (const Body &body, const Length2 localPoint) noexcept |
Gets the world coordinates of a point given in coordinates relative to the body's origin. More... | |
Length2 | GetWorldVector (const Body &body, const Length2 localVector) noexcept |
Gets the world coordinates of a vector given the local coordinates. More... | |
UnitVec | GetWorldVector (const Body &body, const UnitVec localVector) noexcept |
Gets the world vector for the given local vector from the given body's transformation. More... | |
Length2 | GetLocalPoint (const Body &body, const Length2 worldPoint) noexcept |
Gets a local point relative to the body's origin given a world point. More... | |
UnitVec | GetLocalVector (const Body &body, const UnitVec uv) noexcept |
Gets a locally oriented unit vector given a world oriented unit vector. More... | |
LinearVelocity2 | GetLinearVelocityFromWorldPoint (const Body &body, const Length2 worldPoint) noexcept |
Gets the linear velocity from a world point attached to this body. More... | |
LinearVelocity2 | GetLinearVelocityFromLocalPoint (const Body &body, const Length2 localPoint) noexcept |
Gets the linear velocity from a local point. More... | |
Force2 | GetForce (const Body &body) noexcept |
Gets the net force that the given body is currently experiencing. More... | |
Torque | GetTorque (const Body &body) noexcept |
Gets the net torque that the given body is currently experiencing. More... | |
Length2 | GetLocation (const Body &body) noexcept |
Gets the body's origin location. More... | |
Angle | GetAngle (const Body &body) noexcept |
Gets the body's angle. More... | |
Transformation | GetTransformation (const Body &body) noexcept |
Gets the body's transformation. More... | |
void | SetTransformation (Body &body, const Transformation &xfm) noexcept |
Sets the body's transformation. More... | |
Position | GetPosition (const Body &body) noexcept |
Gets the body's position. More... | |
void | SetLocation (Body &body, Length2 value) noexcept |
Sets the body's location. More... | |
void | SetAngle (Body &body, Angle value) noexcept |
Sets the body's angular orientation. More... | |
BodyConf | GetBodyConf (const Body &body) noexcept |
Gets the body definition for the given body. More... | |
PLAYRHO_CONSTEXPR BodyConf | GetDefaultBodyConf () noexcept |
Gets the default body definition. More... | |
ContactImpulsesList | GetContactImpulses (const VelocityConstraint &vc) |
Gets the contact impulses for the given velocity constraint. More... | |
Momentum | GetMaxNormalImpulse (const ContactImpulsesList &impulses) noexcept |
Gets the maximum normal impulse from the given contact impulses list. More... | |
BodyConstraint | GetBodyConstraint (const Body &body, Time time, MovementConf conf) noexcept |
Gets the BodyConstraint based on the given parameters. More... | |
Body * | GetBodyA (const Contact &contact) noexcept |
Gets the body A associated with the given contact. More... | |
Body * | GetBodyB (const Contact &contact) noexcept |
Gets the body B associated with the given contact. More... | |
bool | HasSensor (const Contact &contact) noexcept |
Whether the given contact has a sensor. More... | |
bool | IsImpenetrable (const Contact &contact) noexcept |
Whether the given contact is "impenetrable". More... | |
bool | IsActive (const Contact &contact) noexcept |
Determines whether the given contact is "active". More... | |
void | SetAwake (const Contact &c) noexcept |
Sets awake the fixtures of the given contact. More... | |
void | ResetFriction (Contact &contact) |
Resets the friction mixture to the default value. More... | |
void | ResetRestitution (Contact &contact) noexcept |
Reset the restitution to the default value. More... | |
TOIOutput | CalcToi (const Contact &contact, ToiConf conf) |
Calculates the Time Of Impact for the given contact with the given configuration. More... | |
Fixture * | GetFixtureA (const Contact &contact) noexcept |
Gets the fixture A associated with the given contact. More... | |
Fixture * | GetFixtureB (const Contact &contact) noexcept |
Gets the fixture B associated with the given contact. More... | |
ChildCounter | GetChildIndexA (const Contact &contact) noexcept |
Gets the child index A of the given contact. More... | |
ChildCounter | GetChildIndexB (const Contact &contact) noexcept |
Gets the child index B of the given contact. More... | |
ContactKey | GetContactKey (const Fixture &fixtureA, ChildCounter childIndexA, const Fixture &fixtureB, ChildCounter childIndexB) noexcept |
Gets the ContactKey for the given parameters. More... | |
ContactKey | GetContactKey (const Contact &contact) noexcept |
Gets the ContactKey for the given contact. More... | |
Contact * | GetContactPtr (KeyedContactPtr value) |
Gets the contact pointer for the given value. More... | |
PositionSolution | operator+ (PositionSolution lhs, PositionSolution rhs) |
Addition operator. More... | |
PositionSolution | operator- (PositionSolution lhs, PositionSolution rhs) |
Subtraction operator. More... | |
PositionSolverManifold | GetPSM (const Manifold &manifold, Manifold::size_type index, const Transformation &xfA, const Transformation &xfB) |
VelocityConstraint::Conf | GetRegVelocityConstraintConf (const StepConf &conf) noexcept |
Gets the regular phase velocity constraint configuration from the given step configuration. More... | |
VelocityConstraint::Conf | GetToiVelocityConstraintConf (const StepConf &conf) noexcept |
Gets the TOI phase velocity constraint configuration from the given step configuration. More... | |
UnitVec | GetNormal (const VelocityConstraint &vc) noexcept |
UnitVec | GetTangent (const VelocityConstraint &vc) noexcept |
Gets the tangent from the given velocity constraint data. More... | |
InvMass | GetInvMass (const VelocityConstraint &vc) noexcept |
Gets the inverse mass from the given velocity constraint data. More... | |
Length2 | GetPointRelPosA (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the point relative position A data. More... | |
Length2 | GetPointRelPosB (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the point relative position B data. More... | |
LinearVelocity | GetVelocityBiasAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the velocity bias at the given point from the given velocity constraint. More... | |
Mass | GetNormalMassAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the normal mass at the given point from the given velocity constraint. More... | |
Mass | GetTangentMassAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the tangent mass at the given point from the given velocity constraint. More... | |
Momentum | GetNormalImpulseAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the normal impulse at the given point from the given velocity constraint. More... | |
Momentum | GetTangentImpulseAtPoint (const VelocityConstraint &vc, VelocityConstraint::size_type index) |
Gets the tangent impulse at the given point from the given velocity constraint. More... | |
Momentum2 | GetNormalImpulses (const VelocityConstraint &vc) |
Gets the normal impulses of the given velocity constraint. More... | |
Momentum2 | GetTangentImpulses (const VelocityConstraint &vc) |
Gets the tangent impulses of the given velocity constraint. More... | |
void | SetNormalImpulseAtPoint (VelocityConstraint &vc, VelocityConstraint::size_type index, Momentum value) |
Sets the normal impulse at the given point of the given velocity constraint. More... | |
void | SetTangentImpulseAtPoint (VelocityConstraint &vc, VelocityConstraint::size_type index, Momentum value) |
Sets the tangent impulse at the given point of the given velocity constraint. More... | |
void | SetNormalImpulses (VelocityConstraint &vc, const Momentum2 impulses) |
Sets the normal impulses of the given velocity constraint. More... | |
void | SetTangentImpulses (VelocityConstraint &vc, const Momentum2 impulses) |
Sets the tangent impulses of the given velocity constraint. More... | |
bool | TestPoint (const Fixture &f, Length2 p) noexcept |
Tests a point for containment in a fixture. More... | |
void | SetAwake (const Fixture &f) noexcept |
Sets the associated body's sleep status to awake. More... | |
Transformation | GetTransformation (const Fixture &f) noexcept |
Gets the transformation associated with the given fixture. More... | |
bool | ShouldCollide (const Fixture &fixtureA, const Fixture &fixtureB) noexcept |
Whether contact calculations should be performed between the two fixtures. More... | |
FixtureConf | GetFixtureConf (const Fixture &fixture) noexcept |
Gets the fixture definition for the given fixture. More... | |
PLAYRHO_CONSTEXPR FixtureConf | GetDefaultFixtureConf () noexcept |
Gets the default fixture definition. More... | |
std::size_t | Count (const Island &island, const Body *entry) |
Counts the number of occurrences of the given entry in the given island. More... | |
std::size_t | Count (const Island &island, const Contact *entry) |
Counts the number of occurrences of the given entry in the given island. More... | |
std::size_t | Count (const Island &island, const Joint *entry) |
Counts the number of occurrences of the given entry in the given island. More... | |
bool | IsFullOfBodies (const Island &island) |
Determines whether the given island is full of bodies. More... | |
bool | IsFullOfContacts (const Island &island) |
Determines whether the given island is full of contacts. More... | |
DistanceJointConf | GetDistanceJointConf (const DistanceJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
FrictionJointConf | GetFrictionJointConf (const FrictionJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
GearJointConf | GetGearJointConf (const GearJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
bool | IsEnabled (const Joint &j) noexcept |
Short-cut function to determine if both bodies are enabled. More... | |
void | SetAwake (Joint &j) noexcept |
Wakes up the joined bodies. More... | |
JointCounter | GetWorldIndex (const Joint *joint) |
Gets the world index of the given joint. More... | |
BodyConstraintPtr & | At (std::unordered_map< const Body *, BodyConstraint * > &container, const Body *key) |
Provides referenced access to the identified element of the given container. More... | |
const char * | ToString (Joint::LimitState val) noexcept |
Provides a human readable C-style string uniquely identifying the given limit state. More... | |
template<class T > | |
void | IncMotorSpeed (T &j, AngularVelocity delta) |
Increment motor speed. More... | |
void | Set (JointConf &def, const Joint &joint) noexcept |
Sets the joint definition data for the given joint. More... | |
JointKey | GetJointKey (const Joint &joint) noexcept |
Gets the JointKey for the given joint. More... | |
PLAYRHO_CONSTEXPR int | Compare (const JointKey &lhs, const JointKey &rhs) noexcept |
Compares the given joint keys. More... | |
PLAYRHO_CONSTEXPR bool | IsFor (const JointKey key, const Body *body) noexcept |
Determines whether the given key is for the given body. More... | |
Joint * | GetJointPtr (std::pair< JointKey, Joint * > value) |
Gets the joint pointer from the given value. More... | |
JointType | GetType (const Joint &joint) noexcept |
Gets the type of the given joint. More... | |
const char * | ToString (JointType type) noexcept |
Provides a C-style (null-terminated) string name for given joint type. More... | |
MotorJointConf | GetMotorJointConf (const MotorJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
Length | GetJointTranslation (const PrismaticJoint &joint) noexcept |
Get the current joint translation. More... | |
LinearVelocity | GetLinearVelocity (const PrismaticJoint &joint) noexcept |
Get the current joint translation speed. More... | |
Force | GetMotorForce (const PrismaticJoint &joint, Frequency inv_dt) noexcept |
Gets the current motor force for the given joint, given the inverse time step. More... | |
PrismaticJointConf | GetPrismaticJointConf (const PrismaticJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
Length | GetCurrentLengthA (const PulleyJoint &joint) |
Get the current length of the segment attached to body-A. More... | |
Length | GetCurrentLengthB (const PulleyJoint &joint) |
Get the current length of the segment attached to body-B. More... | |
PulleyJointConf | GetPulleyJointConf (const PulleyJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
Angle | GetJointAngle (const RevoluteJoint &joint) |
Gets the current joint angle. More... | |
AngularVelocity | GetAngularVelocity (const RevoluteJoint &joint) |
Gets the current joint angle speed. More... | |
Torque | GetMotorTorque (const RevoluteJoint &joint, Frequency inv_dt) noexcept |
Gets the current motor torque for the given joint given the inverse time step. More... | |
RevoluteJointConf | GetRevoluteJointConf (const RevoluteJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
RopeJointConf | GetRopeJointConf (const RopeJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
TargetJointConf | GetTargetJointConf (const TargetJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
WeldJointConf | GetWeldJointConf (const WeldJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
Length | GetJointTranslation (const WheelJoint &joint) noexcept |
Get the current joint translation. More... | |
AngularVelocity | GetAngularVelocity (const WheelJoint &joint) noexcept |
Get the current joint translation speed. More... | |
Torque | GetMotorTorque (const WheelJoint &joint, Frequency inv_dt) noexcept |
Gets the current motor torque for the given joint for the given the inverse time step. More... | |
WheelJointConf | GetWheelJointConf (const WheelJoint &joint) noexcept |
Gets the definition data for the given joint. More... | |
StepStats | Step (World &world, Time delta, TimestepIters velocityIterations=8, TimestepIters positionIterations=3) |
Steps the world ahead by a given time amount. More... | |
ContactCounter | GetTouchingCount (const World &world) noexcept |
Gets the touching count for the given world. More... | |
size_t | GetFixtureCount (const World &world) noexcept |
Gets the count of fixtures in the given world. More... | |
size_t | GetShapeCount (const World &world) noexcept |
Gets the count of unique shapes in the given world. More... | |
BodyCounter | GetAwakeCount (const World &world) noexcept |
Gets the count of awake bodies in the given world. More... | |
BodyCounter | Awaken (World &world) noexcept |
Awakens all of the bodies in the given world. More... | |
void | SetAccelerations (World &world, Acceleration acceleration) noexcept |
Sets the accelerations of all the world's bodies to the given value. More... | |
void | SetAccelerations (World &world, LinearAcceleration2 acceleration) noexcept |
Sets the accelerations of all the world's bodies to the given value. More... | |
Body * | FindClosestBody (const World &world, Length2 location) noexcept |
Finds body in given world that's closest to the given location. More... | |
BodyCounter | GetBodyCount (const World &world) noexcept |
Gets the body count in the given world. More... | |
JointCounter | GetJointCount (const World &world) noexcept |
ContactCounter | GetContactCount (const World &world) noexcept |
Gets the count of contacts in the given world. More... | |
template<class F > | |
void | SetAccelerations (World &world, F fn) noexcept |
Sets the accelerations of all the world's bodies. More... | |
void | ClearForces (World &world) noexcept |
Clears forces. More... | |
PLAYRHO_CONSTEXPR WorldConf | GetDefaultWorldConf () noexcept |
Variables | |
const PLAYRHO_CONSTEXPR auto | Transform_identity |
Identity transformation value. More... | |
const PLAYRHO_CONSTEXPR auto | EarthlyGravity |
Earthly gravity in 2-dimensions. More... | |
Detailed Description
Name space for 2-dimensionally related PlayRho names.
Typedef Documentation
◆ AABB
using playrho::d2::AABB = typedef detail::AABB<2> |
◆ ClipList
using playrho::d2::ClipList = typedef ArrayList<ClipVertex, MaxManifoldPoints> |
Clip list for ClipSegmentToLine
.
- See also
- ClipSegmentToLine.
- Note
- This data structure is at least 24-bytes large.
Definition at line 77 of file Collision.hpp.
◆ DynamicTreeSizeCB
using playrho::d2::DynamicTreeSizeCB = typedef std::function<DynamicTreeOpcode(DynamicTree::Size)> |
Query callback type.
Definition at line 744 of file DynamicTree.hpp.
◆ QueryFixtureCallback
using playrho::d2::QueryFixtureCallback = typedef std::function<bool(Fixture* fixture, ChildCounter child)> |
Query AABB for fixtures callback function type.
- Note
- Returning true will continue the query. Returning false will terminate the query.
Definition at line 753 of file DynamicTree.hpp.
◆ LengthIndices
using playrho::d2::LengthIndices = typedef detail::LengthIndices<2> |
Length and vertex counter array of indices for 2-D space.
Definition at line 144 of file IndexPair.hpp.
◆ SeparationInfo
using playrho::d2::SeparationInfo = typedef detail::SeparationInfo<2> |
Separation information alias for 2-D space.
Definition at line 147 of file IndexPair.hpp.
◆ MassData
using playrho::d2::MassData = typedef detail::MassData<2> |
Mass data alias for 2-D objects.
- Note
- This data structure is 16-bytes large (on at least one 64-bit platform).
Definition at line 77 of file MassData.hpp.
◆ RayCastInput
using playrho::d2::RayCastInput = typedef playrho::detail::RayCastInput<2> |
Ray cast input data for 2-dimensions.
Definition at line 52 of file RayCastInput.hpp.
◆ RayCastOutput
using playrho::d2::RayCastOutput = typedef Optional<RayCastHit> |
Ray cast output.
This is a type alias for an optional RayCastHit
instance.
- See also
- RayCast, Optional, RayCastHit
Definition at line 86 of file RayCastOutput.hpp.
◆ DynamicTreeRayCastCB
using playrho::d2::DynamicTreeRayCastCB = typedef std::function<Real(Fixture* fixture, ChildCounter child, const RayCastInput& input)> |
Ray cast callback function.
- Note
- Return 0 to terminate ray casting, or > 0 to update the segment bounding box.
Definition at line 91 of file RayCastOutput.hpp.
◆ FixtureRayCastCB
using playrho::d2::FixtureRayCastCB = typedef std::function<RayCastOpcode(Fixture* fixture, ChildCounter child, Length2 point, UnitVec normal)> |
Ray cast callback function signature.
Definition at line 95 of file RayCastOutput.hpp.
◆ TypeInfoVisitor
using playrho::d2::TypeInfoVisitor = typedef std::function<void(const std::type_info& ti, const void* data)> |
◆ SimplexEdges
using playrho::d2::SimplexEdges = typedef ArrayList<SimplexEdge, MaxSimplexEdges, std::remove_const<decltype(MaxSimplexEdges)>::type> |
Simplex edge collection.
- Note
- This data is 20 * 3 + 4 = 64-bytes large (on at least one 64-bit platform).
Definition at line 34 of file Simplex.hpp.
◆ VelocityPair
using playrho::d2::VelocityPair = typedef std::pair<Velocity, Velocity> |
Velocity pair.
Definition at line 142 of file Velocity.hpp.
◆ ContactPtr
using playrho::d2::ContactPtr = typedef Contact* |
Contact pointer type.
Definition at line 529 of file Contact.hpp.
◆ KeyedContactPtr
using playrho::d2::KeyedContactPtr = typedef std::pair<ContactKey, Contact*> |
Keyed contact pointer.
Definition at line 118 of file ContactKey.hpp.
◆ BodyConstraintPtr
using playrho::d2::BodyConstraintPtr = typedef BodyConstraint* |
◆ BodyConstraintPair
using playrho::d2::BodyConstraintPair = typedef std::pair<const Body*, BodyConstraintPtr> |
◆ BodyConstraintsMap
using playrho::d2::BodyConstraintsMap = typedef std::unordered_map<const Body*, BodyConstraint*> |
◆ BodyPtr
using playrho::d2::BodyPtr = typedef Body* |
◆ BodyConstraintsPair
using playrho::d2::BodyConstraintsPair = typedef std::pair<const Body* const, BodyConstraint*> |
◆ BodyConstraints
using playrho::d2::BodyConstraints = typedef std::vector<BodyConstraint> |
◆ PositionConstraints
using playrho::d2::PositionConstraints = typedef std::vector<PositionConstraint> |
◆ VelocityConstraints
using playrho::d2::VelocityConstraints = typedef std::vector<VelocityConstraint> |
Enumeration Type Documentation
◆ DynamicTreeOpcode
|
strong |
Opcodes for dynamic tree callbacks.
Enumerator | |
---|---|
End | |
Continue |
Definition at line 737 of file DynamicTree.hpp.
◆ JointType
|
strong |
Enumeration of joint types.
Enumerator | |
---|---|
Unknown | |
Revolute | |
Prismatic | |
Distance | |
Pulley | |
Target | |
Gear | |
Wheel | |
Weld | |
Friction | |
Rope | |
Motor |
Definition at line 33 of file JointType.hpp.
Function Documentation
◆ ComputeAABB() [1/5]
|
noexcept |
Computes the AABB.
Computes the Axis Aligned Bounding Box (AABB) for the given child shape at a given a transform.
- Warning
- Behavior is undefined if the given transformation is invalid.
- Parameters
-
proxy Distance proxy for the child shape. xf World transform of the shape.
- Returns
- AABB for the proxy shape or the default AABB if the proxy has a zero vertex count.
◆ ComputeAABB() [2/5]
|
noexcept |
Computes the AABB.
Computes the Axis Aligned Bounding Box (AABB) for the given child shape at the given transforms.
- Warning
- Behavior is undefined if a given transformation is invalid.
- Parameters
-
proxy Distance proxy for the child shape. xfm0 World transform 0 of the shape. xfm1 World transform 1 of the shape.
- Returns
- AABB for the proxy shape or the default AABB if the proxy has a zero vertex count.
◆ ComputeAABB() [3/5]
|
noexcept |
◆ ComputeAABB() [4/5]
◆ ComputeAABB() [5/5]
◆ ComputeIntersectingAABB() [1/2]
|
noexcept |
◆ ComputeIntersectingAABB() [2/2]
◆ GetAABB() [1/3]
|
noexcept |
◆ GetPerimeter()
|
inlinenoexcept |
Gets the perimeter length of the 2-dimensional AABB.
- Warning
- Behavior is undefined for an invalid AABB.
- Returns
- Twice the sum of the width and height.
◆ GetPointStates()
|
noexcept |
Computes the point states given two manifolds.
- Examples
- World.cpp.
Definition at line 27 of file Collision.cpp.
◆ ClipSegmentToLine()
ClipList playrho::d2::ClipSegmentToLine | ( | const ClipList & | vIn, |
const UnitVec & | normal, | ||
Length | offset, | ||
ContactFeature::Index | indexA | ||
) |
Clipping for contact manifolds.
This returns an array of points from the given line that are inside of the plane as defined by a given normal and offset.
- Parameters
-
vIn Clip list of two points defining the line. normal Normal of the plane with which to determine intersection. offset Offset of the plane with which to determine intersection. indexA Index of vertex A.
- Returns
- List of zero one or two clip points.
Definition at line 68 of file Collision.cpp.
◆ GetDistanceConf()
|
noexcept |
Gets the distance configuration for the given time of impact configuration.
Definition at line 75 of file Distance.cpp.
◆ GetWitnessPoints()
|
noexcept |
Gets the witness points of the given simplex.
Definition at line 82 of file Distance.cpp.
◆ Distance()
DistanceOutput Distance | ( | const DistanceProxy & | proxyA, |
const Transformation & | transformA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | transformB, | ||
DistanceConf | conf = DistanceConf{} |
||
) |
Determines the closest points between two shapes.
- Note
- Supports any combination of shapes.
-
On the first call, the Simplex::Cache.count should be set to zero.
- Parameters
-
proxyA Proxy A. transformA Transform of A. proxyB Proxy B. transformB Transform of B. conf Configuration to use including the simplex cache for assisting the determination.
- Returns
- Closest points between the two shapes and the count of iterations it took to determine them. The iteration count will always be greater than zero unless
DefaultMaxDistanceIters
is zero.
- Examples
- World.cpp.
Definition at line 108 of file Distance.cpp.
◆ TestOverlap() [1/2]
Area playrho::d2::TestOverlap | ( | const DistanceProxy & | proxyA, |
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB, | ||
DistanceConf | conf = DistanceConf{} |
||
) |
Determine if two generic shapes overlap.
- Note
- The returned touching state information typically agrees with that returned from the
CollideShapes
function. This is not always the case however especially when the separation or overlap distance is closer to zero.
Definition at line 217 of file Distance.cpp.
◆ GetDelta()
|
inlinenoexcept |
Gets the delta to go from the first element to the second.
Definition at line 43 of file Distance.hpp.
◆ operator==() [1/14]
|
noexcept |
Determines with the two given distance proxies are equal.
Definition at line 28 of file DistanceProxy.cpp.
◆ FindLowestRightMostVertex()
Finds the lowest right most vertex in the given collection.
Definition at line 41 of file DistanceProxy.cpp.
◆ GetConvexHullAsVector()
Gets the convex hull for the given collection of vertices as a vector.
Definition at line 61 of file DistanceProxy.cpp.
◆ operator!=() [1/14]
|
inlinenoexcept |
Determines with the two given distance proxies are not equal.
Definition at line 199 of file DistanceProxy.hpp.
◆ GetVertexRadius() [1/11]
|
inlinenoexcept |
Gets the vertex radius property of a given distance proxy.
Definition at line 205 of file DistanceProxy.hpp.
◆ GetSupportIndex()
|
inlinenoexcept |
Gets the supporting vertex index in the given direction for the given distance proxy.
This finds the vertex that's most significantly in the direction of the given vector and returns its index.
- Note
- 0 is returned for a given zero length direction vector.
- Parameters
-
proxy Distance proxy object to find index in if a valid index exists for it. dir Direction vector to find index for.
- Returns
InvalidVertex
if d is invalid or the count of vertices is zero, otherwise a value from 0 to one less than count.
- See also
- GetVertexCount().
Definition at line 221 of file DistanceProxy.hpp.
◆ swap()
|
noexcept |
- Note
- This satisfies the
Swappable
concept.
Definition at line 666 of file DynamicTree.cpp.
◆ Query() [1/2]
void playrho::d2::Query | ( | const DynamicTree & | tree, |
const AABB & | aabb, | ||
const DynamicTreeSizeCB & | callback | ||
) |
Query the given dynamic tree and find nodes overlapping the given AABB.
- Note
- The callback instance is called for each leaf node that overlaps the supplied AABB.
- Examples
- World.cpp.
Definition at line 677 of file DynamicTree.cpp.
◆ Query() [2/2]
void playrho::d2::Query | ( | const DynamicTree & | tree, |
const AABB & | aabb, | ||
QueryFixtureCallback | callback | ||
) |
Queries the world for all fixtures that potentially overlap the provided AABB.
- Parameters
-
tree Dynamic tree to do the query over. aabb The query box. callback User implemented callback function.
Definition at line 711 of file DynamicTree.cpp.
◆ ComputeTotalPerimeter()
|
noexcept |
Gets the sum of the perimeters of nodes.
- Note
- Zero is returned if no proxies exist at the time of the call.
- Returns
- Value of zero or more.
Definition at line 720 of file DynamicTree.cpp.
◆ ComputePerimeterRatio()
|
noexcept |
Gets the ratio of the sum of the perimeters of nodes to the root perimeter.
- Note
- Zero is returned if no proxies exist at the time of the call.
- Returns
- Value of zero or more.
- Examples
- World.cpp.
Definition at line 734 of file DynamicTree.cpp.
◆ ComputeHeight() [1/2]
|
noexcept |
Computes the height of the tree from a given node.
- Warning
- Behavior is undefined if the given index is not valid.
- Parameters
-
tree Tree to compute the height at the given node for. index ID of node to compute height from.
- Returns
- 0 unless the given index is to a branch node.
Definition at line 746 of file DynamicTree.cpp.
◆ GetMaxImbalance()
|
noexcept |
Gets the maximum imbalance.
This gets the maximum imbalance of nodes in the given tree.
- Note
- The imbalance is the difference in height of the two children of a node.
- Examples
- World.cpp.
Definition at line 759 of file DynamicTree.cpp.
◆ ValidateStructure()
|
noexcept |
Validates the structure of the given tree from the given index.
- Note
- Meant for testing.
- Returns
true
if valid,false
otherwise.
Definition at line 777 of file DynamicTree.cpp.
◆ ValidateMetrics()
|
noexcept |
Validates the metrics of the given tree from the given index.
- Note
- Meant for testing.
- Returns
true
if valid,false
otherwise.
Definition at line 814 of file DynamicTree.cpp.
◆ operator==() [2/14]
|
inlinenoexcept |
Equality operator.
Definition at line 331 of file DynamicTree.hpp.
◆ operator!=() [2/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 339 of file DynamicTree.hpp.
◆ IsUnused()
|
inlinenoexcept |
Is unused.
Whether this node is free (or allocated).
Determines whether the given dynamic tree node is an unused node.
Definition at line 631 of file DynamicTree.hpp.
◆ IsLeaf()
|
inlinenoexcept |
Is leaf.
Whether or not this node is a leaf node.
Determines whether the given dynamic tree node is a leaf node. Leaf nodes have a pointer to user data.
- Note
- This has constant complexity.
- Returns
true
if this is a leaf node,false
otherwise.
Definition at line 640 of file DynamicTree.hpp.
◆ IsBranch()
|
inlinenoexcept |
Is branch.
Determines whether the given dynamic tree node is a branch node. Branch nodes have 2 indices to child nodes.
Determines whether the given node is a "branch" node.
Definition at line 648 of file DynamicTree.hpp.
◆ ReplaceChild()
|
inline |
Replaces the old child with the new child.
Definition at line 622 of file DynamicTree.hpp.
◆ GetAABB() [2/3]
|
inlinenoexcept |
Gets the AABB of the given dynamic tree node.
Definition at line 655 of file DynamicTree.hpp.
◆ GetNext()
|
inlinenoexcept |
Gets the next index of the given node.
- Warning
- Behavior is undefined if the given node is not an "unused" node.
Definition at line 664 of file DynamicTree.hpp.
◆ GetHeight()
|
inlinenoexcept |
Gets the height of the binary tree.
- Returns
- Height of the tree (as stored in the root node) or 0 if the root node is not valid.
- Examples
- World.cpp.
Definition at line 673 of file DynamicTree.hpp.
◆ GetAABB() [3/3]
|
inlinenoexcept |
Gets the AABB for the given dynamic tree.
Gets the AABB that encloses all other AABB instances that are within the given dynamic tree.
- Returns
- Enclosing AABB or the "unset" AABB.
Definition at line 684 of file DynamicTree.hpp.
◆ TestOverlap() [2/2]
|
inlinenoexcept |
Tests for overlap of the elements identified in the given dynamic tree.
Definition at line 692 of file DynamicTree.hpp.
◆ ComputeHeight() [2/2]
|
inlinenoexcept |
Computes the height of the given dynamic tree.
Definition at line 716 of file DynamicTree.hpp.
◆ size()
|
inlinenoexcept |
Gets the "size" of the given tree.
- Note
- Size in this context is defined as the leaf count.
- This provides ancillary support for the container concept's size method.
Definition at line 766 of file DynamicTree.hpp.
◆ GetManifold() [1/3]
Manifold playrho::d2::GetManifold | ( | bool | flipped, |
const DistanceProxy & | shape0, | ||
const Transformation & | xf0, | ||
const VertexCounter | idx0, | ||
const DistanceProxy & | shape1, | ||
const Transformation & | xf1, | ||
const VertexCounter2 | indices1, | ||
const Manifold::Conf | conf | ||
) |
Gets a face-to-face based manifold.
- Parameters
-
flipped Whether to flip the resulting manifold (between face-A and face-B). shape0 Shape 0. This should be shape A for face-A type manifold or shape B for face-B type manifold. xf0 Transform 0. This should be transform A for face-A type manifold or transform B for face-B type manifold. idx0 Index 0. This should be the index of the vertex and normal of shape0 that had the maximal separation distance from any vertex in shape1. shape1 Shape 1. This should be shape B for face-A type manifold or shape A for face-B type manifold. xf1 Transform 1. This should be transform B for face-A type manifold or transform A for face-B type manifold. indices1 Index 1. This is the first and possibly second index of the vertex of shape1 that had the maximal separation distance from the edge of shape0 identified by idx0. conf Manifold configuration data.
< Face offset.
Definition at line 100 of file Manifold.cpp.
◆ GetManifold() [2/3]
Manifold playrho::d2::GetManifold | ( | bool | flipped, |
Length | totalRadius, | ||
const DistanceProxy & | shape, | ||
const Transformation & | sxf, | ||
Length2 | point, | ||
const Transformation & | xfm | ||
) |
Computes manifolds for face-to-point collision.
< Center of circle in frame of polygon.
Definition at line 274 of file Manifold.cpp.
◆ GetManifold() [3/3]
|
noexcept |
Gets a point-to-point based manifold.
Definition at line 371 of file Manifold.cpp.
◆ CollideShapes()
Manifold CollideShapes | ( | const DistanceProxy & | shapeA, |
const Transformation & | xfA, | ||
const DistanceProxy & | shapeB, | ||
const Transformation & | xfB, | ||
Manifold::Conf | conf = GetDefaultManifoldConf() |
||
) |
Calculates the relevant collision manifold.
- Note
- The returned touching state information typically agrees with that returned from the distance-proxy-based
TestOverlap
function. This is not always the case however especially when the separation or overlap distance is closer to zero.
Definition at line 388 of file Manifold.cpp.
◆ GetName()
|
noexcept |
Gets a unique name for the given manifold type.
Definition at line 774 of file Manifold.cpp.
◆ operator==() [3/14]
|
noexcept |
Determines whether the two given manifold points are equal.
Definition at line 787 of file Manifold.cpp.
◆ operator!=() [3/14]
|
noexcept |
Determines whether the two given manifold points are not equal.
Definition at line 808 of file Manifold.cpp.
◆ operator==() [4/14]
Manifold equality operator.
- Note
- In-so-far as manifold points are concerned, order doesn't matter; only whether the two manifolds have the same point set.
Definition at line 813 of file Manifold.cpp.
◆ operator!=() [4/14]
Manifold inequality operator.
Determines whether the two given manifolds are not equal.
Definition at line 890 of file Manifold.cpp.
◆ GetDefaultManifoldConf()
|
inlinenoexcept |
Gets the default manifold configuration.
Definition at line 479 of file Manifold.hpp.
◆ GetMassData() [1/11]
MassData playrho::d2::GetMassData | ( | Length | r, |
NonNegative< AreaDensity > | density, | ||
Length2 | location | ||
) |
Computes the mass data for a circular shape.
- Parameters
-
r Radius of the circular shape. density Areal density of mass. location Location of the center of the shape.
Definition at line 32 of file MassData.cpp.
◆ GetMassData() [2/11]
MassData playrho::d2::GetMassData | ( | Length | r, |
NonNegative< AreaDensity > | density, | ||
Length2 | v0, | ||
Length2 | v1 | ||
) |
Computes the mass data for a linear shape.
- Parameters
-
r Radius of the vertices of the linear shape. density Areal density of mass. v0 Location of vertex zero. v1 Location of vertex one.
Use the fixture's areal mass density times the shape's second moment of area to derive I.
Definition at line 55 of file MassData.cpp.
◆ GetMassData() [3/11]
MassData playrho::d2::GetMassData | ( | Length | vertexRadius, |
NonNegative< AreaDensity > | density, | ||
Span< const Length2 > | vertices | ||
) |
Gets the mass data for the given collection of vertices with the given properties.
Definition at line 89 of file MassData.cpp.
◆ GetMassData() [4/11]
Computes the mass data for the given fixture.
The mass data is based on the density and the shape of the fixture. The rotational inertia is about the shape's origin.
- Note
- This operation may be expensive.
- Parameters
-
f Fixture to compute the mass data for.
Definition at line 182 of file MassData.cpp.
◆ ComputeMassData()
Computes the body's mass data.
This basically accumulates the mass data over all fixtures.
- Note
- The center is the mass weighted sum of all fixture centers. Divide it by the mass to get the averaged center.
- Returns
- accumulated mass data for all fixtures associated with the given body.
Definition at line 187 of file MassData.cpp.
◆ GetMassData() [5/11]
Gets the mass data of the body.
- Returns
- Data structure containing the mass, inertia, and center of the body.
Definition at line 206 of file MassData.cpp.
◆ GetSeparationScenario()
SeparationScenario playrho::d2::GetSeparationScenario | ( | IndexPair3 | indices, |
const DistanceProxy & | proxyA, | ||
const Transformation & | xfA, | ||
const DistanceProxy & | proxyB, | ||
const Transformation & | xfB | ||
) |
Gets a separation finder for the given inputs.
- Warning
- Behavior is undefined if given less than one index pair or more than three.
- Parameters
-
indices Collection of 1 to 3 index pairs. A points-type finder will be returned if given 1 index pair. A face-type finder will be returned otherwise. proxyA Proxy A. xfA Transformation A. proxyB Proxy B. xfB Transformation B.
Definition at line 106 of file SeparationScenario.cpp.
◆ FindMinSeparation()
LengthIndexPair playrho::d2::FindMinSeparation | ( | const SeparationScenario & | scenario, |
const Transformation & | xfA, | ||
const Transformation & | xfB | ||
) |
Finds the minimum separation.
- Returns
- indexes of proxy A's and proxy B's vertices that have the minimum distance between them and what that distance is.
Definition at line 173 of file SeparationScenario.cpp.
◆ Evaluate()
Length playrho::d2::Evaluate | ( | const SeparationScenario & | scenario, |
const Transformation & | xfA, | ||
const Transformation & | xfB, | ||
IndexPair | indexPair | ||
) |
Evaluates the separation of the identified proxy vertices at the given time factor.
- Parameters
-
scenario Separation scenario to evaluate. indexPair Indexes of the proxy A and proxy B vertexes. xfA Transformation A. xfB Transformation B.
- Returns
- Separation distance which will be negative when the given transforms put the vertices on the opposite sides of the separating axis.
Definition at line 186 of file SeparationScenario.cpp.
◆ GetChainShapeConf() [1/3]
ChainShapeConf playrho::d2::GetChainShapeConf | ( | Length2 | dimensions | ) |
Gets an enclosing chain shape configuration for an axis aligned rectangle of the given dimensions (width and height).
Definition at line 173 of file ChainShapeConf.cpp.
◆ GetChainShapeConf() [2/3]
ChainShapeConf playrho::d2::GetChainShapeConf | ( | const AABB & | arg | ) |
Gets an enclosing chain shape configuration for the given axis aligned box.
Definition at line 194 of file ChainShapeConf.cpp.
◆ GetChildCount() [1/6]
|
inlinenoexcept |
Gets the child count for a given chain shape configuration.
- Examples
- World.cpp.
Definition at line 154 of file ChainShapeConf.hpp.
◆ GetChild() [1/6]
|
inline |
Gets the "child" shape for a given chain shape configuration.
Definition at line 160 of file ChainShapeConf.hpp.
◆ GetMassData() [6/11]
|
inlinenoexcept |
Gets the mass data for a given chain shape configuration.
Definition at line 166 of file ChainShapeConf.hpp.
◆ IsLooped()
|
inlinenoexcept |
Determines whether the given shape is looped.
Definition at line 172 of file ChainShapeConf.hpp.
◆ GetNextIndex()
|
inlinenoexcept |
Gets the next index after the given index for the given shape.
Definition at line 179 of file ChainShapeConf.hpp.
◆ GetVertexRadius() [2/11]
|
inline |
Gets the vertex radius of the given shape configuration.
Definition at line 185 of file ChainShapeConf.hpp.
◆ GetVertexRadius() [3/11]
|
inline |
Gets the vertex radius of the given shape configuration.
Definition at line 191 of file ChainShapeConf.hpp.
◆ Transform() [1/7]
|
inlinenoexcept |
Transforms the given chain shape configuration's vertices by the given transformation matrix.
Definition at line 199 of file ChainShapeConf.hpp.
◆ GetChainShapeConf() [3/3]
|
inline |
Gets an enclosing chain shape configuration for an axis aligned square of the given dimension.
Definition at line 210 of file ChainShapeConf.hpp.
◆ operator==() [5/14]
|
inlinenoexcept |
Equality operator.
Definition at line 111 of file DiskShapeConf.hpp.
◆ operator!=() [5/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 119 of file DiskShapeConf.hpp.
◆ GetChildCount() [2/6]
|
inlinenoexcept |
Gets the "child" count of the given disk shape configuration.
Definition at line 125 of file DiskShapeConf.hpp.
◆ GetChild() [2/6]
|
inline |
Gets the "child" of the given disk shape configuration.
Definition at line 131 of file DiskShapeConf.hpp.
◆ GetVertexRadius() [4/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 141 of file DiskShapeConf.hpp.
◆ GetVertexRadius() [5/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 147 of file DiskShapeConf.hpp.
◆ GetMassData() [7/11]
|
inlinenoexcept |
Gets the mass data of the given disk shape configuration.
Definition at line 154 of file DiskShapeConf.hpp.
◆ Transform() [2/7]
|
inlinenoexcept |
Transforms the given shape configuration's vertices by the given transformation matrix.
Definition at line 162 of file DiskShapeConf.hpp.
◆ operator==() [6/14]
|
inlinenoexcept |
Equality operator.
Definition at line 116 of file EdgeShapeConf.hpp.
◆ operator!=() [6/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 124 of file EdgeShapeConf.hpp.
◆ GetChildCount() [3/6]
|
inlinenoexcept |
Gets the "child" count for the given shape configuration.
- Returns
- 1.
Definition at line 131 of file EdgeShapeConf.hpp.
◆ GetChild() [3/6]
|
inline |
Gets the "child" shape for the given shape configuration.
Definition at line 137 of file EdgeShapeConf.hpp.
◆ GetVertexRadius() [6/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 147 of file EdgeShapeConf.hpp.
◆ GetVertexRadius() [7/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 153 of file EdgeShapeConf.hpp.
◆ GetMassData() [8/11]
|
inlinenoexcept |
Gets the mass data for the given shape configuration.
Definition at line 159 of file EdgeShapeConf.hpp.
◆ Transform() [3/7]
|
inlinenoexcept |
Transforms the given shape configuration's vertices by the given transformation matrix.
Definition at line 167 of file EdgeShapeConf.hpp.
◆ GetMassData() [9/11]
|
noexcept |
Gets the mass data for the given shape configuration.
Computes the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local origin.
- Returns
- Mass data for this shape.
Definition at line 32 of file MultiShapeConf.cpp.
◆ operator==() [7/14]
|
inlinenoexcept |
Equality operator.
Definition at line 149 of file MultiShapeConf.hpp.
◆ operator!=() [7/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 156 of file MultiShapeConf.hpp.
◆ GetChildCount() [4/6]
|
inlinenoexcept |
Gets the "child" count for the given shape configuration.
Definition at line 162 of file MultiShapeConf.hpp.
◆ GetChild() [4/6]
|
inline |
Gets the "child" shape for the given shape configuration.
Definition at line 168 of file MultiShapeConf.hpp.
◆ GetVertexRadius() [8/11]
|
inline |
Gets the vertex radius of the given shape configuration.
Definition at line 181 of file MultiShapeConf.hpp.
◆ Transform() [4/7]
|
inlinenoexcept |
Transforms the given multi shape configuration by the given transformation matrix.
Definition at line 193 of file MultiShapeConf.hpp.
◆ GetEdge()
Length2 GetEdge | ( | const PolygonShapeConf & | shape, |
VertexCounter | index | ||
) |
Gets the identified edge of the given polygon shape.
- Note
- This must not be called for shapes with less than 2 vertices.
- Warning
- Behavior is undefined if called for a shape with less than 2 vertices.
Definition at line 157 of file PolygonShapeConf.cpp.
◆ Validate()
Validates the convexity of the given collection of vertices.
- Note
- This is a time consuming operation.
- Returns
true
if the given collection of vertices is indeed convex,false
otherwise.
Definition at line 166 of file PolygonShapeConf.cpp.
◆ GetChildCount() [5/6]
|
inlinenoexcept |
Gets the "child" count for the given shape configuration.
- Returns
- 1.
Definition at line 201 of file PolygonShapeConf.hpp.
◆ GetChild() [5/6]
|
inline |
Gets the "child" shape for the given shape configuration.
Definition at line 207 of file PolygonShapeConf.hpp.
◆ GetVertexRadius() [9/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 218 of file PolygonShapeConf.hpp.
◆ GetVertexRadius() [10/11]
|
inlinenoexcept |
Gets the vertex radius of the given shape configuration.
Definition at line 224 of file PolygonShapeConf.hpp.
◆ GetMassData() [10/11]
|
inlinenoexcept |
Gets the mass data for the given shape configuration.
Definition at line 230 of file PolygonShapeConf.hpp.
◆ Transform() [5/7]
|
inlinenoexcept |
Transforms the given polygon configuration's vertices by the given transformation matrix.
Definition at line 244 of file PolygonShapeConf.hpp.
◆ GetChildCount() [6/6]
|
noexcept |
◆ GetChild() [6/6]
DistanceProxy playrho::d2::GetChild | ( | const Shape & | shape, |
ChildCounter | index | ||
) |
Gets the "child" for the given index.
- Parameters
-
shape Shape to get "child" shape of. index Index to a child element of the shape. Value must be less than the number of child primitives of the shape.
- Note
- The shape must remain in scope while the proxy is in use.
- Exceptions
-
InvalidArgument if the given index is out of range.
- See also
- GetChildCount
◆ GetMassData() [11/11]
◆ GetFriction() [1/2]
◆ GetRestitution() [1/2]
Gets the coefficient of restitution value of the given shape.
- Examples
- Contact.cpp.
◆ GetDensity() [1/2]
|
noexcept |
◆ GetVertexRadius() [11/11]
NonNegative<Length> playrho::d2::GetVertexRadius | ( | const Shape & | shape, |
ChildCounter | idx | ||
) |
Gets the vertex radius of the indexed child of the given shape.
This gets 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. Here's an image of a shape configured via a PolygonShapeConf
with it's skin drawn:
- Parameters
-
shape Shape to get child's vertex radius for. idx Child index to get vertex radius for.
- Note
- This must be a non-negative value.
- See also
- UseVertexRadius
- Exceptions
-
InvalidArgument if the child index is not less than the child count.
◆ Transform() [6/7]
Transforms all of the given shape's vertices by the given transformation matrix.
- Note
- This may throw
std::bad_alloc
or any exception that's thrown by the constructor for the model's underlying data type.
- Exceptions
-
std::bad_alloc if there's a failure allocating storage.
◆ Visit()
bool playrho::d2::Visit | ( | const Shape & | shape, |
void * | userData | ||
) |
Visits the given shape with the potentially non-null user data pointer.
◆ GetData()
|
noexcept |
◆ GetUseTypeInfo()
const std::type_info& playrho::d2::GetUseTypeInfo | ( | const Shape & | shape | ) |
◆ Accept()
void playrho::d2::Accept | ( | const Shape & | shape, |
const TypeInfoVisitor & | visitor | ||
) |
Accepts a visitor.
This is the "accept" method definition of a "visitor design pattern" for doing shape configuration specific types of processing for a constant shape.
◆ operator==() [8/14]
◆ operator!=() [8/14]
◆ GetDensity() [2/2]
|
inlinenoexcept |
Gets the density of the given shape configuration.
Definition at line 126 of file ShapeConf.hpp.
◆ GetRestitution() [2/2]
|
inlinenoexcept |
Gets the restitution of the given shape configuration.
Definition at line 132 of file ShapeConf.hpp.
◆ GetFriction() [2/2]
|
inlinenoexcept |
Gets the friction of the given shape configuration.
Definition at line 138 of file ShapeConf.hpp.
◆ GetMaxSeparation4x4()
SeparationInfo playrho::d2::GetMaxSeparation4x4 | ( | const DistanceProxy & | proxy1, |
Transformation | xf1, | ||
const DistanceProxy & | proxy2, | ||
Transformation | xf2 | ||
) |
Gets the max separation information for the first four vertices of the two given shapes.
This is a version of the get-max-separation functions that is optimized for two quadrilateral (4-sided) polygons.
- Returns
- Index of the vertex and normal from
proxy1
, index of the vertex fromproxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.
Definition at line 69 of file ShapeSeparation.cpp.
◆ GetMaxSeparation() [1/3]
SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
Transformation | xf1, | ||
const DistanceProxy & | proxy2, | ||
Transformation | xf2 | ||
) |
Gets the max separation information.
- Note
- Prefer using this function - over the
GetMaxSeparation
function that takes a stopping length - when it's already known that the two convex shapes' AABBs overlap.
- Returns
- Index of the vertex and normal from
proxy1
, index of the vertex fromproxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.
Definition at line 111 of file ShapeSeparation.cpp.
◆ GetMaxSeparation() [2/3]
SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
Transformation | xf1, | ||
const DistanceProxy & | proxy2, | ||
Transformation | xf2, | ||
Length | stop | ||
) |
Gets the max separation information.
- Returns
- Index of the vertex and normal from
proxy1
, index of the vertex fromproxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.
Definition at line 137 of file ShapeSeparation.cpp.
◆ GetMaxSeparation() [3/3]
SeparationInfo playrho::d2::GetMaxSeparation | ( | const DistanceProxy & | proxy1, |
const DistanceProxy & | proxy2, | ||
Length | stop = MaxFloat *Meter |
||
) |
Gets the max separation information.
- Returns
- Index of the vertex and normal from
proxy1
, index of the vertex fromproxy2
(that had the maximum separation distance from each other in the direction of that normal), and the maximal distance.
Definition at line 167 of file ShapeSeparation.cpp.
◆ GetIndexPairs()
|
noexcept |
Gets index pairs for the given edges collection.
Definition at line 25 of file Simplex.cpp.
◆ CalcSearchDirection()
|
noexcept |
Calculates the "search direction" for the given simplex edge list.
- Parameters
-
simplexEdges A one or two edge list.
- Warning
- Behavior is undefined if the given edge list has zero edges.
- Returns
- "search direction" vector.
Definition at line 37 of file Simplex.cpp.
◆ GetScaledDelta()
|
inline |
Gets the scaled delta for the given indexed element of the given simplex.
Definition at line 201 of file Simplex.hpp.
◆ GetClosestPoint()
|
inline |
Gets the "closest point".
Definition at line 207 of file Simplex.hpp.
◆ GetPointDelta()
|
inlinenoexcept |
Gets "w".
- Returns
- 2-dimensional vector value of the simplex edge's point B minus its point A.
Definition at line 83 of file SimplexEdge.hpp.
◆ operator==() [9/14]
|
inlinenoexcept |
Equality operator for SimplexEdge
.
Definition at line 89 of file SimplexEdge.hpp.
◆ operator!=() [9/14]
|
inlinenoexcept |
Inequality operator for SimplexEdge
.
Definition at line 97 of file SimplexEdge.hpp.
◆ GetToiViaSat()
TOIOutput playrho::d2::GetToiViaSat | ( | const DistanceProxy & | proxyA, |
const Sweep & | sweepA, | ||
const DistanceProxy & | proxyB, | ||
const Sweep & | sweepB, | ||
ToiConf | conf = GetDefaultToiConf() |
||
) |
Gets the time of impact for two disjoint convex sets using the Separating Axis Theorem.
Computes the upper bound on time before two shapes penetrate too much. Time is represented as a fraction between [0,tMax
]. This uses a swept separating axis and may miss some intermediate, non-tunneling collision. If you change the time interval, you should call this function again.
- Precondition
- The given sweeps are both at the same alpha-0.
- Warning
- Behavior is undefined if sweeps are not at the same alpha-0.
-
Behavior is undefined if the configuration's
tMax
is not between 0 and 1 inclusive.
- Note
- Uses Distance to compute the contact point and normal at the time of impact.
- This only works for two disjoint convex sets.
- Parameters
-
proxyA Proxy A. The proxy's vertex count must be 1 or more. sweepA Sweep A. Sweep of motion for shape represented by proxy A. proxyB Proxy B. The proxy's vertex count must be 1 or more. sweepB Sweep B. Sweep of motion for shape represented by proxy B. conf Configuration details for on calculation. Like the targeted depth of penetration.
- Returns
- Time of impact output data.
XXX maybe should return TOIOutput{timeLo, stats, TOIOutput::e_belowMinTarget}?
Definition at line 66 of file TimeOfImpact.cpp.
◆ GetWorldManifold() [1/2]
WorldManifold GetWorldManifold | ( | const Manifold & | manifold, |
Transformation | xfA, | ||
Length | radiusA, | ||
Transformation | xfB, | ||
Length | radiusB | ||
) |
Gets the world manifold for the given data.
- Precondition
- The given manifold input has between 0 and 2 points.
- Parameters
-
manifold Manifold to use. Uses the manifold's type, local point, local normal, point-count, and the indexed-points' local point data. xfA Transformation A. radiusA Radius of shape A. xfB Transformation B. radiusB Radius of shape B.
- Returns
- World manifold value for the given inputs which will have the same number of points as the given manifold has. The returned world manifold points will be the mid-points of the manifold intersection.
Definition at line 105 of file WorldManifold.cpp.
◆ GetWorldManifold() [2/2]
WorldManifold GetWorldManifold | ( | const Contact & | contact | ) |
Gets the world manifold for the given data.
- Note
- This is a convenience function that in turn calls the
GetWorldManifold(const Manifold&, const Transformation&, const Real, const Transformation& xfB, const Real)
function.
- Parameters
-
contact Contact to return a world manifold for.
- Returns
- World manifold value for the given inputs which will have the same number of points as the given manifold has. The returned world manifold points will be the mid-points of the contact's intersection.
Definition at line 126 of file WorldManifold.cpp.
◆ operator==() [10/14]
|
inline |
Equality operator.
Definition at line 41 of file Acceleration.hpp.
◆ operator!=() [10/14]
|
inline |
Inequality operator.
Definition at line 48 of file Acceleration.hpp.
◆ operator*=() [1/2]
|
inline |
Multiplication assignment operator.
Definition at line 55 of file Acceleration.hpp.
◆ operator/=() [1/2]
|
inline |
Division assignment operator.
Definition at line 64 of file Acceleration.hpp.
◆ operator+=() [1/3]
|
inline |
Addition assignment operator.
Definition at line 73 of file Acceleration.hpp.
◆ operator+() [1/7]
|
inline |
Addition operator.
Definition at line 82 of file Acceleration.hpp.
◆ operator-=() [1/3]
|
inline |
Subtraction assignment operator.
Definition at line 89 of file Acceleration.hpp.
◆ operator-() [1/7]
|
inline |
Subtraction operator.
Definition at line 98 of file Acceleration.hpp.
◆ operator-() [2/7]
|
inline |
Negation operator.
Definition at line 105 of file Acceleration.hpp.
◆ operator+() [2/7]
|
inline |
Positive operator.
Definition at line 112 of file Acceleration.hpp.
◆ operator*() [1/10]
|
inline |
Multiplication operator.
Definition at line 119 of file Acceleration.hpp.
◆ operator*() [2/10]
|
inline |
Multiplication operator.
Definition at line 126 of file Acceleration.hpp.
◆ operator/() [1/3]
|
inline |
Division operator.
Definition at line 133 of file Acceleration.hpp.
◆ Dump() [1/15]
void playrho::d2::Dump | ( | const World & | world | ) |
Dump the world into the log file.
- Warning
- this should be called outside of a time step.
Definition at line 64 of file CodeDumper.cpp.
◆ Dump() [2/15]
void playrho::d2::Dump | ( | const Body & | body, |
std::size_t | bodyIndex | ||
) |
Dump body to a log file.
Definition at line 93 of file CodeDumper.cpp.
◆ Dump() [3/15]
void playrho::d2::Dump | ( | const Joint & | joint, |
std::size_t | index | ||
) |
Dump joint to the log file.
Definition at line 127 of file CodeDumper.cpp.
◆ Dump() [4/15]
void playrho::d2::Dump | ( | const Fixture & | fixture, |
std::size_t | bodyIndex | ||
) |
Dump fixture to log file.
Definition at line 170 of file CodeDumper.cpp.
◆ Dump() [5/15]
void playrho::d2::Dump | ( | const DistanceJoint & | joint, |
std::size_t | index | ||
) |
Dump joint to log file.
Definition at line 196 of file CodeDumper.cpp.
◆ Dump() [6/15]
void playrho::d2::Dump | ( | const FrictionJoint & | joint, |
std::size_t | index | ||
) |
Dump joint to the log file.
Definition at line 216 of file CodeDumper.cpp.
◆ Dump() [7/15]
void playrho::d2::Dump | ( | const GearJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 235 of file CodeDumper.cpp.
◆ Dump() [8/15]
void playrho::d2::Dump | ( | const MotorJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 247 of file CodeDumper.cpp.
◆ Dump() [9/15]
void playrho::d2::Dump | ( | const TargetJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 266 of file CodeDumper.cpp.
◆ Dump() [10/15]
void playrho::d2::Dump | ( | const PrismaticJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 283 of file CodeDumper.cpp.
◆ Dump() [11/15]
void playrho::d2::Dump | ( | const PulleyJoint & | joint, |
std::size_t | index | ||
) |
Dump joint to log file.
Definition at line 312 of file CodeDumper.cpp.
◆ Dump() [12/15]
void playrho::d2::Dump | ( | const RevoluteJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 338 of file CodeDumper.cpp.
◆ Dump() [13/15]
void playrho::d2::Dump | ( | const RopeJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 365 of file CodeDumper.cpp.
◆ Dump() [14/15]
void playrho::d2::Dump | ( | const WeldJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 382 of file CodeDumper.cpp.
◆ Dump() [15/15]
void playrho::d2::Dump | ( | const WheelJoint & | joint, |
std::size_t | index | ||
) |
Dumps the joint to the log file.
Definition at line 402 of file CodeDumper.cpp.
◆ GetContactRelVelocity()
|
noexcept |
◆ GetVec2()
|
inline |
◆ GetAngle() [1/2]
◆ operator*() [3/10]
|
inlinenoexcept |
◆ operator*() [4/10]
|
inlinenoexcept |
◆ operator*() [5/10]
|
inlinenoexcept |
◆ operator*() [6/10]
|
inlinenoexcept |
◆ operator/() [2/3]
|
inlinenoexcept |
◆ Rotate() [1/2]
|
inlinenoexcept |
Rotates a vector by a given angle.
This rotates a vector by the angle expressed by the angle parameter.
- Parameters
-
vector Vector to forward rotate. angle Expresses the angle to forward rotate the given vector by.
- See also
- InverseRotate.
◆ InverseRotate() [1/2]
|
inlinenoexcept |
Inverse rotates a vector.
This is the inverse of rotating a vector - it undoes what rotate does. I.e. this effectively subtracts from the angle of the given vector the angle that's expressed by the angle parameter.
- Parameters
-
vector Vector to reverse rotate. angle Expresses the angle to reverse rotate the given vector by.
- See also
- Rotate.
◆ GetUnitVector()
|
inline |
Gets the unit vector for the given value.
- Parameters
-
value Value to get the unit vector for. fallback Fallback unit vector value to use in case a unit vector can't effectively be calculated from the given value.
- Returns
- value divided by its length if length not almost zero otherwise invalid value.
- See also
- AlmostEqual.
◆ GetNormalized() [1/2]
◆ GetNormalized() [2/2]
◆ Transform() [7/7]
|
inlinenoexcept |
Transforms the given 2-D vector with the given transformation.
Rotate and translate the given 2-D linear position according to the rotation and translation defined by the given transformation.
- Note
- Passing the output of this function to
InverseTransform
(with the same transformation again) will result in the original vector being returned. - For a 2-D linear position of the origin (0, 0), the result is simply the translation.
- See also
InverseTransform
.
- Parameters
-
v 2-D position to transform (to rotate and then translate). xfm Transformation (a translation and rotation) to apply to the given vector.
- Returns
- Rotated and translated vector.
◆ InverseTransform()
|
inlinenoexcept |
Inverse transforms the given 2-D vector with the given transformation.
Inverse translate and rotate the given 2-D vector according to the translation and rotation defined by the given transformation.
- Note
- Passing the output of this function to
Transform
(with the same transformation again) will result in the original vector being returned.
- See also
Transform
.
- Parameters
-
v 2-D vector to inverse transform (inverse translate and inverse rotate). T Transformation (a translation and rotation) to inversely apply to the given vector.
- Returns
- Inverse transformed vector.
◆ Mul()
|
inlinenoexcept |
◆ MulT()
|
inlinenoexcept |
◆ GetTransformation() [1/5]
|
inlinenoexcept |
◆ GetTransformation() [2/5]
|
inlinenoexcept |
◆ GetTransformation() [3/5]
|
inlinenoexcept |
Gets the interpolated transform at a specific time.
- Parameters
-
sweep Sweep data to get the transform from. beta Time factor in [0,1], where 0 indicates alpha 0.
- Returns
- Transformation of the given sweep at the specified time.
◆ GetTransform0()
|
inlinenoexcept |
Gets the transform at "time" zero.
- Note
- This is like calling
GetTransformation(sweep, 0)
, except more efficiently.
- Parameters
-
sweep Sweep data to get the transform from.
- Returns
- Transformation of the given sweep at time zero.
◆ GetTransform1()
|
inlinenoexcept |
Gets the transform at "time" one.
- Note
- This is like calling
GetTransformation(sweep, 1.0)
, except more efficiently.
- Parameters
-
sweep Sweep data to get the transform from.
- Returns
- Transformation of the given sweep at time one.
◆ IsUnderActive()
|
inlinenoexcept |
◆ GetReflectionMatrix()
|
inline |
Gets the reflection matrix for the given unit vector that defines the normal of the line through the origin that points should be reflected against.
◆ operator==() [11/14]
|
inline |
Equality operator.
Definition at line 44 of file Position.hpp.
◆ operator!=() [11/14]
|
inline |
Inequality operator.
Definition at line 51 of file Position.hpp.
◆ operator-() [3/7]
|
inline |
Negation operator.
Definition at line 58 of file Position.hpp.
◆ operator+() [3/7]
|
inline |
Positive operator.
Definition at line 65 of file Position.hpp.
◆ operator+=() [2/3]
|
inline |
Addition assignment operator.
Definition at line 72 of file Position.hpp.
◆ operator+() [4/7]
|
inline |
Addition operator.
Definition at line 81 of file Position.hpp.
◆ operator-=() [2/3]
|
inline |
Subtraction assignment operator.
Definition at line 88 of file Position.hpp.
◆ operator-() [4/7]
|
inline |
Subtraction operator.
Definition at line 97 of file Position.hpp.
◆ operator*() [7/10]
|
inline |
Multiplication operator.
Definition at line 103 of file Position.hpp.
◆ operator*() [8/10]
|
inline |
Multiplication operator.
Definition at line 110 of file Position.hpp.
◆ GetPosition() [1/2]
|
inlinenoexcept |
Gets the position between two positions at a given unit interval.
- Parameters
-
pos0 Position at unit interval value of 0. pos1 Position at unit interval value of 1. beta Unit interval (value between 0 and 1) of travel between position 0 and position 1.
- Returns
- position 0 if
pos0 == pos1
orbeta == 0
, position 1 ifbeta == 1
, or at the given unit interval value between position 0 and position 1.
Definition at line 137 of file Position.hpp.
◆ operator==() [12/14]
|
inlinenoexcept |
Equality operator.
Definition at line 54 of file Transformation.hpp.
◆ operator!=() [12/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 61 of file Transformation.hpp.
◆ GetXAxis()
|
inlinenoexcept |
Gets the "X-axis".
Definition at line 306 of file UnitVec.hpp.
◆ GetYAxis()
|
inlinenoexcept |
Gets the "Y-axis".
- Note
- This is the reverse perpendicular vector of the given unit vector.
Definition at line 310 of file UnitVec.hpp.
◆ operator==() [13/14]
|
inlinenoexcept |
Equality operator.
Definition at line 313 of file UnitVec.hpp.
◆ operator!=() [13/14]
|
inlinenoexcept |
Inequality operator.
Definition at line 319 of file UnitVec.hpp.
◆ GetRevPerpendicular()
|
inlinenoexcept |
Gets a vector counter-clockwise (reverse-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (-y, x).
- Parameters
-
vector Vector to return a counter-clockwise perpendicular equivalent for.
- Returns
- A counter-clockwise 90-degree rotation of the given vector.
- See also
- GetFwdPerpendicular.
Definition at line 330 of file UnitVec.hpp.
◆ GetFwdPerpendicular()
|
inlinenoexcept |
Gets a vector clockwise (forward-clockwise) perpendicular to the given vector.
This takes a vector of form (x, y) and returns the vector (y, -x).
- Parameters
-
vector Vector to return a clockwise perpendicular equivalent for.
- Returns
- A clockwise 90-degree rotation of the given vector.
- See also
- GetRevPerpendicular.
Definition at line 340 of file UnitVec.hpp.
◆ Rotate() [2/2]
|
inlinenoexcept |
Rotates a unit vector by the angle expressed by the second unit vector.
- Returns
- Unit vector for the angle that's the sum of the two angles expressed by the input unit vectors.
Definition at line 348 of file UnitVec.hpp.
◆ InverseRotate() [2/2]
|
inlinenoexcept |
Inverse rotates a vector.
Definition at line 354 of file UnitVec.hpp.
◆ get()
|
inlinenoexcept |
Gets the specified element of the given collection.
Definition at line 361 of file UnitVec.hpp.
◆ get< 0 >()
|
inlinenoexcept |
Gets element 0 of the given collection.
Definition at line 373 of file UnitVec.hpp.
◆ get< 1 >()
|
inlinenoexcept |
Gets element 1 of the given collection.
Definition at line 380 of file UnitVec.hpp.
◆ operator<<()
inline ::std::ostream& playrho::d2::operator<< | ( | ::std::ostream & | os, |
const UnitVec & | value | ||
) |
Output stream operator.
Definition at line 386 of file UnitVec.hpp.
◆ CalcWarmStartVelocityDeltas()
VelocityPair playrho::d2::CalcWarmStartVelocityDeltas | ( | const VelocityConstraint & | vc | ) |
Calculates the "warm start" velocity deltas for the given velocity constraint.
Definition at line 28 of file Velocity.cpp.
◆ operator==() [14/14]
|
inline |
Equality operator.
Definition at line 43 of file Velocity.hpp.
◆ operator!=() [14/14]
|
inline |
Inequality operator.
Definition at line 50 of file Velocity.hpp.
◆ operator*=() [2/2]
|
inline |
Multiplication assignment operator.
Definition at line 57 of file Velocity.hpp.
◆ operator/=() [2/2]
|
inline |
Division assignment operator.
Definition at line 66 of file Velocity.hpp.
◆ operator+=() [3/3]
|
inline |
Addition assignment operator.
Definition at line 75 of file Velocity.hpp.
◆ operator+() [5/7]
|
inline |
Addition operator.
Definition at line 84 of file Velocity.hpp.
◆ operator-=() [3/3]
|
inline |
Subtraction assignment operator.
Definition at line 91 of file Velocity.hpp.
◆ operator-() [5/7]
|
inline |
Subtraction operator.
Definition at line 100 of file Velocity.hpp.
◆ operator-() [6/7]
|
inline |
Negation operator.
Definition at line 107 of file Velocity.hpp.
◆ operator+() [6/7]
|
inline |
Positive operator.
Definition at line 114 of file Velocity.hpp.
◆ operator*() [9/10]
|
inline |
Multiplication operator.
Definition at line 121 of file Velocity.hpp.
◆ operator*() [10/10]
|
inline |
Multiplication operator.
Definition at line 128 of file Velocity.hpp.
◆ operator/() [3/3]
|
inline |
Division operator.
Definition at line 135 of file Velocity.hpp.
◆ ShouldCollide() [1/2]
◆ GetWorldIndex() [1/2]
|
noexcept |
◆ GetVelocity()
Gets the velocity of the body after the given time accounting for the body's acceleration and capped by the given configuration.
- Warning
- Behavior is undefined if the given elapsed time is an invalid value (like NaN).
- Parameters
-
body Body to get the velocity for. h Time elapsed to get velocity for. Behavior is undefined if this value is invalid.
◆ Cap()
|
noexcept |
Caps velocity.
Enforces maximums on the given velocity.
- Parameters
-
velocity Velocity to cap. Behavior is undefined if this value is invalid. h Time elapsed to get velocity for. Behavior is undefined if this value is invalid. conf Movement configuration. This defines caps on linear and angular speeds.
◆ GetFixtureCount() [1/2]
|
noexcept |
◆ RotateAboutWorldPoint()
Rotates a body a given amount around a point in world coordinates.
This changes both the linear and angular positions of the body.
- Note
- Manipulating a body's position this way may cause non-physical behavior.
- Parameters
-
body Body to rotate. amount Amount to rotate body by (in counter-clockwise direction). worldPoint Point in world coordinates.
◆ RotateAboutLocalPoint()
Rotates a body a given amount around a point in body local coordinates.
This changes both the linear and angular positions of the body.
- Note
- Manipulating a body's position this way may cause non-physical behavior.
-
This is a convenience function that translates the local point into world coordinates and then calls the
RotateAboutWorldPoint
function.
- Parameters
-
body Body to rotate. amount Amount to rotate body by (in counter-clockwise direction). localPoint Point in local coordinates.
◆ GetCentripetalForce()
◆ CalcGravitationalAcceleration()
|
noexcept |
◆ GetAcceleration()
|
inlinenoexcept |
◆ SetAcceleration()
|
inlinenoexcept |
Sets the accelerations on the given body.
- Note
- This has no effect on non-accelerable bodies.
- A non-zero acceleration will also awaken the body.
- Parameters
-
body Body whose acceleration should be set. value Acceleration value to set.
◆ Awaken() [1/2]
|
inlinenoexcept |
◆ Unawaken()
|
inlinenoexcept |
◆ GetPosition1()
◆ GetMass()
Gets the mass of the body.
- Note
- This may be the total calculated mass or it may be the set mass of the body.
- Returns
- Value of zero or more representing the body's mass.
- See also
- GetInvMass, SetMassData
◆ SetLinearAcceleration()
|
inlinenoexcept |
◆ SetAngularAcceleration()
|
inlinenoexcept |
◆ ApplyLinearAcceleration()
|
inline |
◆ SetForce()
◆ ApplyForce()
◆ ApplyForceToCenter()
◆ SetTorque()
◆ ApplyTorque()
◆ ApplyLinearImpulse()
Applies an impulse at a point.
- Note
- This immediately modifies the velocity.
- This also modifies the angular velocity if the point of application is not at the center of mass.
- Non-zero impulses wakes up the body.
- Parameters
-
body Body to apply the impulse to. impulse the world impulse vector. point the world position of the point of application.
◆ ApplyAngularImpulse()
|
inlinenoexcept |
◆ GetRotInertia()
|
inlinenoexcept |
◆ GetLocalRotInertia()
|
inlinenoexcept |
◆ GetLinearVelocity() [1/2]
|
inlinenoexcept |
◆ GetAngularVelocity() [1/3]
|
inlinenoexcept |
◆ SetLinearVelocity()
|
inlinenoexcept |
◆ SetAngularVelocity()
|
inlinenoexcept |
◆ GetWorldPoint()
Gets the world coordinates of a point given in coordinates relative to the body's origin.
- Parameters
-
body Body that the given point is relative to. localPoint a point measured relative the the body's origin.
- Returns
- the same point expressed in world coordinates.
◆ GetWorldVector() [1/2]
◆ GetWorldVector() [2/2]
◆ GetLocalPoint()
◆ GetLocalVector()
◆ GetLinearVelocityFromWorldPoint()
|
inlinenoexcept |
◆ GetLinearVelocityFromLocalPoint()
|
inlinenoexcept |
◆ GetForce()
◆ GetTorque()
◆ GetLocation()
Gets the body's origin location.
This is the location of the body's origin relative to its world. The location of the body after stepping the world's physics simulations is dependent on a number of factors:
◆ GetAngle() [2/2]
◆ GetTransformation() [4/5]
|
inlinenoexcept |
◆ SetTransformation()
|
inlinenoexcept |
◆ GetPosition() [2/2]
◆ SetLocation()
Sets the body's location.
This instantly adjusts the body to be at the new location.
- Warning
- Manipulating a body's location this way can cause non-physical behavior!
- Parameters
-
body Body to move. value Valid world location of the body's local origin. Behavior is undefined if value is invalid.
- See also
- Body::SetTransform
◆ SetAngle()
Sets the body's angular orientation.
This instantly adjusts the body to be at the new angular orientation.
- Warning
- Manipulating a body's angle this way can cause non-physical behavior!
- Parameters
-
body Body to move. value Valid world angle of the body's local origin. Behavior is undefined if value is invalid.
- See also
- Body::SetTransform
◆ GetBodyConf()
Gets the body definition for the given body.
Definition at line 28 of file BodyConf.cpp.
◆ GetDefaultBodyConf()
|
inlinenoexcept |
Gets the default body definition.
Definition at line 283 of file BodyConf.hpp.
◆ GetContactImpulses()
ContactImpulsesList playrho::d2::GetContactImpulses | ( | const VelocityConstraint & | vc | ) |
Gets the contact impulses for the given velocity constraint.
Definition at line 28 of file ContactImpulsesList.cpp.
◆ GetMaxNormalImpulse()
|
inlinenoexcept |
Gets the maximum normal impulse from the given contact impulses list.
Definition at line 70 of file ContactImpulsesList.hpp.
◆ GetBodyConstraint()
|
inlinenoexcept |
Gets the BodyConstraint
based on the given parameters.
Definition at line 140 of file BodyConstraint.hpp.
◆ GetBodyA()
Gets the body A associated with the given contact.
Definition at line 227 of file Contact.cpp.
◆ GetBodyB()
Gets the body B associated with the given contact.
Definition at line 232 of file Contact.cpp.
◆ HasSensor()
|
noexcept |
Whether the given contact has a sensor.
Definition at line 237 of file Contact.cpp.
◆ IsImpenetrable()
|
noexcept |
Whether the given contact is "impenetrable".
Definition at line 242 of file Contact.cpp.
◆ IsActive()
|
noexcept |
Determines whether the given contact is "active".
Definition at line 249 of file Contact.cpp.
◆ SetAwake() [1/3]
|
noexcept |
Sets awake the fixtures of the given contact.
- Examples
- Contact.cpp.
Definition at line 264 of file Contact.cpp.
◆ ResetFriction()
void ResetFriction | ( | Contact & | contact | ) |
Resets the friction mixture to the default value.
Resets the friction mixture to the default value.
- Examples
- Contact.cpp.
Definition at line 271 of file Contact.cpp.
◆ ResetRestitution()
|
noexcept |
Reset the restitution to the default value.
Reset the restitution to the default value.
- Examples
- Contact.cpp.
Definition at line 277 of file Contact.cpp.
◆ CalcToi()
Calculates the Time Of Impact for the given contact with the given configuration.
Definition at line 284 of file Contact.cpp.
◆ GetFixtureA()
Gets the fixture A associated with the given contact.
Definition at line 541 of file Contact.hpp.
◆ GetFixtureB()
Gets the fixture B associated with the given contact.
Definition at line 548 of file Contact.hpp.
◆ GetChildIndexA()
|
inlinenoexcept |
Gets the child index A of the given contact.
Definition at line 555 of file Contact.hpp.
◆ GetChildIndexB()
|
inlinenoexcept |
Gets the child index B of the given contact.
Definition at line 562 of file Contact.hpp.
◆ GetContactKey() [1/2]
|
noexcept |
Gets the ContactKey
for the given parameters.
Definition at line 31 of file ContactKey.cpp.
◆ GetContactKey() [2/2]
|
noexcept |
Gets the ContactKey
for the given contact.
Definition at line 38 of file ContactKey.cpp.
◆ GetContactPtr()
|
inline |
Gets the contact pointer for the given value.
Definition at line 128 of file ContactKey.hpp.
◆ operator+() [7/7]
|
inline |
Addition operator.
Definition at line 44 of file ContactSolver.hpp.
◆ operator-() [7/7]
|
inline |
Subtraction operator.
Definition at line 54 of file ContactSolver.hpp.
◆ GetPSM()
PositionSolverManifold playrho::d2::GetPSM | ( | const Manifold & | manifold, |
Manifold::size_type | index, | ||
const Transformation & | xfA, | ||
const Transformation & | xfB | ||
) |
Gets the normal-point-separation data in world coordinates for the given inputs.
- Note
- The returned normal is in the direction of shape A to shape B.
- The returned separation distance does not account for vertex radiuses. It's simply the separation between the points of the manifold. To account for the vertex radiuses, the total vertex radius must be subtracted from this separation distance.
Definition at line 87 of file PositionSolverManifold.cpp.
◆ GetRegVelocityConstraintConf()
|
noexcept |
Gets the regular phase velocity constraint configuration from the given step configuration.
Definition at line 187 of file VelocityConstraint.cpp.
◆ GetToiVelocityConstraintConf()
|
noexcept |
Gets the TOI phase velocity constraint configuration from the given step configuration.
Definition at line 196 of file VelocityConstraint.cpp.
◆ GetNormal()
|
inlinenoexcept |
Gets the normal of the velocity constraint contact in world coordinates.
- Note
- This value is set via the velocity constraint's
SetNormal
method.
- Returns
- Contact normal (in world coordinates) if previously set, an invalid value otherwise.
Definition at line 376 of file VelocityConstraint.hpp.
◆ GetTangent()
|
inlinenoexcept |
Gets the tangent from the given velocity constraint data.
Definition at line 382 of file VelocityConstraint.hpp.
◆ GetInvMass()
|
inlinenoexcept |
Gets the inverse mass from the given velocity constraint data.
Definition at line 388 of file VelocityConstraint.hpp.
◆ GetPointRelPosA()
|
inline |
Gets the point relative position A data.
Definition at line 394 of file VelocityConstraint.hpp.
◆ GetPointRelPosB()
|
inline |
Gets the point relative position B data.
Definition at line 401 of file VelocityConstraint.hpp.
◆ GetVelocityBiasAtPoint()
|
inline |
Gets the velocity bias at the given point from the given velocity constraint.
Definition at line 408 of file VelocityConstraint.hpp.
◆ GetNormalMassAtPoint()
|
inline |
Gets the normal mass at the given point from the given velocity constraint.
Definition at line 414 of file VelocityConstraint.hpp.
◆ GetTangentMassAtPoint()
|
inline |
Gets the tangent mass at the given point from the given velocity constraint.
Definition at line 421 of file VelocityConstraint.hpp.
◆ GetNormalImpulseAtPoint()
|
inline |
Gets the normal impulse at the given point from the given velocity constraint.
Definition at line 428 of file VelocityConstraint.hpp.
◆ GetTangentImpulseAtPoint()
|
inline |
Gets the tangent impulse at the given point from the given velocity constraint.
Definition at line 435 of file VelocityConstraint.hpp.
◆ GetNormalImpulses()
|
inline |
Gets the normal impulses of the given velocity constraint.
Definition at line 442 of file VelocityConstraint.hpp.
◆ GetTangentImpulses()
|
inline |
Gets the tangent impulses of the given velocity constraint.
Definition at line 448 of file VelocityConstraint.hpp.
◆ SetNormalImpulseAtPoint()
|
inline |
Sets the normal impulse at the given point of the given velocity constraint.
Definition at line 454 of file VelocityConstraint.hpp.
◆ SetTangentImpulseAtPoint()
|
inline |
Sets the tangent impulse at the given point of the given velocity constraint.
Definition at line 460 of file VelocityConstraint.hpp.
◆ SetNormalImpulses()
|
inline |
Sets the normal impulses of the given velocity constraint.
Definition at line 466 of file VelocityConstraint.hpp.
◆ SetTangentImpulses()
|
inline |
Sets the tangent impulses of the given velocity constraint.
Definition at line 473 of file VelocityConstraint.hpp.
◆ SetAwake() [2/3]
|
noexcept |
Sets the associated body's sleep status to awake.
- Note
- This is a convenience function that simply looks up the fixture's body and calls that body'
SetAwake
method.
- Parameters
-
f Fixture whose body should be awoken.
Definition at line 85 of file Fixture.cpp.
◆ GetTransformation() [5/5]
|
noexcept |
Gets the transformation associated with the given fixture.
- Warning
- Behavior is undefined if the fixture doesn't have an associated body - i.e. behavior is undefined if the fixture has
nullptr
as its associated body.
Definition at line 90 of file Fixture.cpp.
◆ ShouldCollide() [2/2]
Whether contact calculations should be performed between the two fixtures.
- Returns
true
if contact calculations should be performed between these two fixtures;false
otherwise.
Definition at line 319 of file Fixture.hpp.
◆ GetFixtureConf()
|
noexcept |
Gets the fixture definition for the given fixture.
- Parameters
-
fixture Fixture to get the definition for.
Definition at line 28 of file FixtureConf.cpp.
◆ GetDefaultFixtureConf()
|
inlinenoexcept |
Gets the default fixture definition.
Definition at line 83 of file FixtureConf.hpp.
◆ Count() [1/3]
Counts the number of occurrences of the given entry in the given island.
Definition at line 138 of file Island.cpp.
◆ Count() [2/3]
Counts the number of occurrences of the given entry in the given island.
Definition at line 143 of file Island.cpp.
◆ Count() [3/3]
Counts the number of occurrences of the given entry in the given island.
Definition at line 148 of file Island.cpp.
◆ IsFullOfBodies()
|
inline |
Determines whether the given island is full of bodies.
Definition at line 74 of file Island.hpp.
◆ IsFullOfContacts()
|
inline |
Determines whether the given island is full of contacts.
Definition at line 81 of file Island.hpp.
◆ GetDistanceJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 39 of file DistanceJointConf.cpp.
◆ GetFrictionJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 36 of file FrictionJointConf.cpp.
◆ GetGearJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 35 of file GearJointConf.cpp.
◆ IsEnabled()
|
noexcept |
◆ SetAwake() [3/3]
|
noexcept |
◆ GetWorldIndex() [2/2]
JointCounter GetWorldIndex | ( | const Joint * | joint | ) |
◆ At()
BodyConstraintPtr & playrho::d2::At | ( | std::unordered_map< const Body *, BodyConstraint * > & | container, |
const Body * | key | ||
) |
◆ ToString() [1/2]
|
noexcept |
◆ IncMotorSpeed()
|
inline |
◆ Set()
Sets the joint definition data for the given joint.
Definition at line 28 of file JointConf.cpp.
◆ GetJointKey()
Gets the JointKey
for the given joint.
Definition at line 27 of file JointKey.cpp.
◆ Compare()
|
inlinenoexcept |
Compares the given joint keys.
Definition at line 81 of file JointKey.hpp.
◆ IsFor()
|
inlinenoexcept |
Determines whether the given key is for the given body.
Definition at line 104 of file JointKey.hpp.
◆ GetJointPtr()
Gets the joint pointer from the given value.
Definition at line 110 of file JointKey.hpp.
◆ GetType()
◆ ToString() [2/2]
|
noexcept |
Provides a C-style (null-terminated) string name for given joint type.
- Returns
- C-style English-language human-readable string uniquely identifying the joint type.
Definition at line 35 of file JointType.cpp.
◆ GetMotorJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 37 of file MotorJointConf.cpp.
◆ GetJointTranslation() [1/2]
|
noexcept |
Get the current joint translation.
Definition at line 608 of file PrismaticJoint.cpp.
◆ GetLinearVelocity() [2/2]
|
noexcept |
Get the current joint translation speed.
Definition at line 615 of file PrismaticJoint.cpp.
◆ GetMotorForce()
|
inlinenoexcept |
Gets the current motor force for the given joint, given the inverse time step.
Definition at line 192 of file PrismaticJoint.hpp.
◆ GetPrismaticJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 40 of file PrismaticJointConf.cpp.
◆ GetCurrentLengthA()
Length GetCurrentLengthA | ( | const PulleyJoint & | joint | ) |
Get the current length of the segment attached to body-A.
Definition at line 245 of file PulleyJoint.cpp.
◆ GetCurrentLengthB()
Length GetCurrentLengthB | ( | const PulleyJoint & | joint | ) |
Get the current length of the segment attached to body-B.
Definition at line 251 of file PulleyJoint.cpp.
◆ GetPulleyJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 43 of file PulleyJointConf.cpp.
◆ GetJointAngle()
Angle GetJointAngle | ( | const RevoluteJoint & | joint | ) |
Gets the current joint angle.
Definition at line 537 of file RevoluteJoint.cpp.
◆ GetAngularVelocity() [2/3]
AngularVelocity GetAngularVelocity | ( | const RevoluteJoint & | joint | ) |
Gets the current joint angle speed.
Definition at line 542 of file RevoluteJoint.cpp.
◆ GetMotorTorque() [1/2]
|
inlinenoexcept |
Gets the current motor torque for the given joint given the inverse time step.
Definition at line 214 of file RevoluteJoint.hpp.
◆ GetRevoluteJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 39 of file RevoluteJointConf.cpp.
◆ GetRopeJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 29 of file RopeJointConf.cpp.
◆ GetTargetJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 28 of file TargetJointConf.cpp.
◆ GetWeldJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 38 of file WeldJointConf.cpp.
◆ GetJointTranslation() [2/2]
|
noexcept |
Get the current joint translation.
Definition at line 365 of file WheelJoint.cpp.
◆ GetAngularVelocity() [3/3]
|
noexcept |
Get the current joint translation speed.
Definition at line 374 of file WheelJoint.cpp.
◆ GetMotorTorque() [2/2]
|
inlinenoexcept |
Gets the current motor torque for the given joint for the given the inverse time step.
Definition at line 194 of file WheelJoint.hpp.
◆ GetWheelJointConf()
|
noexcept |
Gets the definition data for the given joint.
Definition at line 39 of file WheelJointConf.cpp.
◆ Step()
StepStats Step | ( | World & | world, |
Time | delta, | ||
TimestepIters | velocityIterations = 8 , |
||
TimestepIters | positionIterations = 3 |
||
) |
Steps the world ahead by a given time amount.
Performs position and velocity updating, sleeping of non-moving bodies, updating of the contacts, and notifying the contact listener of begin-contact, end-contact, pre-solve, and post-solve events. If the given velocity and position iterations are more than zero, this method also respectively performs velocity and position resolution of the contacting bodies.
- Note
- While body velocities are updated accordingly (per the sum of forces acting on them), body positions (barring any collisions) are updated as if they had moved the entire time step at those resulting velocities. In other words, a body initially at
p0
goingv0
fast with a sum acceleration ofa
, after timet
and barring any collisions, will have a new velocity (v1
) ofv0 + (a * t)
and a new position (p1
) ofp0 + v1 * t
.
- Warning
- Varying the time step may lead to non-physical behaviors.
- Postcondition
- Static bodies are unmoved.
- Kinetic bodies are moved based on their previous velocities.
- Dynamic bodies are moved based on their previous velocities, gravity, applied forces, applied impulses, masses, damping, and the restitution and friction values of their fixtures when they experience collisions.
- Parameters
-
world World to step. delta Time to simulate as a delta from the current state. This should not vary. velocityIterations Number of iterations for the velocity constraint solver. positionIterations Number of iterations for the position constraint solver. The position constraint solver resolves the positions of bodies that overlap.
◆ GetTouchingCount()
|
noexcept |
◆ GetFixtureCount() [2/2]
|
noexcept |
◆ GetShapeCount()
|
noexcept |
◆ GetAwakeCount()
|
noexcept |
◆ Awaken() [2/2]
|
noexcept |
Awakens all of the bodies in the given world.
Calls all of the world's bodies' SetAwake
method.
- Returns
- Sum total of calls to bodies'
SetAwake
method that returned true.
- See also
- Body::SetAwake.
◆ SetAccelerations() [1/3]
|
noexcept |
◆ SetAccelerations() [2/3]
|
noexcept |
◆ FindClosestBody()
◆ GetBodyCount()
|
inlinenoexcept |
◆ GetJointCount()
|
inlinenoexcept |
◆ GetContactCount()
|
inlinenoexcept |
◆ SetAccelerations() [3/3]
|
noexcept |
Sets the accelerations of all the world's bodies.
- Parameters
-
world World instance to set the acceleration of all contained bodies for. fn Function or functor with a signature like: Acceleration (*fn)(const Body& body)
.
◆ ClearForces()
|
inlinenoexcept |
◆ GetDefaultWorldConf()
|
inlinenoexcept |
Gets the default definitions value.
- Note
- This method exists as a work-around for providing the World constructor a default value without otherwise getting a compiler error such as: "cannot use defaulted constructor of '<code>Conf</code>' within '<code>World</code>' outside of member functions because 'gravity' has an initializer"
- Examples
- World.cpp.
Definition at line 92 of file WorldConf.hpp.
Variable Documentation
◆ Transform_identity
const PLAYRHO_CONSTEXPR auto playrho::d2::Transform_identity |
Identity transformation value.
Definition at line 48 of file Transformation.hpp.
◆ EarthlyGravity
const PLAYRHO_CONSTEXPR auto playrho::d2::EarthlyGravity |
Earthly gravity in 2-dimensions.
Linear acceleration in 2-dimensions of an earthly object due to Earth's mass.
- See also
- EarthlyLinearAcceleration
- Examples
- HelloWorld.cpp, and World.cpp.
Definition at line 154 of file Vector2.hpp.