Public Member Functions | Public Attributes | List of all members
RayCastAnyCallback Class Reference
Inheritance diagram for RayCastAnyCallback:
Inheritance graph
[legend]

Public Member Functions

 RayCastAnyCallback ()
 
float ReportFixture (b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float) override
 
- Public Member Functions inherited from b2RayCastCallback
virtual ~b2RayCastCallback ()
 

Public Attributes

bool m_hit
 
b2Vec2 m_normal
 
b2Vec2 m_point
 

Detailed Description

Definition at line 72 of file ray_cast.cpp.

Constructor & Destructor Documentation

◆ RayCastAnyCallback()

RayCastAnyCallback::RayCastAnyCallback ( )
inline

Definition at line 75 of file ray_cast.cpp.

Member Function Documentation

◆ ReportFixture()

float RayCastAnyCallback::ReportFixture ( b2Fixture fixture,
const b2Vec2 point,
const b2Vec2 normal,
float  fraction 
)
inlineoverridevirtual

Called for each fixture found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip the ray and continue

Parameters
fixturethe fixture hit by the ray
pointthe point of initial intersection
normalthe normal vector at the point of intersection
fractionthe fraction along the ray at the point of intersection
Returns
-1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue

Implements b2RayCastCallback.

Definition at line 80 of file ray_cast.cpp.

Member Data Documentation

◆ m_hit

bool RayCastAnyCallback::m_hit

Definition at line 99 of file ray_cast.cpp.

◆ m_normal

b2Vec2 RayCastAnyCallback::m_normal

Definition at line 101 of file ray_cast.cpp.

◆ m_point

b2Vec2 RayCastAnyCallback::m_point

Definition at line 100 of file ray_cast.cpp.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:23