proj home

Files   Classes   Functions   Hierarchy  

gobjMyBitmapCharacter Class Reference

Display a character string in 3D space. More...

#include <graphmisc.h>

Inheritance diagram for gobjMyBitmapCharacter:
Collaboration diagram for gobjMyBitmapCharacter:

List of all members.

Public Member Functions

 gobjMyBitmapCharacter (string const &name_, point3< float > const &x_, void *font_=GLUT_BITMAP_HELVETICA_10)
 Construct a character string in 3D space.
 gobjMyBitmapCharacter (string const &name_, point3< double > const &x_, void *font_=GLUT_BITMAP_HELVETICA_10)
 Construct a character string in 3D space.
void draw ()
 Draw the object.

Public Attributes

string name
 The string being displayed.
point3< float > x
 The position in 3D space.
void * font
 A pointer to an OpenGL font that the string is written in.


Detailed Description

Display a character string in 3D space.

Definition at line 771 of file graphmisc.h.


Constructor & Destructor Documentation

gobjMyBitmapCharacter::gobjMyBitmapCharacter ( string const &  name_,
point3< float > const &  x_,
void *  font_ = GLUT_BITMAP_HELVETICA_10 
) [inline]

Construct a character string in 3D space.

Possible values of the font are

  • GLUT_BITMAP_HELVETICA_10
  • GLUT_BITMAP_HELVETICA_12
  • GLUT_BITMAP_HELVETICA_18
  • GLUT_BITMAP_TIMES_ROMAN_10
  • GLUT_BITMAP_TIMES_ROMAN_24
  • GLUT_BITMAP_9_BY_15
  • GLUT_BITMAP_8_BY_13

Definition at line 796 of file graphmisc.h.

00801     : name(name_), x(x_), font(font_) {};

gobjMyBitmapCharacter::gobjMyBitmapCharacter ( string const &  name_,
point3< double > const &  x_,
void *  font_ = GLUT_BITMAP_HELVETICA_10 
) [inline]

Construct a character string in 3D space.

Definition at line 805 of file graphmisc.h.

00810     : name(name_), x( point3<float>(x_.x,x_.y,x_.z) ), font(font_) {};


Member Function Documentation

void gobjMyBitmapCharacter::draw (  )  [virtual]

Draw the object.

Implements gobj.

Definition at line 201 of file graphmisc.cpp.

References font, GOBJDEBUGCODE, and name.

00202 {
00203   GOBJDEBUGCODE
00204   glRasterPos3f(x.x,x.y,x.z);
00205   uintc kmax = name.size();
00206 
00207   for (uint k=0; k<kmax; ++k)
00208     glutBitmapCharacter(font, name[k]);
00209 }


Member Data Documentation

A pointer to an OpenGL font that the string is written in.

Definition at line 782 of file graphmisc.h.

Referenced by draw().

The string being displayed.

Definition at line 776 of file graphmisc.h.

Referenced by draw().

The position in 3D space.

Definition at line 779 of file graphmisc.h.


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:01 2011 for Chelton Evans Source by  doxygen 1.5.8