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

Bounding box type. More...

Public Member Functions

 BoundingBox (::Vector3 min, ::Vector3 max)
 
 BoundingBox (::Vector3 minMax=::Vector3{0.0f, 0.0f, 0.0f})
 
 BoundingBox (const ::BoundingBox &box)
 
 BoundingBox (const ::Mesh &mesh)
 Compute mesh bounding box limits.
 
bool CheckCollision (::Vector3 center, float radius) const
 Detect collision between box and sphere.
 
bool CheckCollision (const ::BoundingBox &box2) const
 Detect collision between two boxes.
 
bool CheckCollision (const ::Ray &ray) const
 Detect collision between ray and bounding box.
 
void Draw (::Color color={255, 255, 255, 255}) const
 Draw a bounding box with wires.
 
RayCollision GetCollision (const ::Ray &ray) const
 Get collision information between ray and bounding box.
 
::Vector3 GetMax () const
 Retrieves the max value for the object. More...
 
::Vector3 GetMin () const
 Retrieves the min value for the object. More...
 
BoundingBoxoperator= (const ::BoundingBox &box)
 
void SetMax (::Vector3 value)
 Sets the max value for the object. More...
 
void SetMin (::Vector3 value)
 Sets the min value for the object. More...
 

Protected Member Functions

void set (const ::BoundingBox &box)
 
void set (const ::Vector3 &_min, const ::Vector3 &_max)
 

Detailed Description

Bounding box type.

Definition at line 11 of file BoundingBox.hpp.

Member Function Documentation

◆ GetMax()

::Vector3 raylib::BoundingBox::GetMax ( ) const
inline

Retrieves the max value for the object.

Returns
The max value of the object.

Definition at line 29 of file BoundingBox.hpp.

◆ GetMin()

::Vector3 raylib::BoundingBox::GetMin ( ) const
inline

Retrieves the min value for the object.

Returns
The min value of the object.

Definition at line 28 of file BoundingBox.hpp.

◆ SetMax()

void raylib::BoundingBox::SetMax ( ::Vector3  value)
inline

Sets the max value for the object.

Parameters
valueThe value of which to set max to.

Definition at line 29 of file BoundingBox.hpp.

◆ SetMin()

void raylib::BoundingBox::SetMin ( ::Vector3  value)
inline

Sets the min value for the object.

Parameters
valueThe value of which to set min to.

Definition at line 28 of file BoundingBox.hpp.