![]() |
Lysa
0.0
Lysa 3D Engine
|
A ray in 3D space, used to find the first CollisionObject it intersects.
Inheritance diagram for RayCast:Public Member Functions | |
| RayCast (const float3 &target, collision_layer layer) | |
| RayCast () = default | |
| ~RayCast () override | |
| auto | isColliding () const |
| auto | getCollider () const |
| auto | getCollisionPoint () const |
| void | setExcludeParent (const bool exclude) |
| void | update () |
| void | setTarget (const float3 &target) |
| const auto & | getTarget () const |
| void | setCollisionLayer (collision_layer layer) |
| virtual float3 | getGlobalPosition () const = 0 |
| virtual float3 | localPositionToGlobalPosition (const float3 &position) const = 0 |
| virtual bool | isProcessed () const = 0 |
| virtual bool | isParent (const CollisionObject *collisionObject) const = 0 |
Public Member Functions inherited from UnmanagedResource | |
| UnmanagedResource () | |
| UnmanagedResource (const Resource &other) | |
Public Member Functions inherited from Resource | |
| bool | operator== (const Resource &other) const |
| Resource () = default | |
| Resource (const unique_id id) | |
| virtual | ~Resource () = default |
Protected Attributes | |
| bool | active {false} |
| float3 | target {} |
| float3 | hitPoint {} |
| collision_layer | collisionLayer {} |
| bool | excludeParent {true} |
| CollisionObject * | collider {nullptr} |
| unique_id | onPhysicsProcessHandler {INVALID_ID} |
Additional Inherited Members | |
Public Attributes inherited from Resource | |
| unique_id | id {INVALID_ID} |
| RayCast | ( | const float3 & | target, |
| collision_layer | layer | ||
| ) |
|
default |
Creates an inactive RayCast
|
override |
|
inline |
Returns the first object that the ray intersects, or nullptr if no object is intersecting the ray
|
inline |
Returns the collision point at which the ray intersects the closest object, in the global coordinate system
|
pure virtual |
|
inline |
Returns the ray target
|
inline |
Returns whether any object is intersecting with the ray's vector (considering the vector length).
|
pure virtual |
|
pure virtual |
|
pure virtual |
| void setCollisionLayer | ( | collision_layer | layer | ) |
|
inline |
If true, collisions will be ignored for this RayCast's immediate parent.
|
inline |
Sets the ray's destination point, relative to the RayCast's position.
| void update | ( | ) |
Updates the collision information for the ray immediately, without waiting for the next physics update
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |