Stellarium 0.15.2
List of all members | Public Types | Public Member Functions | Public Attributes
AABB Class Reference

An axis-aligned bounding-box class. More...

#include <AABB.hpp>

+ Collaboration diagram for AABB:

Public Types

enum  Corner {
  MinMinMin = 0, MaxMinMin, MaxMaxMin, MinMaxMin,
  MinMinMax, MaxMinMax, MaxMaxMax, MinMaxMax,
  CORNERCOUNT
}
 
enum  Plane {
  Front = 0, Back, Bottom, Top,
  Left, Right, PLANECOUNT
}
 

Public Member Functions

 AABB ()
 Creates an AABB with minimum vertex set to infinity and maximum vertex set to -infinity. More...
 
 AABB (Vec3f min, Vec3f max)
 
void reset ()
 Resets minimum to infinity and maximum to -infinity. More...
 
void resetToZero ()
 Resets minimum and maximum to zero vectors. More...
 
void expand (const Vec3f &vec)
 Updates the bounding box to include the specified vertex. More...
 
Vec3f getCorner (Corner corner) const
 
Vec3f positiveVertex (Vec3f &normal) const
 Used for frustum culling. More...
 
Vec3f negativeVertex (Vec3f &normal) const
 
void render () const
 
Vec4f getEquation (AABB::Plane p) const
 Return the plane equation for specified plane as Vec4f. More...
 
Box toBox ()
 Returns a box object that represents the AABB. More...
 

Public Attributes

Vec3f min
 
Vec3f max
 

Detailed Description

An axis-aligned bounding-box class.

Definition at line 42 of file AABB.hpp.

Constructor & Destructor Documentation

AABB::AABB ( )

Creates an AABB with minimum vertex set to infinity and maximum vertex set to -infinity.

Member Function Documentation

void AABB::expand ( const Vec3f vec)

Updates the bounding box to include the specified vertex.

Vec4f AABB::getEquation ( AABB::Plane  p) const

Return the plane equation for specified plane as Vec4f.

Vec3f AABB::positiveVertex ( Vec3f normal) const

Used for frustum culling.

void AABB::reset ( )

Resets minimum to infinity and maximum to -infinity.

void AABB::resetToZero ( )

Resets minimum and maximum to zero vectors.

Box AABB::toBox ( )

Returns a box object that represents the AABB.


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