Blender V5.0
BoundBox2D Class Reference

#include <boundbox.h>

Public Member Functions

 BoundBox2D ()=default
 BoundBox2D (const float2 radius)
bool operator== (const BoundBox2D &other) const
float width ()
float height ()
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 = 0.0f
float right = 1.0f
float bottom = 0.0f
float top = 1.0f

Detailed Description

Definition at line 196 of file boundbox.h.

Constructor & Destructor Documentation

◆ BoundBox2D() [1/2]

BoundBox2D::BoundBox2D ( )
default

◆ BoundBox2D() [2/2]

BoundBox2D::BoundBox2D ( const float2 radius)
inline

Definition at line 205 of file boundbox.h.

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

Member Function Documentation

◆ clamp()

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

Definition at line 262 of file boundbox.h.

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

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

◆ height()

float BoundBox2D::height ( )
inline

Definition at line 221 of file boundbox.h.

References bottom, and top.

◆ make_relative_to()

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

Definition at line 250 of file boundbox.h.

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

Referenced by blender_camera_border_subset(), and blender_camera_from_view().

◆ offset()

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

Definition at line 274 of file boundbox.h.

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

Referenced by blender_camera_viewplane(), and offset().

◆ operator*()

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

Definition at line 226 of file boundbox.h.

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

◆ operator==()

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

Definition at line 210 of file boundbox.h.

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

◆ subset()

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

Definition at line 238 of file boundbox.h.

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

Referenced by blender_camera_border_subset(), and subset().

◆ width()

float BoundBox2D::width ( )
inline

Definition at line 216 of file boundbox.h.

References left, and right.

Member Data Documentation

◆ bottom

◆ left

◆ right

◆ top


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