SOFA API  9d870773
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

 BoundingBox ()
 
 BoundingBox (const sofa::type::Vec3 &minBBox, const sofa::type::Vec3 &maxBBox)
 Define using the endpoints of the main diagonal. More...
 
 BoundingBox (const bbox_t &bbox)
 
 BoundingBox (SReal xmin, SReal xmax, SReal ymin, SReal ymax, SReal zmin, SReal zmax)
 Define using xmin, xmax, ymin, ymax, zmin, zmax in this order. More...
 
 BoundingBox (const Vec6f &bbox)
 Define using xmin, xmax, ymin, ymax, zmin, zmax in this order. More...
 
 BoundingBox (const Vec6d &bbox)
 Define using xmin, xmax, ymin, ymax, zmin, zmax in this order. More...
 
 operator bbox_t () const
 
void invalidate ()
 
bool isValid () const
 
bool isFlat () 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 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/6]

sofa::type::BoundingBox::BoundingBox ( )

◆ BoundingBox() [2/6]

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

Define using the endpoints of the main diagonal.

◆ BoundingBox() [3/6]

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

◆ BoundingBox() [4/6]

sofa::type::BoundingBox::BoundingBox ( SReal  xmin,
SReal  xmax,
SReal  ymin,
SReal  ymax,
SReal  zmin,
SReal  zmax 
)

Define using xmin, xmax, ymin, ymax, zmin, zmax in this order.

◆ BoundingBox() [5/6]

sofa::type::BoundingBox::BoundingBox ( const Vec6f bbox)

Define using xmin, xmax, ymin, ymax, zmin, zmax in this order.

◆ BoundingBox() [6/6]

sofa::type::BoundingBox::BoundingBox ( const Vec6d bbox)

Define using xmin, xmax, ymin, ymax, zmin, zmax in this order.

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

◆ 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]

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

◆ maxBBoxPtr() [1/2]

const 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]

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

◆ minBBoxPtr() [1/2]

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

◆ minBBoxPtr() [2/2]

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

◆ neutral_bbox()

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

◆ operator bbox_t()

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

Related details

◆ operator<<

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

◆ operator>>

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