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

WPCG::WP_Draw_2D Class Reference

#include <WP_2D.h>

List of all members.

Public Methods

 WP_Draw_2D ()
 ~WP_Draw_2D ()
void vDrawPoint (GLint x, GLint y) const
void vDrawPoint (const WP_Point2D *point) const
void vDrawLine (GLint startx, GLint starty, GLint endx, GLint endy) const
void vDrawLine (const WP_Point2D *startpoint, const WP_Point2D *endpoint) const
void vDrawPolyLine (WP_Point2D *points, GLint number, bool closed) const
void vDrawString (void *font, const string &text, GLint xpos, GLint ypos) const


Detailed Description

this class is used for the drawing of 2D primitives to the screen by using OpenGL. OpenGL's coordinate system has defined 0,0 being in the lower left corner
Author:
Copyright (C) 2001 W.P. van Paassen peter@paassen.tmfweb.nl
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Constructor & Destructor Documentation

WPCG::WP_Draw_2D::WP_Draw_2D  
 

WPCG::WP_Draw_2D::~WP_Draw_2D  
 


Member Function Documentation

void WPCG::WP_Draw_2D::vDrawLine const WP_Point2D   startpoint,
const WP_Point2D   endpoint
const
 

this function draws a 2D line to the screen

Parameters:
startpoint  a pointer to a WP_Point2D object holding the x and y coordinates of the start of the line
endpoint  a pointer to a WP_Point2D object holding the x and y coordinates of the end of the line

void WPCG::WP_Draw_2D::vDrawLine GLint    startx,
GLint    starty,
GLint    endx,
GLint    endy
const
 

this function draws a 2D line to the screen

Parameters:
startx  the x position of the start of the line
starty  the y position of the start of the line
endx  the x position of the end of the line
endy  the y position of the end of the line

void WPCG::WP_Draw_2D::vDrawPoint const WP_Point2D   point const
 

this function draws a 2D point to the screen

Parameters:
point  a pointer to a WP_Point2D object holding the x and y coordinates

void WPCG::WP_Draw_2D::vDrawPoint GLint    x,
GLint    y
const
 

this function draws a 2D point to the screen

Parameters:
x  the x position of the point
y  the y position of the point

void WPCG::WP_Draw_2D::vDrawPolyLine WP_Point2D   points,
GLint    number,
bool    closed
const
 

this function draws a 2D polyline (a line containing multiple line segments) to the screen

Parameters:
points  an array of points representing the polyline
number  the number of points in the array or the number of line segments in the polyline
closed  a boolean indicating if the polyline is closed (start and endpoint will be connected and in doing so a polygon is created) or not

void WPCG::WP_Draw_2D::vDrawString void *    font,
const string &    text,
GLint    xpos,
GLint    ypos
const
 

this function draws a 2D text to the screen

Parameters:
font  the (glut) font used to draw the text
text  the text which is written to the screen
xpos  the x position of the start of the text (text is written from left to right)
ypos  the y position of the start of the text (text is written from left to right)


The documentation for this class was generated from the following files:
Generated on Tue Jan 28 20:26:38 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002