Blender  V3.3
Public Types | Public Member Functions | Public Attributes | List of all members
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]
 
int flag
 
char _pad0 [4]
 
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 89 of file DNA_object_types.h.

Member Enumeration Documentation

◆ empty_t

Enumerator
empty 

Definition at line 35 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 27 of file boundbox.h.

◆ BoundBox() [3/4]

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

Definition at line 31 of file boundbox.h.

◆ BoundBox() [4/4]

__forceinline BoundBox::BoundBox ( empty_t  )
inline

Definition at line 37 of file boundbox.h.

Member Function Documentation

◆ area()

__forceinline float BoundBox::area ( ) const
inline

Definition at line 103 of file boundbox.h.

References half_area().

Referenced by safe_area().

◆ center()

__forceinline float3 BoundBox::center ( ) const
inline

Definition at line 114 of file boundbox.h.

References max, and min.

Referenced by intersects().

◆ center2()

__forceinline float3 BoundBox::center2 ( ) const
inline

◆ grow() [1/3]

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

Definition at line 57 of file boundbox.h.

References grow(), max, and min.

◆ grow() [2/3]

__forceinline void BoundBox::grow ( const float3 pt)
inline

◆ grow() [3/3]

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

Definition at line 50 of file boundbox.h.

References border, make_float3, max, max, min, and min.

◆ grow_safe() [1/3]

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

Definition at line 82 of file boundbox.h.

References grow_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,
float  border 
)
inline

Definition at line 73 of file boundbox.h.

References border, CCL_NAMESPACE_BEGIN::isfinite(), make_float3, max, max, min, min, float3::x, float3::y, and float3::z.

◆ half_area()

__forceinline float BoundBox::half_area ( ) const
inline

Definition at line 108 of file boundbox.h.

References max, and min.

Referenced by area(), BVHBuild::build_node(), BVHObjectBinning::BVHObjectBinning(), and BVHBuild::rotate().

◆ intersect()

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

Definition at line 88 of file boundbox.h.

References max, max, min, and min.

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

◆ intersects()

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

Definition at line 153 of file boundbox.h.

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

◆ safe_area()

__forceinline float BoundBox::safe_area ( ) const
inline

◆ size()

__forceinline float3 BoundBox::size ( ) const
inline

◆ transformed()

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

◆ valid()

__forceinline bool BoundBox::valid ( ) const
inline

Member Data Documentation

◆ _pad0

char BoundBox::_pad0[4]

Definition at line 92 of file DNA_object_types.h.

◆ flag

int BoundBox::flag

◆ max

float3 BoundBox::max

◆ min

float3 BoundBox::min

◆ vec

float BoundBox::vec[8][3]

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