libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OGLFT::Polygonal::VertexInfo Struct Reference

#include <moOGLFT.h>

Public Member Functions

 VertexInfo (ColorTess *color_tess=0, TextureTess *texture_tess=0)
 
 VertexInfo (FT_Vector *ft_v, ColorTess *color_tess=0, TextureTess *texture_tess=0)
 
 VertexInfo (double p[2], ColorTess *color_tess=0, TextureTess *texture_tess=0)
 
 VertexInfo (double x, double y, ColorTess *color_tess=0, TextureTess *texture_tess=0)
 
void normalize (void)
 

Public Attributes

double v_ [3]
 
ColorTesscolor_tess_
 
TextureTesstexture_tess_
 

Detailed Description

VertexInfo is a private class which is used by the decomposition and tessellation routines to store the vertices and other data of the glyph's outline. Because of the "impedance mismatch" between the crazy 26.6 fixed point format of the FreeType library (well, don't blame them; look at what they have to work with) and OpenGL's preference for double precision, this simple vector has two constructors: one for 26.6 format and one for direct floating point.

VertexInfo also contains (optional) pointers to objects which implement the ColorTess and TextureTess interfaces.

Definition at line 1124 of file moOGLFT.h.

Constructor & Destructor Documentation

OGLFT::Polygonal::VertexInfo::VertexInfo ( ColorTess color_tess = 0,
TextureTess texture_tess = 0 
)
inline

Default constructor just initializes Vertex to zero.

Parameters
color_tessoptional color tesselation object.
texture_tessoptional texture tesselation object.

Definition at line 1142 of file moOGLFT.h.

OGLFT::Polygonal::VertexInfo::VertexInfo ( FT_Vector *  ft_v,
ColorTess color_tess = 0,
TextureTess texture_tess = 0 
)
inline

Construct a Vertex from a point in a FreeType contour.

Parameters
ft_va FreeType FT_Vector, normally passed into the the decomposition callbacks.
color_tessoptional color tesselation object.
texture_tessoptional texture tesselation object.

Definition at line 1156 of file moOGLFT.h.

OGLFT::Polygonal::VertexInfo::VertexInfo ( double  p[2],
ColorTess color_tess = 0,
TextureTess texture_tess = 0 
)
inline

Construct a Vertex from a 2D point.

Parameters
p2D array of doubles.
color_tessoptional color tesselation object.
texture_tessoptional texture tesselation object.

Definition at line 1171 of file moOGLFT.h.

OGLFT::Polygonal::VertexInfo::VertexInfo ( double  x,
double  y,
ColorTess color_tess = 0,
TextureTess texture_tess = 0 
)
inline

Construct a Vertex from a 2D point.

Parameters
xthe X coordinate.
ythe Y coordinate.
color_tessoptional color tesselation object.
texture_tessoptional texture tesselation object.

Definition at line 1187 of file moOGLFT.h.

Member Function Documentation

void OGLFT::Polygonal::VertexInfo::normalize ( void  )
inline

Treat the Vertex like a vector: Normalize its length in the usual way.

Definition at line 1198 of file moOGLFT.h.

Member Data Documentation

ColorTess* OGLFT::Polygonal::VertexInfo::color_tess_

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

Definition at line 1133 of file moOGLFT.h.

TextureTess* OGLFT::Polygonal::VertexInfo::texture_tess_

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

Definition at line 1137 of file moOGLFT.h.

double OGLFT::Polygonal::VertexInfo::v_[3]

Why is this double precision? Because the second argument to the routine gluTessVertex is a pointer to an array of doubles. Otherwise, we could use single precision everywhere.

Definition at line 1126 of file moOGLFT.h.


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