00001 // rdLine.h 00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 // Copyright 2002 Realistic Dynamics, Inc. 00004 // All rights reserved. 00005 // 00006 // Please do not read, copy, distribute, or use without permission. 00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com 00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00009 #ifndef __rdLine_h__ 00010 #define __rdLine_h__ 00011 00012 // INCLUDES 00013 #include "rdTools.h" 00014 #include "rdObject.h" 00015 00016 //============================================================================= 00017 //============================================================================= 00021 class RDTOOLS_API rdLine : public rdObject 00022 { 00023 //============================================================================= 00024 // DATA 00025 //============================================================================= 00026 private: 00028 double _point[3]; 00030 double _direction[3]; 00031 00032 //============================================================================= 00033 // METHODS 00034 //============================================================================= 00035 public: 00036 //-------------------------------------------------------------------------- 00037 // CONSTRUCTION 00038 //-------------------------------------------------------------------------- 00039 rdLine(double aP0X,double aP0Y,double aP0Z, 00040 double aP2X,double aP2Y,double aP2Z); 00041 rdLine(double aPX,double aPY,double aPZ,const double aDirection[3]); 00042 virtual ~rdLine(); 00043 private: 00044 void setNull(); 00045 00046 //-------------------------------------------------------------------------- 00047 // GET AND SET 00048 //-------------------------------------------------------------------------- 00049 public: 00050 void setPoint(double aPX,double aPY,double aPZ); 00051 void getPoint(double rPoint[3]) const; 00052 void setDirection(const double aDirection[3]); 00053 void getDirection(double rDirection[3]) const; 00054 00055 //-------------------------------------------------------------------------- 00056 // ANALYTIC GEOMETRY 00057 //-------------------------------------------------------------------------- 00058 void evaluate(double aDistance,double rLineValue[3]) const; 00059 00060 //============================================================================= 00061 }; // END class rdLine 00062 //============================================================================= 00063 //============================================================================= 00064 00065 #endif // __rdLine_h__
1.3