GClasses
GClasses::G3dLetterMaker Class Reference

#include <GRayTrace.h>

Public Member Functions

 G3dLetterMaker (GRayTraceMaterial *pMaterial)
 
 ~G3dLetterMaker ()
 
double letterWidth (char c)
 
GRayTraceTriMeshmakeLetter (char c)
 
double measureWidth (const char *szPhrase)
 
void move (G3DReal dx, G3DReal dy=0.0, G3DReal dz=0.0)
 
void move (G3DVector &vec)
 
G3DVectorpos ()
 
void rotate (G3DReal yaw, G3DReal pitch, G3DReal roll)
 
void scale (G3DReal width, G3DReal height, G3DReal depth)
 
void setLineWidth (G3DReal lw)
 
GRayTraceTriMeshspecialChar (const char *szName)
 
void writeString (GRayTraceScene *pScene, const char *szString)
 

Protected Member Functions

void addQuad (G3DReal x1, G3DReal y1, G3DReal x2, G3DReal y2, G3DReal x3, G3DReal y3, G3DReal x4, G3DReal y4)
 
void curve (G3DReal x, G3DReal y, G3DReal w, G3DReal hh, double fromRads, double toRads)
 Adds a curve. x and y specify the position where 0 radians does (or would) occur. w is the width of the full circly. hh is the height of half the circle. from and to specifies the arc segment in radians divided by PI. More...
 
void hbar (G3DReal x, G3DReal y, G3DReal w, G3DReal height=1.0)
 Adds a horizontal line. More...
 
void set (G3DVector *pBack, G3DVector *pFront, G3DReal x, G3DReal y)
 
void vbar (G3DReal x1, G3DReal y1, G3DReal x2, G3DReal y2, G3DReal width=1.0)
 Adds a vertical or slanted line. More...
 

Protected Attributes

G3DMatrix m_basis
 
GTriMeshBuilder m_builder
 
size_t m_circleSegments
 
G3DReal m_lineWidth
 
G3DVector m_pos
 
double m_spaceWidth
 

Constructor & Destructor Documentation

GClasses::G3dLetterMaker::G3dLetterMaker ( GRayTraceMaterial pMaterial)
GClasses::G3dLetterMaker::~G3dLetterMaker ( )

Member Function Documentation

void GClasses::G3dLetterMaker::addQuad ( G3DReal  x1,
G3DReal  y1,
G3DReal  x2,
G3DReal  y2,
G3DReal  x3,
G3DReal  y3,
G3DReal  x4,
G3DReal  y4 
)
protected
void GClasses::G3dLetterMaker::curve ( G3DReal  x,
G3DReal  y,
G3DReal  w,
G3DReal  hh,
double  fromRads,
double  toRads 
)
protected

Adds a curve. x and y specify the position where 0 radians does (or would) occur. w is the width of the full circly. hh is the height of half the circle. from and to specifies the arc segment in radians divided by PI.

void GClasses::G3dLetterMaker::hbar ( G3DReal  x,
G3DReal  y,
G3DReal  w,
G3DReal  height = 1.0 
)
protected

Adds a horizontal line.

double GClasses::G3dLetterMaker::letterWidth ( char  c)
GRayTraceTriMesh* GClasses::G3dLetterMaker::makeLetter ( char  c)
double GClasses::G3dLetterMaker::measureWidth ( const char *  szPhrase)
void GClasses::G3dLetterMaker::move ( G3DReal  dx,
G3DReal  dy = 0.0,
G3DReal  dz = 0.0 
)
void GClasses::G3dLetterMaker::move ( G3DVector vec)
G3DVector& GClasses::G3dLetterMaker::pos ( )
inline
void GClasses::G3dLetterMaker::rotate ( G3DReal  yaw,
G3DReal  pitch,
G3DReal  roll 
)
void GClasses::G3dLetterMaker::scale ( G3DReal  width,
G3DReal  height,
G3DReal  depth 
)
void GClasses::G3dLetterMaker::set ( G3DVector pBack,
G3DVector pFront,
G3DReal  x,
G3DReal  y 
)
protected
void GClasses::G3dLetterMaker::setLineWidth ( G3DReal  lw)
inline
GRayTraceTriMesh* GClasses::G3dLetterMaker::specialChar ( const char *  szName)
void GClasses::G3dLetterMaker::vbar ( G3DReal  x1,
G3DReal  y1,
G3DReal  x2,
G3DReal  y2,
G3DReal  width = 1.0 
)
protected

Adds a vertical or slanted line.

void GClasses::G3dLetterMaker::writeString ( GRayTraceScene pScene,
const char *  szString 
)

Member Data Documentation

G3DMatrix GClasses::G3dLetterMaker::m_basis
protected
GTriMeshBuilder GClasses::G3dLetterMaker::m_builder
protected
size_t GClasses::G3dLetterMaker::m_circleSegments
protected
G3DReal GClasses::G3dLetterMaker::m_lineWidth
protected
G3DVector GClasses::G3dLetterMaker::m_pos
protected
double GClasses::G3dLetterMaker::m_spaceWidth
protected