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


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_tess  optional color tesselation object.
texture_tess  optional texture tesselation object.

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.


Member Function Documentation

void OGLFT::Polygonal::VertexInfo::normalize void    [inline]
 

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


Member Data Documentation

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

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

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

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

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.


The documentation for this struct was generated from the following file:
Generated on Wed Oct 1 10:39:04 2003 for OGLFT by doxygen1.2.18