MarSTDv2004: CSphere.h Source File

MarSTDv2004

CSphere.h

Go to the documentation of this file.
00001 #ifndef __cSPHERE_h__
00002 #define __cSPHERE_h__
00003 
00005 // MarSTD version 2004 - (c)2004 - Marcel Smit                      //
00006 //                                                                  //
00007 // [email protected]                                      //
00008 // [email protected]                                          //
00009 //                                                                  //
00010 // This code may not be used in a commercial product without my     //
00011 // permission. If you redistribute it, this message must remain     //
00012 // intact. If you use this code, some acknowledgement would be      //
00013 // appreciated. ;-)                                                 //
00015 
00017 
00018 
00019 
00020 #include "CVector.h"
00021 #include "CList.h"
00022 
00023 //---------------------------------------------------------------------------
00024 
00026 
00029 class CSphere
00030 {
00031 
00032     public:
00033     
00034         CSphere()
00035     {
00036                 radius = 0.0;
00037                 prev = 0;
00038                 next = 0;
00039         } 
00040         ~CSphere()
00041     {
00042                 unlink();
00043         }
00044         
00045     public:
00046  
00047     CVector position;
00048     float radius;               
00049   
00050     public:
00051     
00055         void operator=(CSphere sphere)
00056     {
00057                 position = sphere.position;
00058                 radius = sphere.radius;
00059         } 
00060         
00061     public:
00062  
00063     CSphere* prev;
00064         CSphere* next;
00065         
00066         CSphere* unlink()
00067     {
00068                 DLLIST_UNLINK_SELF();
00069                 return this;
00070         }       
00071 
00072 };
00073 
00074 //---------------------------------------------------------------------------
00075 
00076 #endif

Generated on Tue Feb 8 21:59:02 2005 for MarSTDv2004 by  doxygen 1.4.1