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 MGCLINE3_H 00014 #define MGCLINE3_H 00015 00016 #include "MgcVector3.h" 00017 00018 00019 class MgcLine3 00020 { 00021 public: 00022 // Line is L(t) = b+t*m for any MgcReal-valued t 00023 // Ray has constraint t >= 0, b is the origin of the ray 00024 // Line segment has constraint 0 <= t <= 1, b and b+m are end points 00025 00026 MgcLine3 (); 00027 00028 MgcVector3& Origin (); 00029 const MgcVector3& Origin () const; 00030 00031 MgcVector3& Direction (); 00032 const MgcVector3& Direction () const; 00033 00034 protected: 00035 MgcVector3 m_kOrigin; 00036 MgcVector3 m_kDirection; 00037 }; 00038 00039 #include "MgcLine3.inl" 00040 00041 #endif