Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

dsp.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  pnt3d
 Definition of a 3D point and vector. More...


Display module

Date:
07-Nov-2005
Author:
Luiz F. Martha
Version:
1.0
This header file contains public function specification and prototypes of the display module of current project.

The adopted model data structure is described in header file "prm.h", which also contains code color definitions.

The basic graphics system used to display primitives is OpenGL. Please refer to OpenGL documentation for additional information.

Revisions:

  • Report modifications here (including name and date).


typedef pnt3d Pnt3d
 Definition of a 3D point and vector.

typedef pnt3d Vec3d
 Definition of a 3D point and vector.

void dspInit (void)
 This function initializes the dsp module.

void dspHelp (void)
 This function displays a help list of the possible program actions and their associated keys.

void dspModel (void)
 This function displays all primitives of current model using the OpenGL graphics system.

int dspZbfModel (void *zbuffer_canvas)
void dspZbfBeginPoly (long int color, double nx, double ny, double nz)
 This function starts to send a new polygon to the zbuffer module to display.

void dspZbfVertex (double x, double y, double z)
 This function project a polygon vertex and send it to the zbuffer module in the process of displaying a face.

void dspZbfEndPoly (void)
 This function finishes the specification of a polygon to be displayed in zbuffer module.

void dspGetPickRay (int x, int y, double *frontx, double *fronty, double *frontz, double *backx, double *backy, double *backz)
 Given a mouse location point in raster canvas coordinates, this function returns the corresponding pick ray in world coordinates (WC).


Typedef Documentation

typedef struct pnt3d Pnt3d
 

Definition of a 3D point and vector.

typedef struct pnt3d Vec3d
 

Definition of a 3D point and vector.


Function Documentation

void dspGetPickRay int    x,
int    y,
double *    frontx,
double *    fronty,
double *    frontz,
double *    backx,
double *    backy,
double *    backz
 

Given a mouse location point in raster canvas coordinates, this function returns the corresponding pick ray in world coordinates (WC).

A pick ray is a line between a point on the front (near) plane and a point on the back (far) plane. These two points correspond to the given point location in raster coordinates.

Parameters:
x  - x coordindate of raster point on canvas (in)
y  - y coordindate of raster point on canvas (in)
frontx  - x coord. of point in WC at front plane (out)
fronty  - y coord. of point in WC at front plane (out)
frontz  - z coord. of point in WC at front plane (out)
backx  - x coord. of point in WC at back plane (out)
backy  - y coord. of point in WC at back plane (out)
backz  - z coord. of point in WC at back plane (out)

Definition at line 741 of file dsp.c.

Referenced by prjRaster2WorldXY().

void dspHelp void   
 

This function displays a help list of the possible program actions and their associated keys.

Definition at line 542 of file dsp.c.

References font_list_base, help_cmd, and help_msg.

Referenced by prjHelp().

void dspInit void   
 

This function initializes the dsp module.

It initializes some OpenGL parameters.

Definition at line 508 of file dsp.c.

References font_list_base, and Odatascreen.

Referenced by prjResize().

void dspModel void   
 

This function displays all primitives of current model using the OpenGL graphics system.

Definition at line 638 of file dsp.c.

References dspHighltPrm(), dspPrm(), prmCheckSelected(), prmFirst(), and prmNext().

Referenced by prjBuildDisplayList().

void dspZbfBeginPoly long int    color,
double    nx,
double    ny,
double    nz
 

This function starts to send a new polygon to the zbuffer module to display.

It displays with the given coded color and changes the color intensity taking into account the given polygon normal vector orientation with respect to view vector.

Parameters:
color  - polygon coded color (in)
nx  - x component to polygon normal (in)
ny  - y component to polygon normal (in)
nz  - z component to polygon normal (in)

Definition at line 712 of file dsp.c.

References dspShadeColor(), pnt3d::x, pnt3d::y, pnt3d::z, and zbfBeginPoly().

Referenced by circDisplayZbuffer(), and quadDisplayZbuffer().

void dspZbfEndPoly void   
 

This function finishes the specification of a polygon to be displayed in zbuffer module.

Definition at line 734 of file dsp.c.

References zbfEndPoly().

Referenced by circDisplayZbuffer(), and quadDisplayZbuffer().

int dspZbfModel void *    zbuffer_canvas
 

Definition at line 661 of file dsp.c.

References dspEncodeColor(), dspGetCamera(), dspGetViewVolume(), dspVecUnit(), pnt3d::x, pnt3d::y, and pnt3d::z.

Referenced by prjDspZbufferCanvas().

void dspZbfVertex double    x,
double    y,
double    z
 

This function project a polygon vertex and send it to the zbuffer module in the process of displaying a face.

To project a vertex means to transform it from modeling (object) coordinates to normalized screen coordinates.

Parameters:
x  - x coordinate of polygon vertex (in)
y  - y coordinate of polygon vertex (in)
z  - z coordinate of polygon vertex (in)

Definition at line 726 of file dsp.c.

References t3dTransform(), and zbfVertex().

Referenced by circDisplayZbuffer(), and quadDisplayZbuffer().


Generated on Tue Nov 8 10:58:03 2005 for Trab3 by doxygen1.2.18