00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef CEYLAN_TRIPOINT_H_
00028 #define CEYLAN_TRIPOINT_H_
00029
00030
00031 #include "CeylanPoint.h"
00032 #include "CeylanLinear.h"
00033
00034
00035 #include <string>
00036
00037
00038
00039 namespace Ceylan
00040 {
00041
00042
00043 namespace Maths
00044 {
00045
00046
00047 namespace Linear
00048 {
00049
00050
00051
00052
00053 class Vector3 ;
00054
00055
00056
00057 class Matrix3 ;
00058
00059
00060
00072 class CEYLAN_DLL Tripoint : public Point
00073 {
00074
00075
00076
00077
00078
00080 friend class Vector3 ;
00081
00082
00084 friend class Matrix3 ;
00085
00086
00087
00098 CEYLAN_DLL friend bool operator == ( const Tripoint & t1,
00099 const Tripoint & t2 ) ;
00100
00101
00102
00107 CEYLAN_DLL friend bool operator != ( const Tripoint & t1,
00108 const Tripoint & t2 ) ;
00109
00110
00111
00117 CEYLAN_DLL friend Tripoint operator + ( const Tripoint & t,
00118 const Vector3 & v ) ;
00119
00120
00121
00127 CEYLAN_DLL friend Tripoint operator - ( const Tripoint & t,
00128 const Vector3 & v ) ;
00129
00130
00131
00137 CEYLAN_DLL friend Vector3 vectorize( const Tripoint & t ) ;
00138
00139
00140
00146 CEYLAN_DLL friend Vector3 vectorize( const Tripoint & t1,
00147 const Tripoint & t2 ) ;
00148
00149
00150
00151
00152 public:
00153
00154
00162 explicit Tripoint( Real x0 = 0, Real x1 = 0, Real x2 = 0 ) ;
00163
00164
00165
00167 virtual ~Tripoint() throw() ;
00168
00169
00170
00172 virtual void setTo( Real x0, Real x1, Real x2 ) ;
00173
00174
00175
00181 virtual void setAllElementsTo( Real commonValue ) ;
00182
00183
00184
00193 virtual Real getElementAt( MatrixIndex index ) const ;
00194
00195
00196
00205 virtual void setElementAt( MatrixIndex index,
00206 Real newValue ) ;
00207
00208
00209
00222 virtual const std::string toString(
00223 VerbosityLevels level = high ) const ;
00224
00225
00226
00231 static const MatrixIndex Dimensions = 3 ;
00232
00233
00234
00235 protected:
00236
00237
00239 Real _coordinates[ Dimensions ] ;
00240
00241
00242
00243 } ;
00244
00245
00246 }
00247
00248 }
00249
00250 }
00251
00252
00253
00254 #endif // CEYLAN_TRIPOINT_H_
00255