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.
 
 FTBBox (float lx, float ly, float lz, float ux, float uy, float uz)
 Constructor.
 
 FTBBox (FTPoint l, FTPoint u)
 Constructor.
 
 FTBBox (FT_GlyphSlot glyph)
 Constructor.
 
 ~FTBBox ()
 Destructor.
 
void Invalidate ()
 Mark the bounds invalid by setting all lower dimensions greater than the upper dimensions.
 
bool IsValid ()
 Determines if this bounding box is valid.
 
FTBBoxoperator+= (const FTPoint vector)
 Move the Bounding Box by a vector.
 
FTBBoxoperator|= (const FTBBox &bbox)
 Combine two bounding boxes.
 
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
glyphA 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(), and FTFont::BBox().

◆ operator+=()

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

Move the Bounding Box by a vector.

Parameters
vectorThe 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
bboxThe 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(), and FTFont::BBox().


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