Blender V5.3
BoundBox2D Class Reference

#include <boundbox.h>

Public Types

enum  full_t { full = 0 }

Public Member Functions

 BoundBox2D ()=default
 BoundBox2D (const float2 radius)
 BoundBox2D (full_t)
bool operator== (const BoundBox2D &other) const
float width () const
float height () const
bool is_empty () const
BoundBox2D operator* (float f) const
BoundBox2D subset (const BoundBox2D &other) const
BoundBox2D make_relative_to (const BoundBox2D &other) const
BoundBox2D clamp (const float mn=0.0f, const float mx=1.0f)
BoundBox2D offset (const float2 offset) const

Public Attributes

float left
float right
float bottom
float top

Detailed Description

Definition at line 196 of file boundbox.h.

Member Enumeration Documentation

◆ full_t

Enumerator
full 

Definition at line 207 of file boundbox.h.

Constructor & Destructor Documentation

◆ BoundBox2D() [1/3]

◆ BoundBox2D() [2/3]

BoundBox2D::BoundBox2D ( const float2 radius)
inline

Definition at line 202 of file boundbox.h.

References bottom, left, right, top, x, and y.

◆ BoundBox2D() [3/3]

BoundBox2D::BoundBox2D ( full_t )
inline

Definition at line 209 of file boundbox.h.

References bottom, left, right, and top.

Member Function Documentation

◆ clamp()

BoundBox2D BoundBox2D::clamp ( const float mn = 0.0f,
const float mx = 1.0f )
inline

Definition at line 268 of file boundbox.h.

References bottom, BoundBox2D(), left, right, and top.

Referenced by blender_camera_border(), and BlenderSync::get_buffer_params().

◆ height()

float BoundBox2D::height ( ) const
inline

Definition at line 222 of file boundbox.h.

References bottom, and top.

Referenced by is_empty(), and Camera::update().

◆ is_empty()

bool BoundBox2D::is_empty ( ) const
inline

Definition at line 227 of file boundbox.h.

References height(), and width().

Referenced by Camera::update().

◆ make_relative_to()

BoundBox2D BoundBox2D::make_relative_to ( const BoundBox2D & other) const
inline

Definition at line 256 of file boundbox.h.

References bottom, BoundBox2D(), left, right, and top.

Referenced by blender_camera_from_view().

◆ offset()

BoundBox2D BoundBox2D::offset ( const float2 offset) const
inline

Definition at line 280 of file boundbox.h.

References bottom, BoundBox2D(), left, offset(), right, top, float2::x, and float2::y.

Referenced by blender_camera_viewplane(), offset(), and Camera::update().

◆ operator*()

BoundBox2D BoundBox2D::operator* ( float f) const
inline

Definition at line 232 of file boundbox.h.

References bottom, BoundBox2D(), left, right, and top.

◆ operator==()

bool BoundBox2D::operator== ( const BoundBox2D & other) const
inline

Definition at line 211 of file boundbox.h.

References bottom, BoundBox2D(), left, right, and top.

◆ subset()

BoundBox2D BoundBox2D::subset ( const BoundBox2D & other) const
inline

Definition at line 244 of file boundbox.h.

References bottom, BoundBox2D(), left, right, subset(), and top.

Referenced by subset().

◆ width()

float BoundBox2D::width ( ) const
inline

Definition at line 217 of file boundbox.h.

References left, and right.

Referenced by is_empty(), and Camera::update().

Member Data Documentation

◆ bottom

◆ left

◆ right

◆ top


The documentation for this class was generated from the following file: