3DCoat  3D-COAT 4.9.xx
3DCoat is the one application that has all the tools you need to take your 3D idea from a block of digital clay all the way to a production ready, fully textured organic or hard surface model.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
coat::scripto::AABB Class Reference

Class for working with an axis aligned bounding box. More...

#include <SAABB.h>

Public Member Functions

 AABB ()
 Constructor for building an empty box. More...
 
bool operator== (const AABB &) const
 Comparison. More...
 
Vec3 min () const
 Returns a corner with a minimal coord. More...
 
Vec3 max () const
 Returns a corner with a maximal coord. More...
 
Vec3 size () const
 Returns a size of box. More...
 
bool empty () const
 TRUE when box is empty. More...
 
bool contains (const Vec3 &) const
 Returns TRUE when point lies in this box. More...
 
bool add (const Vec3 &)
 Extends this box by point. Returns TRUE when box was extended. More...
 
AABBtransform (const Mat4 &)
 Transform box by matrix 4 x 4. More...
 

Detailed Description

Class for working with an axis aligned bounding box.

aabb.jpg
Since
5.0.0

Constructor & Destructor Documentation

coat::scripto::AABB::AABB ( )
inline

Constructor for building an empty box.

See Also
empty()

Member Function Documentation

bool coat::scripto::AABB::add ( const Vec3 )

Extends this box by point. Returns TRUE when box was extended.

AABB a;
a.add( Vec3( -10, -30, -90 ) );
a.add( Vec3( 90, 30, 10 ) );
a.add( Vec3( 9, 3, 1 ) );
bool coat::scripto::AABB::contains ( const Vec3 ) const

Returns TRUE when point lies in this box.

AABB a;
Vec3 p( 11, 13, 17 );
...
if ( a.contains( p ) ) { ... }
bool coat::scripto::AABB::empty ( ) const

TRUE when box is empty.

Vec3 coat::scripto::AABB::max ( ) const

Returns a corner with a maximal coord.

Vec3 coat::scripto::AABB::min ( ) const

Returns a corner with a minimal coord.

bool coat::scripto::AABB::operator== ( const AABB ) const

Comparison.

AABB a;
AABB b;
...
if (a == b) { ... }
Vec3 coat::scripto::AABB::size ( ) const

Returns a size of box.

AABB& coat::scripto::AABB::transform ( const Mat4 )

Transform box by matrix 4 x 4.

AABB a;
Mat4 m;
...
a.transform( m );

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