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 (const ::BoundingBox &box)
 
 BoundingBox (const ::Mesh &mesh)
 Compute mesh bounding box limits. More...
 
bool CheckCollision (::Vector3 center, float radius) const
 Detect collision between box and sphere. More...
 
bool CheckCollision (const ::BoundingBox &box2) const
 Detect collision between two boxes. More...
 
bool CheckCollision (const ::Ray &ray) const
 Detect collision between ray and bounding box. More...
 
BoundingBox & Draw (::Color color={255, 255, 255, 255})
 Draw a bounding box with wires. More...
 
inline ::Vector3 GetMax () const
 
inline ::Vector3 GetMin () const
 
BoundingBox & operator= (const ::BoundingBox &box)
 
void SetMax (::Vector3 value)
 
void SetMin (::Vector3 value)
 

Protected Member Functions

void set (const ::BoundingBox &box)
 

Detailed Description

Bounding box type.

Definition at line 35 of file BoundingBox.hpp.

Constructor & Destructor Documentation

◆ BoundingBox() [1/3]

raylib::BoundingBox::BoundingBox ( const ::BoundingBox &  box)
inline

Definition at line 37 of file BoundingBox.hpp.

References set().

◆ BoundingBox() [2/3]

raylib::BoundingBox::BoundingBox ( const ::Mesh &  mesh)
inline

Compute mesh bounding box limits.

Definition at line 44 of file BoundingBox.hpp.

References set().

◆ BoundingBox() [3/3]

raylib::BoundingBox::BoundingBox ( ::Vector3  Min,
::Vector3  Max 
)
inline

Definition at line 48 of file BoundingBox.hpp.

Member Function Documentation

◆ CheckCollision() [1/3]

bool raylib::BoundingBox::CheckCollision ( ::Vector3  center,
float  radius 
) const
inline

Detect collision between box and sphere.

Definition at line 79 of file BoundingBox.hpp.

◆ CheckCollision() [2/3]

bool raylib::BoundingBox::CheckCollision ( const ::BoundingBox &  box2) const
inline

Detect collision between two boxes.

Definition at line 72 of file BoundingBox.hpp.

◆ CheckCollision() [3/3]

bool raylib::BoundingBox::CheckCollision ( const ::Ray &  ray) const
inline

Detect collision between ray and bounding box.

Definition at line 86 of file BoundingBox.hpp.

◆ Draw()

BoundingBox& raylib::BoundingBox::Draw ( ::Color  color = {255, 255, 255, 255})
inline

Draw a bounding box with wires.

Definition at line 64 of file BoundingBox.hpp.

◆ GetMax()

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

Definition at line 54 of file BoundingBox.hpp.

◆ GetMin()

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

Definition at line 53 of file BoundingBox.hpp.

◆ operator=()

BoundingBox& raylib::BoundingBox::operator= ( const ::BoundingBox &  box)
inline

Definition at line 56 of file BoundingBox.hpp.

References set().

◆ set()

void raylib::BoundingBox::set ( const ::BoundingBox &  box)
inlineprotected

Definition at line 91 of file BoundingBox.hpp.

Referenced by BoundingBox(), and operator=().

◆ SetMax()

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

Definition at line 54 of file BoundingBox.hpp.

◆ SetMin()

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

Definition at line 53 of file BoundingBox.hpp.