Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Member Functions | Public Attributes | List of all members
box2d::RayCastOutput Struct Reference

Ray-cast output data. More...

#include <RayCastOutput.hpp>

Public Member Functions

 RayCastOutput ()=default
 
constexpr RayCastOutput (UnitVec2 n, RealNum f, bool h=true) noexcept
 

Public Attributes

UnitVec2 normal
 
RealNum fraction = 0
 
bool hit = false
 

Detailed Description

Ray-cast output data.

The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from RayCastInput.

Constructor & Destructor Documentation

◆ RayCastOutput() [1/2]

box2d::RayCastOutput::RayCastOutput ( )
default

◆ RayCastOutput() [2/2]

constexpr box2d::RayCastOutput::RayCastOutput ( UnitVec2  n,
RealNum  f,
bool  h = true 
)
inlinenoexcept

Member Data Documentation

◆ fraction

RealNum box2d::RayCastOutput::fraction = 0

◆ hit

bool box2d::RayCastOutput::hit = false

◆ normal

UnitVec2 box2d::RayCastOutput::normal

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