|
Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
|
Gets the first entity hit by the ray Callback class used to get collision data from ray queries More...
#include <RaycastCallback.hpp>
Public Member Functions | |
| RayCastClosestCallback () | |
| RayCastClosestCallback (const CollisionLayer detectLayers) | |
| float32 | ReportFixture (b2Fixture *fixture, const b2Vec2 &point, const b2Vec2 &normal, float32 fraction) override |
| Function used by Box2D to tell the Callback class that the ray has collided with a fixture. Box2D Comments: By returning the current fraction, we instruct the calling code to clip the ray and continue the ray-cast to the next fixture. WARNING: do not assume that fixtures are reported in order. However, by clipping, we can always get the closest fixture. More... | |
Friends | |
| class | CollisionSystem |
Gets the first entity hit by the ray Callback class used to get collision data from ray queries
Definition at line 16 of file RaycastCallback.hpp.
| Engine::RayCastClosestCallback::RayCastClosestCallback | ( | ) |
Definition at line 6 of file RaycastCallback.cpp.
| Engine::RayCastClosestCallback::RayCastClosestCallback | ( | const CollisionLayer | detectLayers | ) |
Definition at line 10 of file RaycastCallback.cpp.
|
override |
Function used by Box2D to tell the Callback class that the ray has collided with a fixture. Box2D Comments: By returning the current fraction, we instruct the calling code to clip the ray and continue the ray-cast to the next fixture. WARNING: do not assume that fixtures are reported in order. However, by clipping, we can always get the closest fixture.
| fixture | The fixture the ray intersected with |
| point | The point the ray intersected with the fixture |
| normal | The normal of the surface the ray intersected with |
| fraction | ???Investigate Box2D for this??? |
Definition at line 14 of file RaycastCallback.cpp.
|
friend |
Definition at line 18 of file RaycastCallback.hpp.
1.8.11