libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo es el conjunto de objetos y funciones, que permiten ejecutar las operaciones básicas de la plataforma Moldeo, y que compone su núcleo.
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Amigas 'defines' Grupos Páginas
Referencia de la Clase OGLFT::Polygonal

This is the base class of the polygonal styles: outline, filled and solid. Más...

#include <moOGLFT.h>

Diagrama de herencias de OGLFT::Polygonal
OGLFT::Face OGLFT::Filled OGLFT::Outline OGLFT::Solid

Clases

struct  VertexInfo
 

Métodos públicos

 Polygonal (const char *filename, float point_size=12, FT_UInt resolution=100)
 
 Polygonal (FT_Face face, float point_size=12, FT_UInt resolution=100)
 
virtual ~Polygonal (void)
 
void setTessellationSteps (unsigned int tessellation_steps)
 
unsigned int tessellationSteps (void) const
 
void setCharacterRotationX (GLfloat character_rotation_x)
 
void setCharacterRotationY (GLfloat character_rotation_y)
 
void setCharacterRotationZ (GLfloat character_rotation_z)
 
GLfloat characterRotationX (void) const
 
GLfloat characterRotationY (void) const
 
GLfloat characterRotationZ (void) const
 
void setColorTess (ColorTess *color_tess)
 
ColorTesscolorTess (void) const
 
void setTextureTess (TextureTess *texture_tess)
 
TextureTesstextureTess (void) const
 
double height (void) const
 
BBox measure (unsigned char c)
 
BBox measure (const char *s)
 
- Métodos públicos heredados desde OGLFT::Face
 Face (const char *filename, float point_size=12, FT_UInt resolution=100)
 
 Face (FT_Face face, float point_size=12, FT_UInt resolution=100)
 
virtual ~Face (void)
 
bool isValid (void) const
 
bool addAuxiliaryFace (const char *filename)
 
bool addAuxiliaryFace (FT_Face face)
 
void setCompileMode (enum GlyphCompileMode compile_mode)
 
enum GlyphCompileMode compileMode (void) const
 
void setPointSize (float point_size)
 
float pointSize (void)
 
void setResolution (FT_UInt resolution)
 
FT_UInt resolution (void)
 
void setAdvance (bool advance)
 
bool advance (void) const
 
void setForegroundColor (GLfloat red=0.0, GLfloat green=0.0, GLfloat blue=0.0, GLfloat alpha=1.0)
 
void setForegroundColor (const GLfloat foreground_color[4])
 
GLfloat foregroundRed (void) const
 
GLfloat foregroundGreen (void) const
 
GLfloat foregroundBlue (void) const
 
GLfloat foregroundAlpha (void) const
 
void setBackgroundColor (GLfloat red=1.0, GLfloat green=1.0, GLfloat blue=1.0, GLfloat alpha=0.0)
 
void setBackgroundColor (const GLfloat background_color[4])
 
GLfloat backgroundRed (void) const
 
GLfloat backgroundGreen (void) const
 
GLfloat backgroundBlue (void) const
 
GLfloat backgroundAlpha (void) const
 
void setCharacterRotationReference (unsigned char c)
 
void setStringRotation (GLfloat string_rotation)
 
GLfloat stringRotation (void) const
 
void setHorizontalJustification (enum HorizontalJustification horizontal_justification)
 
enum HorizontalJustification horizontalJustification (void) const
 
void setVerticalJustification (enum VerticalJustification vertical_justification)
 
enum VerticalJustification verticaljustification (void) const
 
void setCharacterDisplayLists (const DisplayLists &character_display_lists)
 
DisplayListscharacterDisplayLists (void)
 
virtual BBox measureRaw (const char *s)
 
GLuint compile (const char *s)
 
GLuint compile (unsigned char c)
 
void draw (const char *s)
 
void draw (unsigned char c)
 
void draw (GLfloat x, GLfloat y, unsigned char c)
 
void draw (GLfloat x, GLfloat y, GLfloat z, unsigned char c)
 
void draw (GLfloat x, GLfloat y, const char *s)
 
void draw (GLfloat x, GLfloat y, GLfloat z, const char *s)
 
int ascender (void)
 
int descender (void)
 

Tipos protegidos

typedef std::list< VertexInfo * > VertexInfoList
 Normally, we will consider a list of vertices. Más...
 
