FTGL: FTBBox Class Reference

FTGL 2.1.3~rc5

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
FTBBox Class Reference

FTBBox is a convenience class for handling bounding boxes. More...

`#include <FTBBox.h>`

## Public Member Functions
| FTBBox ()
| Default constructor. More...
| FTBBox (float lx, float ly, float lz, float ux, float uy, float uz)
| Constructor. More...
| FTBBox (FTPoint l, FTPoint u)
| Constructor. More...
| FTBBox (FT_GlyphSlot glyph)
| Constructor. More...
| ~FTBBox ()
| Destructor. More...
void | Invalidate ()
| Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions. More...
bool | IsValid ()
| Determines if this bounding box is valid. More...
FTBBox & | operator+= (const FTPoint vector)
| Move the Bounding Box by a vector. More...
FTBBox & | operator|= (const FTBBox &bbox)
| Combine two bounding boxes. More...
void | SetDepth (float depth)
FTPoint const | Upper () const
FTPoint const | Lower () const

## Detailed Description

FTBBox is a convenience class for handling bounding boxes.

Definition at line 42 of file FTBBox.h.

## Constructor & Destructor Documentation

FTBBox::FTBBox | ( |  | ) |
| inline

Default constructor.

Bounding box is set to zero.

Definition at line 48 of file FTBBox.h.

FTBBox::FTBBox | ( | float | lx,
|  | float | ly,
|  | float | lz,
|  | float | ux,
|  | float | uy,
|  | float | uz
| ) |  |
| inline

Constructor.

Definition at line 56 of file FTBBox.h.

FTBBox::FTBBox | ( | FTPoint | l,
|  | FTPoint | u
| ) |  |
| inline

Constructor.

Definition at line 64 of file FTBBox.h.

FTBBox::FTBBox | ( | FT_GlyphSlot | glyph | ) |
| inline

Constructor.

Extracts a bounding box from a freetype glyph. Uses the control box for the glyph. `FT_Glyph_Get_CBox()`

Parameters

  glyph | A freetype glyph

Definition at line 75 of file FTBBox.h.

FTBBox::~FTBBox | ( |  | ) |
| inline

Destructor.

Definition at line 93 of file FTBBox.h.

## Member Function Documentation

void FTBBox::Invalidate | ( |  | ) |
| inline

Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions.

Definition at line 100 of file FTBBox.h.

bool FTBBox::IsValid | ( |  | ) |
| inline

Determines if this bounding box is valid.

Returns
  True if all lower values are <= the corresponding upper values.

Definition at line 112 of file FTBBox.h.

FTPoint const FTBBox::Lower | ( |  | ) | const
| inline

Definition at line 165 of file FTBBox.h.

Referenced by FTFont::BBox().

FTBBox& FTBBox::operator+= | ( | const FTPoint | vector | ) |
| inline

Move the Bounding Box by a vector.

Parameters

  vector | The vector to move the bbox in 3D space.

Definition at line 124 of file FTBBox.h.

FTBBox& FTBBox::operator|= | ( | const FTBBox & | bbox | ) |
| inline

Combine two bounding boxes.

The result is the smallest bounding box containing the two original boxes.

Parameters

  bbox | The bounding box to merge with the second one.

Definition at line 138 of file FTBBox.h.

References FTPoint::X(), FTPoint::Y(), and FTPoint::Z().

void FTBBox::SetDepth | ( | float | depth | ) |
| inline

Definition at line 150 of file FTBBox.h.

FTPoint const FTBBox::Upper | ( |  | ) | const
| inline

Definition at line 159 of file FTBBox.h.

Referenced by FTFont::BBox().

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

- FTBBox.h