PlayRho  2.0.0
An interactive physics engine & library.
RayCastOutput.hpp File Reference

Declaration of the RayCastOutput structure and related free functions. More...

#include <cstddef>
#include <functional>
#include <optional>
#include <playrho/BodyID.hpp>
#include <playrho/RayCastOpcode.hpp>
#include <playrho/ShapeID.hpp>
#include <playrho/UnitInterval.hpp>
#include <playrho/Vector2.hpp>
#include <playrho/d2/RayCastInput.hpp>
#include <playrho/d2/UnitVec.hpp>
Include dependency graph for RayCastOutput.hpp:

Classes

struct  playrho::d2::RayCastHit
 Ray-cast hit data. More...
 

Namespaces

 playrho
 
 playrho::d2
 
 playrho::detail
 

Typedefs

using playrho::d2::DynamicTreeRayCastCB = std::function< Real(BodyID body, ShapeID shape, ChildCounter child, const RayCastInput &input)>
 Ray cast callback function. More...
 
using playrho::d2::RayCastOutput = std::optional< RayCastHit >
 Ray cast output. More...
 
using playrho::d2::ShapeRayCastCB = std::function< RayCastOpcode(BodyID body, ShapeID shape, ChildCounter child, const Length2 &point, UnitVec normal)>
 Ray cast callback function signature.
 

Functions

RayCastOutput playrho::d2::RayCast (const ::playrho::detail::AABB< 2 > &aabb, const RayCastInput &input) noexcept
 Cast a ray against the given AABB. More...
 
RayCastOutput playrho::d2::RayCast (const DistanceProxy &proxy, const RayCastInput &input, const Transformation &transform) noexcept
 Cast a ray against the distance proxy. More...
 
bool playrho::d2::RayCast (const DynamicTree &tree, RayCastInput input, const DynamicTreeRayCastCB &callback)
 Cast rays against the leafs in the given tree. More...
 
RayCastOutput playrho::d2::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 playrho::d2::RayCast (const World &world, const RayCastInput &input, const ShapeRayCastCB &callback)
 Ray-cast the world for all fixtures in the path of the ray. More...
 
RayCastOutput playrho::d2::RayCast (Length radius, const Length2 &location, const RayCastInput &input) noexcept
 Cast a ray against a circle of a given radius at the given location. More...
 

Detailed Description

Declaration of the RayCastOutput structure and related free functions.