00001 // Magic Software, Inc. 00002 // http://www.magic-software.com 00003 // Copyright (c) 2000, All Rights Reserved 00004 // 00005 // Source code from Magic Software is supplied under the terms of a license 00006 // agreement and may not be copied or disclosed except in accordance with the 00007 // terms of that agreement. The various license agreements may be found at 00008 // the Magic Software web site. This file is subject to the license 00009 // 00010 // FREE SOURCE CODE 00011 // http://www.magic-software.com/License.html/free.pdf 00012 00013 #ifndef MGCCYLINDER_H 00014 #define MGCCYLINDER_H 00015 00016 #include "MgcSegment3.h" 00017 00018 00019 class MgcCylinder 00020 { 00021 public: 00022 // Cylinder line segment has end points C-(H/2)*D and C+(H/2)*D where 00023 // D is a unit-length vector. H is infinity for infinite cylinder. 00024 00025 MgcCylinder (); 00026 00027 MgcVector3& Center (); 00028 const MgcVector3& Center () const; 00029 00030 MgcVector3& Direction (); 00031 const MgcVector3& Direction () const; 00032 00033 MgcReal& Height (); 00034 const MgcReal& Height () const; 00035 00036 MgcReal& Radius (); 00037 const MgcReal& Radius () const; 00038 00039 MgcSegment3 GetSegment () const; 00040 00041 protected: 00042 MgcVector3 m_kCenter; 00043 MgcVector3 m_kDirection; 00044 MgcReal m_fHeight; 00045 MgcReal m_fRadius; 00046 }; 00047 00048 #include "MgcCylinder.inl" 00049 00050 #endif