SOFA API  6dc60b15
Open source framework for multi-physics simuation
sofa::defaulttype::BoundingBox2D Class Reference

#include <BoundingBox.h>

bounding rectangle More...

Detailed Description

bounding rectangle

Protected Attributes

bbox_t bbox
 

Public Member Functions

 BoundingBox2D ()
 
 BoundingBox2D (const Vector2 &minBBox, const Vector2 &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 Vector2 & minBBox () const
 
const Vector2 & maxBBox () const
 
Vector2 & minBBox ()
 
Vector2 & maxBBox ()
 
bool contains (const sofa::defaulttype::Vector2 &point) const
 
bool contains (const BoundingBox2D &other) const
 
bool intersect (const BoundingBox2D &other) const
 
void intersection (const BoundingBox2D &other)
 
void include (const sofa::defaulttype::Vector2 &point)
 
void include (const BoundingBox2D &other)
 
void inflate (SReal amount)
 
BoundingBox2D getIntersection (const BoundingBox2D &other) const
 
BoundingBox2D getInclude (const sofa::defaulttype::Vector2 &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_t sofa::defaulttype::BoundingBox2D::bbox
protected

Constructor details

sofa::defaulttype::BoundingBox2D::BoundingBox2D ( )
sofa::defaulttype::BoundingBox2D::BoundingBox2D ( const Vector2 &  minBBox,
const Vector2 &  maxBBox 
)

Define using the endpoints of the main diagonal.

sofa::defaulttype::BoundingBox2D::BoundingBox2D ( const bbox_t bbox)
sofa::defaulttype::BoundingBox2D::BoundingBox2D ( SReal  xmin,
SReal  xmax,
SReal  ymin,
SReal  ymax 
)

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

sofa::defaulttype::BoundingBox2D::BoundingBox2D ( const Vec4f &  bbox)

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

sofa::defaulttype::BoundingBox2D::BoundingBox2D ( const Vec4d &  bbox)

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

Function details

bool sofa::defaulttype::BoundingBox2D::contains ( const sofa::defaulttype::Vector2 &  point) const
bool sofa::defaulttype::BoundingBox2D::contains ( const BoundingBox2D other) const
BoundingBox2D sofa::defaulttype::BoundingBox2D::getInclude ( const sofa::defaulttype::Vector2 &  point) const
BoundingBox2D sofa::defaulttype::BoundingBox2D::getInclude ( const BoundingBox2D other) const
BoundingBox2D sofa::defaulttype::BoundingBox2D::getInflate ( SReal  amount) const
BoundingBox2D sofa::defaulttype::BoundingBox2D::getIntersection ( const BoundingBox2D other) const
void sofa::defaulttype::BoundingBox2D::include ( const sofa::defaulttype::Vector2 &  point)
void sofa::defaulttype::BoundingBox2D::include ( const BoundingBox2D other)
void sofa::defaulttype::BoundingBox2D::inflate ( SReal  amount)
bool sofa::defaulttype::BoundingBox2D::intersect ( const BoundingBox2D other) const
void sofa::defaulttype::BoundingBox2D::intersection ( const BoundingBox2D other)
void sofa::defaulttype::BoundingBox2D::invalidate ( )
bool sofa::defaulttype::BoundingBox2D::isFlat ( ) const
bool sofa::defaulttype::BoundingBox2D::isNegligeable ( ) const
bool sofa::defaulttype::BoundingBox2D::isNull ( ) const
bool sofa::defaulttype::BoundingBox2D::isValid ( ) const
const Vector2 & sofa::defaulttype::BoundingBox2D::maxBBox ( ) const
Vector2 & sofa::defaulttype::BoundingBox2D::maxBBox ( )
SReal * sofa::defaulttype::BoundingBox2D::maxBBoxPtr ( )
const SReal * sofa::defaulttype::BoundingBox2D::maxBBoxPtr ( ) const
const Vector2 & sofa::defaulttype::BoundingBox2D::minBBox ( ) const
Vector2 & sofa::defaulttype::BoundingBox2D::minBBox ( )
SReal * sofa::defaulttype::BoundingBox2D::minBBoxPtr ( )
const SReal * sofa::defaulttype::BoundingBox2D::minBBoxPtr ( ) const
BoundingBox2D sofa::defaulttype::BoundingBox2D::neutral_bbox ( )
static
sofa::defaulttype::BoundingBox2D::operator bbox_t ( ) const

Related details

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