FTGL: FTBBox Class Reference

FTGL 2.4.0

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() [1/4]

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

Default constructor.

Bounding box is set to zero.

Definition at line 48 of file FTBBox.h.

## ◆ FTBBox() [2/4]

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() [3/4]

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

Constructor.

Definition at line 64 of file FTBBox.h.

## ◆ FTBBox() [4/4]

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::~FTBBox | ( |  | ) |
| inline

Destructor.

Definition at line 93 of file FTBBox.h.

## Member Function Documentation

## ◆ Invalidate()

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.

## ◆ IsValid()

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.

## ◆ Lower()

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

Definition at line 165 of file FTBBox.h.

Referenced by FTFont::BBox().

## ◆ operator+=()

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.

## ◆ operator|=()

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().

## ◆ SetDepth()

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

Definition at line 150 of file FTBBox.h.

## ◆ Upper()

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