Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

circ.h

Go to the documentation of this file.
00001 /*
00002 ** ---------------------------------------------------------------
00003 ** circ.h  -  Circle primitive class definition.
00004 **
00005 ** ---------------------------------------------------------------
00006 */
00007 
00008 #ifndef _CIRC_H
00009 #define _CIRC_H
00010 
00036 /*
00037 ** ---------------------------------------------------------------
00038 ** Used global definitions:
00039 **
00040 */
00041 #include <stdio.h>  /* FILE */
00042 #include "prm.h"
00043 
00044 class Circ : public Prm
00045 {
00046 
00047  protected:
00048 /*
00049 ** ---------------------------------------------------------------
00050 ** Protected constants:
00051 */
00054   static const int CIRC_SEGS;
00055 
00058   static const double M_PI;
00059 
00060 /*
00061 ** ---------------------------------------------------------------
00062 ** Protected object private attributes:
00063 **
00064 */
00067   Coord c;
00068 
00071   double r;
00072 
00073  public:
00074 /*
00075 ** ---------------------------------------------------------------
00076 ** Public constructor and destructor functions:
00077 **
00078 */
00079 /* --------------------------------------------------------------- */
00087   Circ( );
00088 
00089 /* --------------------------------------------------------------- */
00101   Circ( int back );
00102 
00103 /* --------------------------------------------------------------- */
00112   virtual ~Circ( );
00113 
00114  protected:
00115 /*
00116 ** ---------------------------------------------------------------
00117 ** Protected instance (object) functions:
00118 **
00119 */
00120 /* --------------------------------------------------------------- */
00125   void GetLateralNormal( Coord* p, Coord* normal );
00126 
00127  public:
00128 /*
00129 ** ---------------------------------------------------------------
00130 ** Public instance (object) functions
00131 ** (implemented in the derived class):
00132 **
00133 */
00134 /* --------------------------------------------------------------- */
00142   void Read( FILE* fd );
00143 
00144 /* --------------------------------------------------------------- */
00151   void Write( FILE* fd );
00152 
00153 /* --------------------------------------------------------------- */
00178   int GetNPts( void );
00179 
00180 /* --------------------------------------------------------------- */
00190   void SetCoords( int id, double x, double y );
00191 
00192 /* --------------------------------------------------------------- */
00206   void GetCoords( int id, double* x, double* y );
00207 
00208 /* --------------------------------------------------------------- */
00220   void Set1stPt( double x, double y );
00221 
00222 /* --------------------------------------------------------------- */
00236   void Set2ndPt( double x, double y );
00237 
00238 /* --------------------------------------------------------------- */
00251   int PickArea( double x, double y );
00252 
00253 /* --------------------------------------------------------------- */
00283   int PickVertex( double x, double y, double tol, int* id );
00284 
00285 /* --------------------------------------------------------------- */
00293   int PickSide( double x, double y, double tol, int* id );
00294 
00295 /* --------------------------------------------------------------- */
00303   void Translate( double dx, double dy );
00304 
00305 /* --------------------------------------------------------------- */
00337   void TranslateVertex( int id, double dx, double dy );
00338 
00339 /* --------------------------------------------------------------- */
00344   void TranslateSide( int id, double dx, double dy );
00345 
00346 /* --------------------------------------------------------------- */
00357   void GetBox( double* xmin, double* xmax, double* ymin, double* ymax );
00358 
00359 /* --------------------------------------------------------------- */
00384   void DisplayBoundary( void );
00385 
00386 /* --------------------------------------------------------------- */
00398   void DisplayInterior( void );
00399 
00400 /* --------------------------------------------------------------- */
00413   void DisplaySolid( void );
00414 
00415 /* --------------------------------------------------------------- */
00428   void HighltSolid( void );
00429 
00430 /* --------------------------------------------------------------- */
00441   void DisplayZbuffer( void );
00442 
00443 };
00444 
00447 #endif

Generated on Mon Jun 21 12:45:12 2010 for Trab4 by  doxygen 1.4.2-20050421