proj home

Files   Classes   Functions   Hierarchy  

gobjMyTranslateDraw Class Reference

Save the coordinate system, translate, draw, restore. More...

#include <graphmisc.h>

Inheritance diagram for gobjMyTranslateDraw:
Collaboration diagram for gobjMyTranslateDraw:

List of all members.

Public Member Functions

 gobjMyTranslateDraw (gobj *target_, boolc clean_, point3< double > const &shift_)
 Own the target if clean is set to true.
 ~gobjMyTranslateDraw ()
void draw ()
 Draw the object.

Public Attributes

gobjtarget
bool clean
point3< double > shift


Detailed Description

Save the coordinate system, translate, draw, restore.

Definition at line 435 of file graphmisc.h.


Constructor & Destructor Documentation

gobjMyTranslateDraw::gobjMyTranslateDraw ( gobj target_,
boolc  clean_,
point3< double > const &  shift_ 
) [inline]

Own the target if clean is set to true.

Definition at line 447 of file graphmisc.h.

00452     : target(target_), clean(clean_), shift(shift_) {}

gobjMyTranslateDraw::~gobjMyTranslateDraw (  )  [inline]

Definition at line 454 of file graphmisc.h.

References clean, and target.

00455     { if (clean) delete target; }


Member Function Documentation

void gobjMyTranslateDraw::draw (  )  [inline, virtual]

Draw the object.

Implements gobj.

Definition at line 458 of file graphmisc.h.

References gobj::draw(), GOBJDEBUGCODE, shift, target, point3< T >::x, point3< T >::y, and point3< T >::z.

00459   {
00460     GOBJDEBUGCODE
00461     assert(target!=0);
00462 
00463     glPushMatrix();
00464     glTranslatef(shift.x,shift.y,shift.z);
00465     target->draw();
00466     glPopMatrix();
00467   }


Member Data Documentation

Definition at line 441 of file graphmisc.h.

Referenced by ~gobjMyTranslateDraw().

Definition at line 443 of file graphmisc.h.

Referenced by draw().

Definition at line 440 of file graphmisc.h.

Referenced by draw(), and ~gobjMyTranslateDraw().


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

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