typedef
VertexInfoList::const_iterator 
VILCI
 A convenience definition of the iterator over the list of vertices. Más...
 
typedef VertexInfoList::iterator VILI
 A convenience definition of the iterator over the list of vertices. Más...
 
- Tipos protegidos heredados desde OGLFT::Face
typedef std::map< FT_UInt, GLuint > GlyphDLists
 Type of the cache of defined glyph to display list mapping. Más...
 
typedef GlyphDLists::const_iterator GDLCI
 
typedef GlyphDLists::iterator GDLI
 

Métodos protegidos

void clearCaches (void)
 
- Métodos protegidos heredados desde OGLFT::Face
virtual void renderGlyph (FT_Face face, FT_UInt glyph_index)=0
 

Atributos protegidos

struct {
   bool   active_
 
   GLfloat   x_
 
   GLfloat   y_
 
   GLfloat   z_
 
character_rotation_
 Angle of rotation of characters relative to text orientation. Más...
 
unsigned int tessellation_steps_
 
double delta_
 
double delta2_
 
double delta3_
 
double vector_scale_
 
FT_Outline_Funcs interface_
 Callbacks for FreeType glyph decomposition into outlines. Más...
 
VertexInfo last_vertex_
 
VertexInfoList vertices_
 
bool contour_open_
 
ColorTesscolor_tess_
 
TextureTesstexture_tess_
 
- Atributos protegidos heredados desde OGLFT::Face
std::vector< FaceData > faces_
 
bool valid_
 Did a font load OK? Más...
 
enum GlyphCompileMode compile_mode_
 Glyph display list creation mode. Más...
 
float point_size_
 Nominal point size. Más...
 
FT_UInt resolution_
 Display resolution in pixels per inch. Más...
 
bool advance_
 Does rendering text affect the MODELVIEW matrix? Más...
 
GLfloat foreground_color_ [4]
 
GLfloat background_color_ [4]
 Background color (what modes would use this?) Más...
 
enum HorizontalJustification horizontal_justification_
 PHIGS-like horizontal positioning of text. Más...
 
enum VerticalJustification vertical_justification_
 PHIGS-like vertical positioning of text. Más...
 
GLfloat string_rotation_
 Rotate an entire string in the Z plane. Más...
 
FT_UInt rotation_reference_glyph_
 
FT_Face rotation_reference_face_
 The rotation reference character could be in any face. Más...
 
GLfloat rotation_offset_y_
 
GlyphDLists glyph_dlists_
 Cache of defined glyph display lists. Más...
 
DisplayLists character_display_lists_
 

Atributos protegidos estáticos

static const unsigned int DEFAULT_TESSELLATION_STEPS = 4
 

Otros miembros heredados

- Tipos públicos heredados desde OGLFT::Face
enum  HorizontalJustification { LEFT, ORIGIN, CENTER, RIGHT }
 
enum  VerticalJustification { BOTTOM, BASELINE, MIDDLE, TOP }
 
enum  GlyphCompileMode { COMPILE, IMMEDIATE }
 

Descripción detallada

This is the base class of the polygonal styles: outline, filled and solid.

In the polygonal styles, the detailed geometric outlines of the glyphs are extracted from the font file and rendered as polygons.

Definición en la línea 1078 del archivo moOGLFT.h.

Documentación de los 'Typedef' miembros de la clase

typedef std::list< VertexInfo * > OGLFT::Polygonal::VertexInfoList
protected

Normally, we will consider a list of vertices.

Definición en la línea 1214 del archivo moOGLFT.h.

typedef VertexInfoList::const_iterator OGLFT::Polygonal::VILCI
protected

A convenience definition of the iterator over the list of vertices.

Definición en la línea 1217 del archivo moOGLFT.h.

typedef VertexInfoList::iterator OGLFT::Polygonal::VILI
protected

A convenience definition of the iterator over the list of vertices.

Definición en la línea 1220 del archivo moOGLFT.h.

Documentación del constructor y destructor

OGLFT::Polygonal::Polygonal ( const char *  filename,
float  point_size = 12,
FT_UInt  resolution = 100 
)
Parámetros
filenamethe filename which contains the font face.
point_sizethe initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolutionthe pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

Definición en la línea 1958 del archivo moOGLFT.cpp.

OGLFT::Polygonal::Polygonal ( FT_Face  face,
float  point_size = 12,
FT_UInt  resolution = 100 
)
Parámetros
faceopen Freetype FT_Face.
point_sizethe initial point size of the font to generate. A point is essentially 1/72th of an inch. Defaults to 12.
resolutionthe pixel density of the display in dots per inch (DPI). Defaults to 100 DPI.

Definición en la línea 1966 del archivo moOGLFT.cpp.

OGLFT::Polygonal::~Polygonal ( void  )
virtual

The Polygonal destructor doesn't do anything in particular.

Definición en la línea 2007 del archivo moOGLFT.cpp.

Documentación de las funciones miembro

GLfloat OGLFT::Polygonal::characterRotationX ( void  ) const
inline
Devuelve
the character rotation in the X direction.

Definición en la línea 1310 del archivo moOGLFT.h.

GLfloat OGLFT::Polygonal::characterRotationY ( void  ) const
inline
Devuelve
the character rotation in the Y direction.

Definición en la línea 1318 del archivo moOGLFT.h.

GLfloat OGLFT::Polygonal::characterRotationZ ( void  ) const
inlinevirtual
Devuelve
the character rotation in the Z direction.

Implementa OGLFT::Face.

Definición en la línea 1326 del archivo moOGLFT.h.

void OGLFT::Polygonal::clearCaches ( void  )
protectedvirtual

The different styles have different caching needs (well, really only the texture style currently has more than the display list cache).

Implementa OGLFT::Face.

Definición en la línea 2227 del archivo moOGLFT.cpp.

ColorTess* OGLFT::Polygonal::colorTess ( void  ) const
inline
Devuelve
the color tesselation object.

Definición en la línea 1341 del archivo moOGLFT.h.

double OGLFT::Polygonal::height ( void  ) const
virtual
Devuelve
the height (i.e., line spacing) at the current character size.

Implementa OGLFT::Face.

Definición en la línea 2127 del archivo moOGLFT.cpp.

BBox OGLFT::Polygonal::measure ( unsigned char  c)
virtual

Implement measuring a character in a polygonal face.

Parámetros
cthe (latin1) character to measure
Devuelve
the bounding box of c.

Implementa OGLFT::Face.

Definición en la línea 2137 del archivo moOGLFT.cpp.

BBox OGLFT::Polygonal::measure ( const char *  s)
inlinevirtual

Measure a string of characters. Note: currently, this merely calls Face's measure routine.

Parámetros
sstring of (latin1) characters to measure
Devuelve
the bounding box of s.

Reimplementado de OGLFT::Face.

Definición en la línea 1385 del archivo moOGLFT.h.

void OGLFT::Polygonal::setCharacterRotationX ( GLfloat  character_rotation_x)

Set the individual character rotation in the X direction.

Parámetros
character_rotation_xangle in degrees of the X rotation.

Definición en la línea 2050 del archivo moOGLFT.cpp.

void OGLFT::Polygonal::setCharacterRotationY ( GLfloat  character_rotation_y)

Set the individual character rotation in the Y direction.

Parámetros
character_rotation_yangle in degrees of the Y rotation.

Definición en la línea 2065 del archivo moOGLFT.cpp.

void OGLFT::Polygonal::setCharacterRotationZ ( GLfloat  character_rotation_z)
virtual

Set the individual character rotation in the Z direction.

Parámetros
character_rotation_zangle in degrees of the Z rotation.

Implementa OGLFT::Face.

Definición en la línea 2080 del archivo moOGLFT.cpp.

void OGLFT::Polygonal::setColorTess ( ColorTess color_tess)

Set an optional color tesselation object. Each tesselated vertex is passed to this object, which returns a color for that position in space.

Parámetros
color_tessthe color tesselation object.

Definición en la línea 2015 del archivo moOGLFT.cpp.

void OGLFT::Polygonal::setTessellationSteps ( unsigned int  tessellation_steps)

TrueType and Type1 files describe the boundaries of glyphs with quadratic and cubic curves, respectively. Since OpenGL can only really draw straight lines, these curves have to be tessellated. The number of steps used is fixed for all glyphs in the face, but can be changed through this method. Other notes: This value is only applicable for Outline, Filled and Solid styles. Changing this value invalidates any cached display lists for glyphs in this face.

Parámetros
tessellation_stepsthe number of steps to tessellate each curved segment of a glyph outline.

Definición en la línea 2034 del archivo moOGLFT.cpp.

void OGLFT::Polygonal::setTextureTess ( TextureTess texture_tess)

Set an optional texture coordinate tesselation object. Each tessellated vertex is passed to this object, which returns texture coordinates for that position in space.

Parámetros
texture_tessthe texture coordinate tesselation object.

Definición en la línea 2025 del archivo moOGLFT.cpp.

unsigned int OGLFT::Polygonal::tessellationSteps ( void  ) const
inline
Devuelve
the number of steps used to tessellate curves in the polygonal font types.

Definición en la línea 1284 del archivo moOGLFT.h.

TextureTess* OGLFT::Polygonal::textureTess ( void  ) const
inline
Devuelve
the texture coordinate tesselation object.

Definición en la línea 1355 del archivo moOGLFT.h.

Documentación de los datos miembro

bool OGLFT::Polygonal::active_

Definición en la línea 1084 del archivo moOGLFT.h.

struct { ... } OGLFT::Polygonal::character_rotation_

Angle of rotation of characters relative to text orientation.

ColorTess* OGLFT::Polygonal::color_tess_
protected

The user can provide a ColorTess object which computes a color for each tesselated vertex.

Definición en la línea 1235 del archivo moOGLFT.h.

bool OGLFT::Polygonal::contour_open_
protected

As GLU tessellation proceeds, new contours open with every call to moveTo.

Definición en la línea 1231 del archivo moOGLFT.h.

const unsigned int OGLFT::Polygonal::DEFAULT_TESSELLATION_STEPS = 4
staticprotected

Default number of steps to break TrueType and Type1 arcs into. (Note: this looks good to me, anyway)

Definición en la línea 1110 del archivo moOGLFT.h.

double OGLFT::Polygonal::delta2_
protected

Definición en la línea 1097 del archivo moOGLFT.h.

double OGLFT::Polygonal::delta3_
protected

Definición en la línea 1097 del archivo moOGLFT.h.

double OGLFT::Polygonal::delta_
protected

When curves are tessellated, we use the forward difference algorithm from Foley and van Dam for parametric curves (pg. 511 of 2nd Ed. in C). So, the step size, delta, is in the parametric variable which is always on the interval [0,1]. Therefore, delta = 1/tessellation_steps

Definición en la línea 1097 del archivo moOGLFT.h.

FT_Outline_Funcs OGLFT::Polygonal::interface_
protected

Callbacks for FreeType glyph decomposition into outlines.

Definición en la línea 1106 del archivo moOGLFT.h.

VertexInfo OGLFT::Polygonal::last_vertex_
protected

Buffers the last control point as the outline of a glyph is decomposed.

Definición en la línea 1211 del archivo moOGLFT.h.

unsigned int OGLFT::Polygonal::tessellation_steps_
protected

The tessellation of curves is pretty crude; regardless of length, use the same number of increments (and as near as I can tell, this is more than sufficient unless the glyph takes up the whole screen).

Definición en la línea 1091 del archivo moOGLFT.h.

TextureTess* OGLFT::Polygonal::texture_tess_
protected

The user can provide a TextureTess object which computes texture coordinates for each tesselated vertex.

Definición en la línea 1239 del archivo moOGLFT.h.

double OGLFT::Polygonal::vector_scale_
protected

For vector rendition modes, FreeType is allowed to generate the lines and arcs at the original face definition resolution. To get to the proper glyph size, the vertices are scaled before they're passed to the GLU tessellation routines.

Definición en la línea 1103 del archivo moOGLFT.h.

VertexInfoList OGLFT::Polygonal::vertices_
protected

As curves are decomposed out of the glyph, their vertices are passed along to the GLU tessellation functions. These vertices have to hang around until gluTessContourEnd is called.

Definición en la línea 1227 del archivo moOGLFT.h.

GLfloat OGLFT::Polygonal::x_

Definición en la línea 1085 del archivo moOGLFT.h.

GLfloat OGLFT::Polygonal::y_

Definición en la línea 1085 del archivo moOGLFT.h.

GLfloat OGLFT::Polygonal::z_

Definición en la línea 1085 del archivo moOGLFT.h.


La documentación para esta clase fue generada a partir de los siguientes ficheros: