00001 #ifndef OSDL_POINT_3D_H_
00002 #define OSDL_POINT_3D_H_
00003
00004
00005 #include "OSDLPoint.h"
00006 #include "OSDLVideoTypes.h"
00007
00008 #include "Ceylan.h"
00009
00010 #include <string>
00011 #include <list>
00012
00013
00014
00015
00016 namespace OSDL
00017 {
00018
00019
00020 namespace Video
00021 {
00022
00023
00024 namespace TwoDimensional
00025 {
00026
00027
00028
00042 class OSDL_DLL Point3D : public Point
00043 {
00044
00045
00046
00047 public:
00048
00049
00055 Point3D( Coordinate x, Coordinate y, Coordinate z )
00056 throw() ;
00057
00058
00067 Point3D( const Point3D & source ) throw() ;
00068
00069
00078 explicit Point3D(
00079 const Ceylan::Maths::Linear::Vector3 & source )
00080 throw() ;
00081
00082
00091 Point3D(
00092 FloatingPointCoordinate x,
00093 FloatingPointCoordinate y,
00094 FloatingPointCoordinate z ) throw() ;
00095
00096
00098 virtual ~Point3D() throw() ;
00099
00100
00106 virtual void setFrom( const Point3D & source ) throw() ;
00107
00108
00117 virtual void setFrom(
00118 const Ceylan::Maths::Linear::Vector3 & source )
00119 throw() ;
00120
00121
00123 inline Coordinate getX() const throw() ;
00124
00126 inline void setX( Coordinate newX ) throw() ;
00127
00128
00130 inline Coordinate getY() const throw();
00131
00133 inline void setY( Coordinate newY ) throw() ;
00134
00135
00137 inline Coordinate getZ() const throw();
00138
00140 inline void setZ( Coordinate newY ) throw() ;
00141
00142
00149 void translate( Offset x, Offset y, Offset z ) throw() ;
00150
00151
00153 virtual void flip() throw() ;
00154
00155
00157 void flipX() throw() ;
00158
00160 void flipY() throw() ;
00161
00163 void flipZ() throw() ;
00164
00165
00178 virtual const std::string toString(
00179 Ceylan::VerbosityLevels level = Ceylan::high )
00180 const throw() ;
00181
00182
00183
00184
00185
00186
00187
00188
00190 static const Point3D Origin ;
00191
00192
00199 static void Translate( std::list<Point3D *> & pointList,
00200 Offset x, Offset y, Offset z ) throw() ;
00201
00202
00208 static const Ceylan::Maths::Linear::MatrixIndex Dimensions
00209 = 3 ;
00210
00211
00212
00213 protected:
00214
00215
00221 Coordinate _coord[ Dimensions ] ;
00222
00223
00224 } ;
00225
00226
00227
00228
00229
00230
00231 Coordinate Point3D::getX() const throw()
00232 {
00233
00234 return _coord[0] ;
00235
00236 }
00237
00238
00239 void Point3D::setX( Coordinate newX ) throw()
00240 {
00241
00242 _coord[0] = newX ;
00243
00244 }
00245
00246
00247
00248 Coordinate Point3D::getY() const throw()
00249 {
00250
00251 return _coord[1] ;
00252
00253 }
00254
00255
00256 void Point3D::setY( Coordinate newY ) throw()
00257 {
00258 _coord[1] = newY ;
00259 }
00260
00261
00262
00263 Coordinate Point3D::getZ() const throw()
00264 {
00265
00266 return _coord[2] ;
00267
00268 }
00269
00270
00271 void Point3D::setZ( Coordinate newZ ) throw()
00272 {
00273
00274 _coord[2] = newZ ;
00275
00276 }
00277
00278
00279 }
00280
00281 }
00282
00283 }
00284
00285
00287 OSDL_DLL std::ostream & operator << ( std::ostream & os,
00288 const OSDL::Video::TwoDimensional::Point3D & p ) throw() ;
00289
00290
00291 #endif // OSDL_POINT_3D_H_
00292