infovis
D:/VC++/Info. Vis/infovis/infovis/GeoShape.h
00001 #ifndef GEOSHAPE_H
00002 #define GEOSHAPE_H
00003 
00004 #include "utils.h"
00005 
00006 using namespace std;
00007 
00008 class GeoShape
00009 {
00010 public:
00011     enum Type
00012     {
00013       CIRCLE,
00014       TRIANGLE,
00015       QUAD
00016     };
00017 
00018         /* Puclic members for direct access */
00019     float mX;           // x coordinate for the geometry center
00020         float mY;           // y coordinate for the geometry center
00021         float mRadius;      // radius of each object: the biggest distance from the center to the out range
00022         Vertex* mVertices;  // vertex array of this object
00023         int mNumVertices;   // number of vertices for this object
00024 
00025         GeoShape(){}
00026 
00027     GeoShape( Type type,float x,float y, float radius) 
00028         { 
00029                 mType = type; 
00030                 
00031                 mX = x;
00032                 mY = y;
00033                 mRadius = radius; 
00034         }
00035 
00036     ~GeoShape( void ) {}
00037 
00038         Type GetType( void ) { return mType; }
00039         complexD getComplexCoords() { return complexD(mX, mY); }
00040  
00041 private:
00042     Type mType;
00043         
00044 };
00045 
00046  #endif
 All Classes Functions