Carna  Version 3.3.2
Public Member Functions | List of all members
Carna::base::BoundingBox Class Reference

Defines a Geometry minimal boundary box. More...

#include <BoundingBox.h>

+ Inheritance diagram for Carna::base::BoundingBox:
+ Collaboration diagram for Carna::base::BoundingBox:

Public Member Functions

 BoundingBox (const math::Vector3f &size)
 Instantiates bounding box of size. More...
 
 BoundingBox (float width, float height, float depth)
 
virtual ~BoundingBox ()
 Deletes.
 
const math::Vector3fsize () const
 Tells the size of this bounding box. More...
 
void setSize (const math::Vector3f &size)
 Changes the size of this bounding box. More...
 
void setSize (float width, float height, float depth)
 
virtual void computeClosemostPoint (math::Vector3f &out, const math::Vector3f &reference) const override
 Computes the point out in model space that is close-most to reference, that is also in model space.
 
- Public Member Functions inherited from Carna::base::BoundingVolume
 BoundingVolume ()
 Instantiates.
 
virtual ~BoundingVolume ()
 Deletes.
 
void setTransform (const math::Matrix4f &transform)
 Sets the transform from the local coordinate system of this bounding volume to the Geometry object that uses it.
 
const math::Matrix4ftransform () const
 Tells the transform from the local coordinate system of this bounding volume to the model space of the Geometry object that uses it.
 
const math::Matrix4finverseTransform () const
 Tells the transform from the model space of the Geometry object that uses this bounding volume to its local coordinate system.
 

Detailed Description

Defines a Geometry minimal boundary box.

Author
Leonid Kostrykin
Date
22.3.15

Definition at line 40 of file BoundingBox.h.

Constructor & Destructor Documentation

◆ BoundingBox() [1/2]

Carna::base::BoundingBox::BoundingBox ( const math::Vector3f size)

Instantiates bounding box of size.

Precondition
size.x() > 0 && size.y() > 0 && size.z() > 0

◆ BoundingBox() [2/2]

Carna::base::BoundingBox::BoundingBox ( float  width,
float  height,
float  depth 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Function Documentation

◆ setSize() [1/2]

void Carna::base::BoundingBox::setSize ( const math::Vector3f size)

Changes the size of this bounding box.

Precondition
size.x() > 0 && size.y() > 0 && size.z() > 0

◆ setSize() [2/2]

void Carna::base::BoundingBox::setSize ( float  width,
float  height,
float  depth 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ size()

const math::Vector3f& Carna::base::BoundingBox::size ( ) const

Tells the size of this bounding box.

Postcondition
size.x() > 0 && size.y() > 0 && size.z() > 0

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