SOFA API  56988ca1
Open source framework for multi-physics simuation
sofa::type::BoundingBox2D Class Reference

#include <BoundingBox.h>

bounding rectangle More...

Detailed Description

bounding rectangle

Protected Attributes

bbox_t bbox
 

Public Member Functions

 BoundingBox2D ()
 
 BoundingBox2D (const sofa::type::Vec< 2, SReal > &minBBox, const sofa::type::Vec< 2, SReal > &maxBBox)
 Define using the endpoints of the main diagonal. More...
 
 BoundingBox2D (const bbox_t &bbox)
 
 BoundingBox2D (SReal xmin, SReal xmax, SReal ymin, SReal ymax)
 Define using xmin, xmax, ymin, ymax in this order. More...
 
 BoundingBox2D (const Vec4f &bbox)
 Define using xmin, xmax, ymin, ymax in this order. More...
 
 BoundingBox2D (const Vec4d &bbox)
 Define using xmin, xmax, ymin, ymax in this order. More...
 
 operator bbox_t () const
 
void invalidate ()
 
bool isValid () const
 
bool isFlat () const
 
bool isNegligeable () const
 
bool isNull () const
 
SReal * minBBoxPtr ()
 
SReal * maxBBoxPtr ()
 
const SReal * minBBoxPtr () const
 
const SReal * maxBBoxPtr () const
 
const sofa::type::Vec< 2, SReal > & minBBox () const
 
const sofa::type::Vec< 2, SReal > & maxBBox () const
 
sofa::type::Vec< 2, SReal > & minBBox ()
 
sofa::type::Vec< 2, SReal > & maxBBox ()
 
bool contains (const sofa::type::Vec< 2, SReal > &point) const
 
bool contains (const BoundingBox2D &other) const
 
bool intersect (const BoundingBox2D &other) const
 
void intersection (const BoundingBox2D &other)
 
void include (const sofa::type::Vec< 2, SReal > &point)
 
void include (const BoundingBox2D &other)
 
void inflate (SReal amount)
 
BoundingBox2D getIntersection (const BoundingBox2D &other) const
 
BoundingBox2D getInclude (const sofa::type::Vec< 2, SReal > &point) const
 
BoundingBox2D getInclude (const BoundingBox2D &other) const
 
BoundingBox2D getInflate (SReal amount) const
 

Static Public Member Functions

static BoundingBox2D neutral_bbox ()
 

Friends

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

Attribute details

◆ bbox

bbox_t sofa::type::BoundingBox2D::bbox
protected

Constructor details

◆ BoundingBox2D() [1/6]

sofa::type::BoundingBox2D::BoundingBox2D ( )

◆ BoundingBox2D() [2/6]

sofa::type::BoundingBox2D::BoundingBox2D ( const sofa::type::Vec< 2, SReal > &  minBBox,
const sofa::type::Vec< 2, SReal > &  maxBBox 
)

Define using the endpoints of the main diagonal.

◆ BoundingBox2D() [3/6]

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

◆ BoundingBox2D() [4/6]

sofa::type::BoundingBox2D::BoundingBox2D ( SReal  xmin,
SReal  xmax,
SReal  ymin,
SReal  ymax 
)

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

◆ BoundingBox2D() [5/6]

sofa::type::BoundingBox2D::BoundingBox2D ( const Vec4f bbox)

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

◆ BoundingBox2D() [6/6]

sofa::type::BoundingBox2D::BoundingBox2D ( const Vec4d bbox)

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

Function details

◆ contains() [1/2]

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

◆ contains() [2/2]

bool sofa::type::BoundingBox2D::contains ( const sofa::type::Vec< 2, SReal > &  point) const

◆ getInclude() [1/2]

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

◆ getInclude() [2/2]

BoundingBox2D sofa::type::BoundingBox2D::getInclude ( const sofa::type::Vec< 2, SReal > &  point) const

◆ getInflate()

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

◆ getIntersection()

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

◆ include() [1/2]

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

◆ include() [2/2]

void sofa::type::BoundingBox2D::include ( const sofa::type::Vec< 2, SReal > &  point)

◆ inflate()

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

◆ intersect()

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

◆ intersection()

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

◆ invalidate()

void sofa::type::BoundingBox2D::invalidate ( )

◆ isFlat()

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

◆ isNegligeable()

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

◆ isNull()

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

◆ isValid()

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

◆ maxBBox() [1/2]

sofa::type::Vec< 2, SReal > & sofa::type::BoundingBox2D::maxBBox ( )

◆ maxBBox() [2/2]

const sofa::type::Vec< 2, SReal > & sofa::type::BoundingBox2D::maxBBox ( ) const

◆ maxBBoxPtr() [1/2]

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

◆ maxBBoxPtr() [2/2]

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

◆ minBBox() [1/2]

sofa::type::Vec< 2, SReal > & sofa::type::BoundingBox2D::minBBox ( )

◆ minBBox() [2/2]

const sofa::type::Vec< 2, SReal > & sofa::type::BoundingBox2D::minBBox ( ) const

◆ minBBoxPtr() [1/2]

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

◆ minBBoxPtr() [2/2]

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

◆ neutral_bbox()

BoundingBox2D sofa::type::BoundingBox2D::neutral_bbox ( )
static

◆ operator bbox_t()

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

Related details

◆ operator<<

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

◆ operator>>

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