00001 #ifndef _SEGMENT_H_ 00002 #define _SEGMENT_H_ 00003 00004 #include "Vector4.h" 00005 00006 class Segment 00007 { 00008 public: 00009 // constructor 00010 Segment( const Vector4& p0, const Vector4& p1 ); 00011 00012 // distance between point and this segment 00013 double Distance( const Vector4& p ) const; 00014 double DistanceSquared( const Vector4& p ) const; 00015 00016 // distance between segment and another segment 00017 double Distance( const Segment& s ) const; 00018 double DistanceSquared( const Segment& s ) const; 00019 00020 Vector4 p0; 00021 Vector4 p1; 00022 private: 00023 }; 00024 00025 #endif