SOFA API  1f11bee4
Open source framework for multi-physics simuation
sofa::type::BoundingBox Class Reference

#include <BoundingBox.h>

Inheritance diagram for sofa::type::BoundingBox:

Protected Attributes

bbox_t bbox
 

Public Member Functions

constexpr BoundingBox ()
 
constexpr BoundingBox (const sofa::type::Vec3 &minBBox, const sofa::type::Vec3 &maxBBox)
 Define using the endpoints of the main diagonal. More...
 
constexpr BoundingBox (const bbox_t &bbox)
 
constexpr BoundingBox (const Real xMin, const Real xMax, const Real yMin, const Real yMax, const Real zMin, const Real zMax)
 Define using xMin, xMax, yMin, yMax, zMin, zMax in this order. More...
 
template<typename Scalar >
constexpr BoundingBox (const Vec< 6, Scalar > &bbox)
 
 operator bbox_t () const
 
bool operator== (const BoundingBox &other) const
 
void invalidate ()
 
bool isValid () const
 
bool isFlat () const
 
bool isNegligible () const
 
bool isNegligeable () const
 
bool isNull () const
 
SRealminBBoxPtr ()
 
SRealmaxBBoxPtr ()
 
const SRealminBBoxPtr () const
 
const SRealmaxBBoxPtr () const
 
const sofa::type::Vec3minBBox () const
 
const sofa::type::Vec3maxBBox () const
 
sofa::type::Vec3minBBox ()
 
sofa::type::Vec3maxBBox ()
 
bool contains (const sofa::type::Vec3 &point) const
 
bool contains (const BoundingBox &other) const
 
bool intersect (const BoundingBox &other) const
 
void intersection (const BoundingBox &other)
 
void include (const sofa::type::Vec3 &point)
 
void include (const BoundingBox &other)
 
void inflate (SReal amount)
 
BoundingBox getIntersection (const BoundingBox &other) const
 
BoundingBox getInclude (const sofa::type::Vec3 &point) const
 
BoundingBox getInclude (const BoundingBox &other) const
 
BoundingBox getInflate (SReal amount) const
 

Static Public Member Functions

static constexpr BoundingBox neutral_bbox ()
 

Friends

std::ostream & operator<< (std::ostream &out, const BoundingBox &bbox)
 
std::istream & operator>> (std::istream &in, BoundingBox &bbox)
 

Attribute details

◆ bbox

bbox_t sofa::type::BoundingBox::bbox
protected

Constructor details

◆ BoundingBox() [1/5]

constexpr sofa::type::BoundingBox::BoundingBox ( )
inlineconstexpr

◆ BoundingBox() [2/5]

constexpr sofa::type::BoundingBox::BoundingBox ( const sofa::type::Vec3 minBBox,
const sofa::type::Vec3 maxBBox 
)
inlineconstexpr

Define using the endpoints of the main diagonal.

◆ BoundingBox() [3/5]

constexpr sofa::type::BoundingBox::BoundingBox ( const bbox_t bbox)
inlineexplicitconstexpr

◆ BoundingBox() [4/5]

constexpr sofa::type::BoundingBox::BoundingBox ( const Real  xMin,
const Real  xMax,
const Real  yMin,
const Real  yMax,
const Real  zMin,
const Real  zMax 
)
inlineconstexpr

Define using xMin, xMax, yMin, yMax, zMin, zMax in this order.

◆ BoundingBox() [5/5]

template<typename Scalar >
constexpr sofa::type::BoundingBox::BoundingBox ( const Vec< 6, Scalar > &  bbox)
inlineexplicitconstexpr

Function details

◆ contains() [1/2]

bool sofa::type::BoundingBox::contains ( const BoundingBox other) const

◆ contains() [2/2]

bool sofa::type::BoundingBox::contains ( const sofa::type::Vec3 point) const

◆ getInclude() [1/2]

BoundingBox sofa::type::BoundingBox::getInclude ( const BoundingBox other) const

◆ getInclude() [2/2]

BoundingBox sofa::type::BoundingBox::getInclude ( const sofa::type::Vec3 point) const

◆ getInflate()

BoundingBox sofa::type::BoundingBox::getInflate ( SReal  amount) const

◆ getIntersection()

BoundingBox sofa::type::BoundingBox::getIntersection ( const BoundingBox other) const

◆ include() [1/2]

void sofa::type::BoundingBox::include ( const BoundingBox other)

◆ include() [2/2]

void sofa::type::BoundingBox::include ( const sofa::type::Vec3 point)

◆ inflate()

void sofa::type::BoundingBox::inflate ( SReal  amount)

◆ intersect()

bool sofa::type::BoundingBox::intersect ( const BoundingBox other) const

◆ intersection()

void sofa::type::BoundingBox::intersection ( const BoundingBox other)

◆ invalidate()

void sofa::type::BoundingBox::invalidate ( )

◆ isFlat()

bool sofa::type::BoundingBox::isFlat ( ) const

◆ isNegligeable()

bool sofa::type::BoundingBox::isNegligeable ( ) const

◆ isNegligible()

bool sofa::type::BoundingBox::isNegligible ( ) const

◆ isNull()

bool sofa::type::BoundingBox::isNull ( ) const

◆ isValid()

bool sofa::type::BoundingBox::isValid ( ) const

◆ maxBBox() [1/2]

sofa::type::Vec3 & sofa::type::BoundingBox::maxBBox ( )

◆ maxBBox() [2/2]

const sofa::type::Vec3 & sofa::type::BoundingBox::maxBBox ( ) const

◆ maxBBoxPtr() [1/2]

SReal * sofa::type::BoundingBox::maxBBoxPtr ( )

◆ maxBBoxPtr() [2/2]

const SReal * sofa::type::BoundingBox::maxBBoxPtr ( ) const

◆ minBBox() [1/2]

sofa::type::Vec3 & sofa::type::BoundingBox::minBBox ( )

◆ minBBox() [2/2]

const sofa::type::Vec3 & sofa::type::BoundingBox::minBBox ( ) const

◆ minBBoxPtr() [1/2]

SReal * sofa::type::BoundingBox::minBBoxPtr ( )

◆ minBBoxPtr() [2/2]

const SReal * sofa::type::BoundingBox::minBBoxPtr ( ) const

◆ neutral_bbox()

static constexpr BoundingBox sofa::type::BoundingBox::neutral_bbox ( )
inlinestaticconstexpr

◆ operator bbox_t()

sofa::type::BoundingBox::operator bbox_t ( ) const

◆ operator==()

bool sofa::type::BoundingBox::operator== ( const BoundingBox other) const

Related details

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const BoundingBox bbox 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  in,
BoundingBox bbox 
)
friend