![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: circle.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 ******************************************************************************/ 00008 #ifndef circle_H_ 00009 #define circle_H_ 00010 00011 #include "geometry/geometryDefines.h" 00012 #include "geometry/point.h" 00013 00014 // 00015 // \file circle.h 00016 // \brief This file contains the DtCircle class declaration. 00017 // 00018 00019 // 00020 // The DtCircle class represents a simple mathematical circle. 00021 // \note The z component of the center point is \b always zero. 00022 class DT_DLL_geometry DtCircle 00023 { 00024 public: 00025 DtCircle(DtPoint newCenter, double newRadius); 00026 00027 virtual ~DtCircle(); 00028 00029 // This class is copyable and assignable. Because the implementations are so 00030 // simple, the compiler generated ones are sufficient. 00031 // DtCircle(const DtCircle& original); 00032 // const DtCircle& operator=(const DtCircle& original); 00033 00034 double radius() const; 00035 bool setRadius(double newRadius); 00036 00037 DtPoint center() const; 00038 void setCenter(DtPoint& newCenter); 00039 00040 protected: 00041 00042 bool testInvariant() const; 00043 00044 private: 00045 00046 double myRadius; 00047 DtPoint myCenter; 00048 }; 00049 00050 #endif