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 OSDL_POINT_3D_H_
00028 #define OSDL_POINT_3D_H_
00029
00030
00031 #include "OSDLPoint.h"
00032 #include "OSDLVideoTypes.h"
00033
00034 #include "Ceylan.h"
00035
00036 #include <string>
00037 #include <list>
00038
00039
00040
00041
00042 namespace OSDL
00043 {
00044
00045
00046
00047 namespace Video
00048 {
00049
00050
00051
00052 namespace TwoDimensional
00053 {
00054
00055
00056
00057
00071 class OSDL_DLL Point3D : public Point
00072 {
00073
00074
00075
00076 public:
00077
00078
00084 Point3D( Coordinate x, Coordinate y, Coordinate z ) ;
00085
00086
00087
00096 Point3D( const Point3D & source ) ;
00097
00098
00099
00108 explicit Point3D(
00109 const Ceylan::Maths::Linear::Vector3 & source ) ;
00110
00111
00112
00121 Point3D(
00122 FloatingPointCoordinate x,
00123 FloatingPointCoordinate y,
00124 FloatingPointCoordinate z ) ;
00125
00126
00127
00129 virtual ~Point3D() throw() ;
00130
00131
00132
00138 virtual void setFrom( const Point3D & source ) ;
00139
00140
00141
00150 virtual void setFrom(
00151 const Ceylan::Maths::Linear::Vector3 & source ) ;
00152
00153
00154
00156 inline Coordinate getX() const ;
00157
00158
00160 inline void setX( Coordinate newX ) ;
00161
00162
00163
00165 inline Coordinate getY() const;
00166
00167
00169 inline void setY( Coordinate newY ) ;
00170
00171
00172
00174 inline Coordinate getZ() const;
00175
00176
00178 inline void setZ( Coordinate newY ) ;
00179
00180
00181
00188 void translate( Offset x, Offset y, Offset z ) ;
00189
00190
00191
00193 virtual void flip() ;
00194
00195
00196
00198 void flipX() ;
00199
00200
00202 void flipY() ;
00203
00204
00206 void flipZ() ;
00207
00208
00209
00222 virtual const std::string toString(
00223 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00224
00225
00226
00227
00228
00229
00230
00231
00232
00234 static const Point3D Origin ;
00235
00236
00237
00244 static void Translate( std::list<Point3D *> & pointList,
00245 Offset x, Offset y, Offset z ) ;
00246
00247
00248
00254 static const Ceylan::Maths::Linear::MatrixIndex Dimensions
00255 = 3 ;
00256
00257
00258
00259
00260 protected:
00261
00262
00263
00269 Coordinate _coord[ Dimensions ] ;
00270
00271
00272
00273 } ;
00274
00275
00276
00277
00278
00279
00280
00281
00282 Coordinate Point3D::getX() const
00283 {
00284
00285 return _coord[0] ;
00286
00287 }
00288
00289
00290
00291 void Point3D::setX( Coordinate newX )
00292 {
00293
00294 _coord[0] = newX ;
00295
00296 }
00297
00298
00299
00300
00301 Coordinate Point3D::getY() const
00302 {
00303
00304 return _coord[1] ;
00305
00306 }
00307
00308
00309
00310 void Point3D::setY( Coordinate newY )
00311 {
00312 _coord[1] = newY ;
00313 }
00314
00315
00316
00317
00318 Coordinate Point3D::getZ() const
00319 {
00320
00321 return _coord[2] ;
00322
00323 }
00324
00325
00326
00327 void Point3D::setZ( Coordinate newZ )
00328 {
00329
00330 _coord[2] = newZ ;
00331
00332 }
00333
00334
00335
00336 }
00337
00338 }
00339
00340 }
00341
00342
00343
00345 OSDL_DLL std::ostream & operator << ( std::ostream & os,
00346 const OSDL::Video::TwoDimensional::Point3D & p ) ;
00347
00348
00349
00350 #endif // OSDL_POINT_3D_H_
00351