Blender V5.0
BoundBox Class Reference

#include <DNA_object_types.h>

Public Types

enum  empty_t { empty = 0 }

Public Member Functions

__forceinline BoundBox ()=default
__forceinline BoundBox (const float3 &pt)
__forceinline BoundBox (const float3 &min_, const float3 &max_)
__forceinline BoundBox (empty_t)
__forceinline void grow (const float3 &pt)
__forceinline void grow (const float3 &pt, const float border)
__forceinline void grow (const BoundBox &bbox)
__forceinline void grow_safe (const float3 &pt)
__forceinline void grow_safe (const float3 &pt, const float border)
__forceinline void grow_safe (const BoundBox &bbox)
__forceinline void intersect (const BoundBox &bbox)
__forceinline float safe_area () const
__forceinline float area () const
__forceinline float half_area () const
__forceinline float3 center () const
__forceinline float3 center2 () const
__forceinline float3 size () const
__forceinline bool valid () const
BoundBox transformed (const Transform *tfm) const
__forceinline bool intersects (const BoundBox &other)

Public Attributes

float vec [8][3]
float3 min
float3 max

Detailed Description

The following illustrates the orientation of the bounding box in local space


Z  Y
| /
|/
.-----X
    2----------6
   /|         /|
  / |        / |
 1----------5  |
 |  |       |  |
 |  3-------|--7
 | /        | /
 |/         |/
 0----------4

Definition at line 101 of file DNA_object_types.h.

Member Enumeration Documentation

◆ empty_t

Enumerator
empty 

Definition at line 28 of file boundbox.h.

Constructor & Destructor Documentation

◆ BoundBox() [1/4]

__forceinline BoundBox::BoundBox ( )
default

◆ BoundBox() [2/4]

__forceinline BoundBox::BoundBox ( const float3 & pt)
inline

Definition at line 24 of file boundbox.h.

References __forceinline, max, and min.

◆ BoundBox() [3/4]

__forceinline BoundBox::BoundBox ( const float3 & min_,
const float3 & max_ )
inline

Definition at line 26 of file boundbox.h.

References __forceinline, max, and min.

◆ BoundBox() [4/4]

__forceinline BoundBox::BoundBox ( empty_t )
inline

Definition at line 30 of file boundbox.h.

References __forceinline, FLT_MAX, make_float3(), max, and min.

Member Function Documentation

◆ area()

__forceinline float BoundBox::area ( ) const
inline

Definition at line 101 of file boundbox.h.

References __forceinline, and half_area().

Referenced by safe_area().

◆ center()

__forceinline float3 BoundBox::center ( ) const
inline

Definition at line 112 of file boundbox.h.

References __forceinline, max, and min.

Referenced by intersects().

◆ center2()

◆ grow() [1/3]

__forceinline void BoundBox::grow ( const BoundBox & bbox)
inline

Definition at line 50 of file boundbox.h.

References __forceinline, BoundBox(), max, and min.

◆ grow() [2/3]

◆ grow() [3/3]

__forceinline void BoundBox::grow ( const float3 & pt,
const float border )
inline

Definition at line 43 of file boundbox.h.

References __forceinline, make_float3(), max, and min.

◆ grow_safe() [1/3]

__forceinline void BoundBox::grow_safe ( const BoundBox & bbox)
inline

Definition at line 75 of file boundbox.h.

References __forceinline, BoundBox(), isfinite_safe(), max, and min.

◆ grow_safe() [2/3]

__forceinline void BoundBox::grow_safe ( const float3 & pt)
inline

◆ grow_safe() [3/3]

__forceinline void BoundBox::grow_safe ( const float3 & pt,
const float border )
inline

Definition at line 66 of file boundbox.h.

References __forceinline, make_float3(), max, min, float3::x, float3::y, and float3::z.

◆ half_area()

__forceinline float BoundBox::half_area ( ) const
inline

◆ intersect()

__forceinline void BoundBox::intersect ( const BoundBox & bbox)
inline

Definition at line 85 of file boundbox.h.

References __forceinline, BoundBox(), max, and min.

Referenced by BVHMixedSplit::BVHMixedSplit(), and BVHSpatialSplit::split_reference().

◆ intersects()

__forceinline bool BoundBox::intersects ( const BoundBox & other)
inline

◆ safe_area()

◆ size()

__forceinline float3 BoundBox::size ( ) const
inline

Definition at line 122 of file boundbox.h.

References __forceinline, max, and min.

Referenced by intersects().

◆ transformed()

BoundBox BoundBox::transformed ( const Transform * tfm) const
inline

◆ valid()

__forceinline bool BoundBox::valid ( ) const
inline

Definition at line 127 of file boundbox.h.

References __forceinline, max, and min.

Referenced by Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), and transformed().

Member Data Documentation

◆ max

◆ min

◆ vec


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