Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

BasicText3D Class Reference

Classe de gestion de text 3D (basée sur la FTGL). More...

#include <text3d.h>

Inheritance diagram for BasicText3D:

Text3D List of all members.

Public Member Functions

 BasicText3D ()
void SetRatioXY (GLdouble value)
void Setup (FTFont *f, FontType t, int x=0, int y=0)
void operator= (BasicText3D &src)
BOOL DrawPicking (char *text)
 Affichage pour le picking.

BOOL Draw (char *text)
BOOL Draw (char letter)
Point3D< float > GetBox (char *text)
float GetAscender ()
float GetDescender ()
float GetHeight ()
float GetWidth (char *text)
float GetWidth (char letter)

Public Attributes

FontType type
 type de fonte

FTFont * font
 fonte a appliquer

Material material
 couleur

float depth
 profondeur dans le cas d'une font extrude

int xCenter
 centrage en X (-1 a gauche, 0 centrer, 1 a droite)

int yCenter
 centrage en Y (-1 en haut,0 centrer, 1 en base)

GLdouble zCenter
 centrage en Z

double scale
 taille relative de la fonte (en )

BOOL usePicking
 dois on utiliser le picking

double ratioXY
 rapport X/Y de la surface en cours

double ratioYX
 rapport Y/X de la surface en cours


Detailed Description

Classe de gestion de text 3D (basée sur la FTGL).

Les parametres:

ex.:

BasicText3D text; FTGLTextureFont font; font.open("myfont.ttf"); font.FaceSize(18); text.Setup(&font,ft_texture,0,0); text.value="hello word !!"; // positionage en 3D par les glTranlate,glRotate,glScall text.Draw();

Definition at line 122 of file text3d.h.


Constructor & Destructor Documentation

BasicText3D::BasicText3D  ) 
 

Definition at line 26 of file text3d.cpp.

References font, ft_unknown, Material::SetFull(), SetRatioXY(), type, usePicking, xCenter, yCenter, and zCenter.


Member Function Documentation

BOOL BasicText3D::Draw char  letter  ) 
 

Definition at line 84 of file text3d.cpp.

References BOOL(), and Draw().

BOOL BasicText3D::Draw char *  text  ) 
 

Definition at line 91 of file text3d.cpp.

References BOOL(), ce, decal, font, ft_bitmap, ft_extrude, ft_outline, ft_pixmap, ft_polygon, ft_texture, ft_unknown, GetAscender(), GetDescender(), GetWidth(), ControlEngine::monitor, type, Material::Use(), xCenter, yCenter, and zCenter.

Referenced by Draw(), and DrawPicking().

BOOL BasicText3D::DrawPicking char *  text  ) 
 

Affichage pour le picking.

Todo:
Parametre:
  • asBoundBox, afficher just les boites englobantes ou caractere complet
  • differentier les lettre
Question ? Le Text3D doit avoir l'option usePicking(TRUE,FALSE,letter)

Definition at line 78 of file text3d.cpp.

References BOOL(), Draw(), and usePicking.

float BasicText3D::GetAscender  ) 
 

Definition at line 166 of file text3d.cpp.

References font.

Referenced by Draw(), and GetHeight().

Point3D< float > BasicText3D::GetBox char *  text  ) 
 

Definition at line 157 of file text3d.cpp.

References font, and Point3D< T >::Set().

float BasicText3D::GetDescender  ) 
 

Definition at line 171 of file text3d.cpp.

References font.

Referenced by Draw(), and GetHeight().

float BasicText3D::GetHeight  ) 
 

Definition at line 176 of file text3d.cpp.

References GetAscender(), and GetDescender().

Referenced by Text3D::ComputeLineSize().

float BasicText3D::GetWidth char  letter  ) 
 

Definition at line 181 of file text3d.cpp.

References GetWidth().

float BasicText3D::GetWidth char *  text  ) 
 

Si valeur NULL, utilise le text courent

Definition at line 189 of file text3d.cpp.

References font.

Referenced by Text3D::ComputeLayout(), Text3D::ComputeLineSize(), Draw(), and GetWidth().

void BasicText3D::operator= BasicText3D src  ) 
 

Definition at line 54 of file text3d.cpp.

References font, src, type, usePicking, xCenter, yCenter, and zCenter.

Referenced by Text3D::operator=().

void BasicText3D::SetRatioXY GLdouble  value  ) 
 

Definition at line 40 of file text3d.cpp.

References ratioYX.

Referenced by BasicText3D(), and Face::Draw().

void BasicText3D::Setup FTFont *  f,
FontType  t,
int  x = 0,
int  y = 0
 

Definition at line 46 of file text3d.cpp.

References f, font, t, type, xCenter, and yCenter.

Referenced by Text3D::Setup().


Member Data Documentation

float BasicText3D::depth
 

profondeur dans le cas d'une font extrude

Definition at line 128 of file text3d.h.

Referenced by ValueEditors::MakeElemFaceStruct().

FTFont* BasicText3D::font
 

fonte a appliquer

Definition at line 126 of file text3d.h.

Referenced by BasicText3D(), Draw(), GetAscender(), GetBox(), GetDescender(), GetWidth(), operator=(), and Setup().

Material BasicText3D::material
 

couleur

Definition at line 127 of file text3d.h.

Referenced by Tutorial::BaseDemo::BaseDemo(), Button::Button(), Tutorial::LayoutDemo::ConfigTextFace(), TaskWindow::Create(), MsgBox::Create(), Demo::Demo(), Tutorial::FaceDemo::FaceDemo(), ValueEditors::MakeElemFaceStruct(), Tutorial::UniversDemo::SetFace(), TextBox::TextBox(), Tip::Tip(), Title::Title(), and Tutorial::WindowDemo::WindowDemo().

double BasicText3D::ratioXY
 

rapport X/Y de la surface en cours

Definition at line 134 of file text3d.h.

double BasicText3D::ratioYX
 

rapport Y/X de la surface en cours

Definition at line 135 of file text3d.h.

Referenced by SetRatioXY().

double BasicText3D::scale
 

taille relative de la fonte (en )

Definition at line 132 of file text3d.h.

Referenced by Tutorial::LayoutDemo::ConfigTextFace(), TaskWindow::Create(), MsgBox::Create(), and ValueEditors::MakeElemFaceStruct().

FontType BasicText3D::type
 

type de fonte

Definition at line 125 of file text3d.h.

BOOL BasicText3D::usePicking
 

dois on utiliser le picking

Definition at line 133 of file text3d.h.

Referenced by BasicText3D(), DrawPicking(), and operator=().

int BasicText3D::xCenter
 

centrage en X (-1 a gauche, 0 centrer, 1 a droite)

Definition at line 129 of file text3d.h.

Referenced by BasicText3D(), Draw(), operator=(), and Setup().

int BasicText3D::yCenter
 

centrage en Y (-1 en haut,0 centrer, 1 en base)

Definition at line 130 of file text3d.h.

Referenced by BasicText3D(), Draw(), operator=(), and Setup().

GLdouble BasicText3D::zCenter
 

centrage en Z

Definition at line 131 of file text3d.h.

Referenced by BasicText3D(), Draw(), and operator=().


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 19:21:00 2004 for 3d Controls by doxygen 1.3.6