Blender V4.3
BoundBox Class Reference

#include <DNA_object_types.h>

Public Types

enum  empty_t { empty = 0 }
 

Public Member Functions

__forceinline BoundBox ()
 
__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, float border)
 
__forceinline void grow (const BoundBox &bbox)
 
__forceinline void grow_safe (const float3 &pt)
 
__forceinline void grow_safe (const float3 &pt, 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 103 of file DNA_object_types.h.

Member Enumeration Documentation

◆ empty_t

Enumerator
empty 

Definition at line 29 of file boundbox.h.

Constructor & Destructor Documentation

◆ BoundBox() [1/4]

__forceinline BoundBox::BoundBox ( )
inline

Definition at line 23 of file boundbox.h.

◆ BoundBox() [2/4]

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

Definition at line 25 of file boundbox.h.

◆ BoundBox() [3/4]

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

Definition at line 27 of file boundbox.h.

◆ BoundBox() [4/4]

__forceinline BoundBox::BoundBox ( empty_t )
inline

Definition at line 31 of file boundbox.h.

Member Function Documentation

◆ area()

__forceinline float BoundBox::area ( ) const
inline

Definition at line 102 of file boundbox.h.

References half_area().

Referenced by LightTreeMeasure::calculate(), and safe_area().

◆ center()

__forceinline float3 BoundBox::center ( ) const
inline

Definition at line 113 of file boundbox.h.

References max, and min.

Referenced by intersects().

◆ center2()

◆ grow() [1/3]

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

Definition at line 51 of file boundbox.h.

References max, and min.

◆ grow() [2/3]

◆ grow() [3/3]

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

Definition at line 44 of file boundbox.h.

References make_float3(), and min.

◆ grow_safe() [1/3]

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

Definition at line 76 of file boundbox.h.

References isfinite_safe(), max, and min.

◆ grow_safe() [2/3]

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

Definition at line 57 of file boundbox.h.

References min, float3::x, float3::y, and float3::z.

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

◆ grow_safe() [3/3]

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

Definition at line 67 of file boundbox.h.

References make_float3(), 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 86 of file boundbox.h.

References max, and min.

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

◆ intersects()

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

Definition at line 152 of file boundbox.h.

References center(), fabsf, size(), float3::x, float3::y, and float3::z.

◆ safe_area()

◆ size()

◆ transformed()

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

◆ valid()

Member Data Documentation

◆ max

◆ min

◆ vec


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