raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | Protected Member Functions | List of all members
raylib::RayCollision Class Reference

Raycast hit information. More...

Public Member Functions

 RayCollision (bool hit, float distance, ::Vector3 point, ::Vector3 normal)
 
 RayCollision (const ::Ray &ray, ::Vector3 center, float radius)
 Get collision info between ray and sphere.
 
 RayCollision (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3)
 Get collision info between ray and triangle.
 
 RayCollision (const ::Ray &ray, ::Vector3 p1, ::Vector3 p2, ::Vector3 p3, ::Vector3 p4)
 Get collision info between ray and quad.
 
 RayCollision (const ::Ray &ray, const ::BoundingBox &box)
 Get collision info between ray and bounding box.
 
 RayCollision (const ::Ray &ray, const ::Mesh &mesh, const ::Matrix &transform)
 Get collision info between ray and mesh.
 
 RayCollision (const ::RayCollision &ray)
 
float GetDistance () const
 Retrieves the distance value for the object. More...
 
bool GetHit () const
 Retrieves the hit value for the object. More...
 
::Vector3 GetNormal () const
 Retrieves the normal value for the object. More...
 
::Vector3 GetPosition () const
 Retrieves the point value for the object. More...
 
RayCollisionoperator= (const ::RayCollision &ray)
 
void SetDistance (float value)
 Sets the distance value for the object. More...
 
void SetHit (bool value)
 Sets the hit value for the object. More...
 
void SetNormal (::Vector3 value)
 Sets the normal value for the object. More...
 
void SetPosition (::Vector3 value)
 Sets the point value for the object. More...
 

Protected Member Functions

void set (const ::RayCollision &ray)
 

Detailed Description

Raycast hit information.

Definition at line 11 of file RayCollision.hpp.

Member Function Documentation

◆ GetDistance()

float raylib::RayCollision::GetDistance ( ) const
inline

Retrieves the distance value for the object.

Returns
The distance value of the object.

Definition at line 59 of file RayCollision.hpp.

◆ GetHit()

bool raylib::RayCollision::GetHit ( ) const
inline

Retrieves the hit value for the object.

Returns
The hit value of the object.

Definition at line 58 of file RayCollision.hpp.

◆ GetNormal()

::Vector3 raylib::RayCollision::GetNormal ( ) const
inline

Retrieves the normal value for the object.

Returns
The normal value of the object.

Definition at line 61 of file RayCollision.hpp.

◆ GetPosition()

::Vector3 raylib::RayCollision::GetPosition ( ) const
inline

Retrieves the point value for the object.

Returns
The point value of the object.

Definition at line 60 of file RayCollision.hpp.

◆ SetDistance()

void raylib::RayCollision::SetDistance ( float  value)
inline

Sets the distance value for the object.

Parameters
valueThe value of which to set distance to.

Definition at line 59 of file RayCollision.hpp.

◆ SetHit()

void raylib::RayCollision::SetHit ( bool  value)
inline

Sets the hit value for the object.

Parameters
valueThe value of which to set hit to.

Definition at line 58 of file RayCollision.hpp.

◆ SetNormal()

void raylib::RayCollision::SetNormal ( ::Vector3  value)
inline

Sets the normal value for the object.

Parameters
valueThe value of which to set normal to.

Definition at line 61 of file RayCollision.hpp.

◆ SetPosition()

void raylib::RayCollision::SetPosition ( ::Vector3  value)
inline

Sets the point value for the object.

Parameters
valueThe value of which to set point to.

Definition at line 60 of file RayCollision.hpp.