Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

OGLFT::Polygonal::VertexInfo Struct Reference

#include <OGLFT.h>

List of all members.

Public Methods

 VertexInfo (ColorTess *color_tess=0, TextureTess *texture_tess=0)
 Default constructor just initializes Vertex to zero.
Parameters:
color_tess   optional color tesselation object.
texture_tess   optional texture tesselation object.


 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)
 Treat the Vertex like a vector: Normalize its length in the usual way.


Public Attributes

double 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.

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

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


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.


Constructor & Destructor Documentation

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_v   a FreeType FT_Vector, normally passed into the the decomposition callbacks.
color_tess   optional color tesselation object.
texture_tess   optional texture tesselation object.

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

Construct a Vertex from a 2D point.

Parameters:
p   2D array of doubles.
color_tess   optional color tesselation object.
texture_tess   optional texture tesselation object.

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:
x   the X coordinate.
y   the Y coordinate.
color_tess   optional color tesselation object.
texture_tess   optional texture tesselation object.


The documentation for this struct was generated from the following file:
Generated at Fri Jul 12 10:47:16 2002 for OGLFT by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001