#include <physics_query_assistant.h>
Public Member Functions | |
Construction | |
PhysicsQueryAssistant () | |
Constructs a null instance. More... | |
PhysicsQueryAssistant (PhysicsWorld &pw) | |
Constructs a PhysicsQueryAssistant. More... | |
~PhysicsQueryAssistant () | |
Attributes | |
bool | is_null () const |
Returns true if this object is invalid. More... | |
bool | has_query_result () |
Check if last raycast operation has yeld any results. More... | |
int | get_query_result_amount () |
Returns the amount of objects found. More... | |
QueryResult | get_query_result (int id=0) |
Returns the raycast result. More... | |
Rectf | prepare_rect (const Pointf &point, const float range=0.001f) |
An useful method that creates a rect from a given pointf that could be used for querying. More... | |
Rectf | prepare_rect (const int x, const int y, const float range=0.001f) |
An useful method that creates a rect from two given ints that could be used for querying. More... | |
Rectf | prepare_rect (const float x, const float y, const float range=0.001f) |
An useful method that creates a rect from two given floats that could be used for querying. More... | |
Operations | |
void | raycast_first (const Pointf &start, const Pointf &end) |
Raycast to find the first object on a given line segment. More... | |
void | raycast_any (const Pointf &start, const Pointf &end) |
Raycast to find any object on a given line segment. More... | |
void | raycast_all (const Pointf &start, const Pointf &end) |
Raycast to find all objects on a given line segment. More... | |
void | query_any (const Rectf &rect) |
Query the world for any fixture that potentially overlap the provided rectangle. More... | |
void | query_some (const Rectf &rect, const int amount) |
Query the world for some fixtures that potentially overlap the provided rectangle. More... | |
void | query_all (const Rectf &rect) |
Query the world for all fixtures that potentially overlap the provided rectangle. More... | |
void | raycast (const Pointf &start, const Pointf &end) |
Execute raycasting. More... | |
void | query (const Rectf &rect) |
Execute aabb querying. More... | |