OSGVector.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2003 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038
00039 #ifndef _OSGVECTOR_H_
00040 #define _OSGVECTOR_H_
00041 #ifdef __sgi
00042 #pragma once
00043 #endif
00044 
00045 #include "OSGBaseTypes.h"
00046 #include "OSGBaseFunctions.h"
00047
00048 #include <iostream>
00049
00050 OSG_BEGIN_NAMESPACE
00051
00052 template<class ValueTypeT, UInt32 SizeI>
00053 class Point;
00054
00055 template<class ValueTypeT, UInt32 SizeI>
00056 class Vector;
00057
00058
00059 #ifdef __sgi
00060 #pragma set woff 1209
00061 #endif
00062 
00063 //---------------------------------------------------------------------------
00064 //  Class
00065 //---------------------------------------------------------------------------
00066
00074 template <class ValueTypeT>
00075 class VecStorage1
00076 {
00077     /*==========================  PUBLIC  =================================*/
00078
00079   public:
00080
00081     static const UInt32 _uiSize = 1;
00082
00083     /*---------------------------------------------------------------------*/
00087     VecStorage1(void);
00088
00090     /*---------------------------------------------------------------------*/
00094     ~VecStorage1(void);
00095
00097     /*---------------------------------------------------------------------*/
00101     void       setValues        (const ValueTypeT  rVal1);
00102
00103     void       getSeparateValues(      ValueTypeT &rVal1) const;
00104
00105     ValueTypeT x                (void                   ) const;
00106
00108     /*=========================  PROTECTED  ===============================*/
00109
00110   protected:
00111
00112     ValueTypeT _values[_uiSize];
00113
00114     /*==========================  PRIVATE  ================================*/
00115
00116   private:
00117
00119     VecStorage1(const VecStorage1 &source);
00121     void operator =(const VecStorage1 &source);
00122 };
00123
00124
00125 //---------------------------------------------------------------------------
00126 //  Class
00127 //---------------------------------------------------------------------------
00128
00136 template <class ValueTypeT>
00137 class VecStorage2
00138 {
00139     /*==========================  PUBLIC  =================================*/
00140
00141   public:
00142
00143     static const UInt32 _uiSize = 2;
00144
00145     /*---------------------------------------------------------------------*/
00149     VecStorage2(void);
00150
00152     /*---------------------------------------------------------------------*/
00156     ~VecStorage2(void);
00157
00159     /*---------------------------------------------------------------------*/
00163     void       setValues        (const ValueTypeT  rVal1,
00164                                  const ValueTypeT  rVal2);
00165
00166     void       getSeparateValues(      ValueTypeT &rVal1,
00167                                        ValueTypeT &rVal2) const;
00168
00169     ValueTypeT x                (void                   ) const;
00170     ValueTypeT y                (void                   ) const;
00171
00173     /*=========================  PROTECTED  ===============================*/
00174
00175   protected:
00176
00177     ValueTypeT _values[_uiSize];
00178
00179     /*==========================  PRIVATE  ================================*/
00180
00181   private:
00182
00184     VecStorage2(const VecStorage2 &source);
00186     void operator =(const VecStorage2 &source);
00187 };
00188
00189
00190
00191
00192 //---------------------------------------------------------------------------
00193 //  Class
00194 //---------------------------------------------------------------------------
00195
00203 template <class ValueTypeT>
00204 class VecStorage3
00205 {
00206     /*==========================  PUBLIC  =================================*/
00207
00208   public:
00209
00210     static const UInt32 _uiSize = 3;
00211
00212     /*---------------------------------------------------------------------*/
00216     VecStorage3(void);
00217
00219     /*---------------------------------------------------------------------*/
00223     ~VecStorage3(void);
00224
00226     /*---------------------------------------------------------------------*/
00230     void       setValues        (const ValueTypeT  rVal1,
00231                                  const ValueTypeT  rVal2,
00232                                  const ValueTypeT  rVal3);
00233
00234     void       getSeparateValues(      ValueTypeT &rVal1,
00235                                        ValueTypeT &rVal2,
00236                                        ValueTypeT &rVal3) const;
00237
00238     ValueTypeT x                (void                   ) const;
00239     ValueTypeT y                (void                   ) const;
00240     ValueTypeT z                (void                   ) const;
00241
00243     /*=========================  PROTECTED  ===============================*/
00244
00245   protected:
00246
00247     ValueTypeT _values[_uiSize];
00248
00249     /*==========================  PRIVATE  ================================*/
00250
00251   private:
00252
00254     VecStorage3(const VecStorage3 &source);
00256     void operator =(const VecStorage3 &source);
00257 };
00258
00259
00260
00261
00262 //---------------------------------------------------------------------------
00263 //  Class
00264 //---------------------------------------------------------------------------
00265
00273 template <class ValueTypeT>
00274 class VecStorage4
00275 {
00276     /*==========================  PUBLIC  =================================*/
00277
00278   public:
00279
00280     static const UInt32 _uiSize = 4;
00281
00282     /*---------------------------------------------------------------------*/
00286     VecStorage4(void);
00287
00289     /*---------------------------------------------------------------------*/
00293     ~VecStorage4(void);
00294
00296     /*---------------------------------------------------------------------*/
00300     void       setValues        (const ValueTypeT  rVal1,
00301                                  const ValueTypeT  rVal2,
00302                                  const ValueTypeT  rVal3,
00303                                  const ValueTypeT  rVal4);
00304
00305     void       getSeparateValues(      ValueTypeT &rVal1,
00306                                        ValueTypeT &rVal2,
00307                                        ValueTypeT &rVal3,
00308                                        ValueTypeT &rVal4) const;
00309
00310     ValueTypeT x                (void                   ) const;
00311     ValueTypeT y                (void                   ) const;
00312     ValueTypeT z                (void                   ) const;
00313     ValueTypeT w                (void                   ) const;
00314
00316     /*=========================  PROTECTED  ===============================*/
00317
00318   protected:
00319
00320     ValueTypeT _values[_uiSize];
00321
00322     /*==========================  PRIVATE  ================================*/
00323
00324   private:
00325
00327     VecStorage4(const VecStorage4 &source);
00329     void operator =(const VecStorage4 &source);
00330 };
00331
00332
00335 template <class ValueTypeT, UInt32 SizeI>
00336 struct SelectVecStorage;
00337
00338 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00339 template <class ValueTypeT>
00340 struct SelectVecStorage<ValueTypeT, 1> : public VecStorage1<ValueTypeT>
00341 {
00342 };
00343
00344 template <class ValueTypeT>
00345 struct SelectVecStorage<ValueTypeT, 2> : public VecStorage2<ValueTypeT>
00346 {
00347 };
00348
00349 template <class ValueTypeT>
00350 struct SelectVecStorage<ValueTypeT, 3> : public VecStorage3<ValueTypeT>
00351 {
00352 };
00353
00354 template <class ValueTypeT>
00355 struct SelectVecStorage<ValueTypeT, 4> : public VecStorage4<ValueTypeT>
00356 {
00357 };
00358 #endif
00359 
00360 //---------------------------------------------------------------------------
00361 //  Class
00362 //---------------------------------------------------------------------------
00363
00371 #ifdef __sgi
00372 #pragma set woff 1375
00373 #endif
00374 
00375 template <class ValueTypeT, UInt32 SizeI>
00376 class Point : public SelectVecStorage<ValueTypeT, SizeI>
00377 {
00378     /*==========================  PUBLIC  =================================*/
00379
00380   public:
00381
00382     typedef          SelectVecStorage<ValueTypeT,
00383                                       SizeI      >          Inherited;
00384     typedef          Point           <ValueTypeT,
00385                                       SizeI      >          Self;
00386     typedef          SelectVecStorage<ValueTypeT,
00387                                       SizeI      >          StorageInterface;
00388
00389     typedef          ValueTypeT                             ValueType;
00390     typedef typename TypeTraits<ValueTypeT>::RealReturnType RealReturnType;
00391
00392     typedef          Point           <ValueTypeT,
00393                                       SizeI      >          PointType;
00394     typedef          Vector          <ValueTypeT,
00395                                       SizeI      >          VectorType;
00396
00397
00398     static  const    Point                                  Null;
00399
00400     /*---------------------------------------------------------------------*/
00404              Point(      void                               );
00405
00406     explicit Point(const ValueType                   *pVals );
00407     explicit Point(      ValueType                   *pVals );
00408
00409     template <class ValueType2T, UInt32 Size2I>
00410     explicit Point(const Point <ValueType2T, Size2I> &pnt   );
00411
00412     template <class ValueType2T, UInt32 Size2I>
00413     explicit Point(const Vector<ValueType2T, Size2I> &vec   );
00414
00415              Point(const Point                       &source);
00416
00417     /* Found so far no way to move these constructors to the memory
00418        interface :-(. I still find them a little bit wrong placed (GV)
00419     */
00420
00421     Point(const ValueType rVal1                        );
00422
00423     Point(const ValueType rVal1, const ValueType rVal2 );
00424
00425     Point(const ValueType rVal1, const ValueType rVal2,
00426           const ValueType rVal3                        );
00427
00428     Point(const ValueType rVal1, const ValueType rVal2,
00429           const ValueType rVal3, const ValueType rVal4 );
00430
00432     /*---------------------------------------------------------------------*/
00436     ~Point(void);
00437
00439     /*---------------------------------------------------------------------*/
00443     void setNull (void);
00444
00445     template <class ValueType2T, UInt32 Size2I>
00446     void setValue           (const Point<ValueType2T,
00447                                          Size2I      > &pnt     );
00448
00449     void setValue           (const Point               &pnt     );
00450
00451     void setValue           (const ValueType           *pVals   );
00452     void setValue           (      ValueType           *pVals   );
00453
00454     void setValueFromCString(const Char8               *szString);
00455     void setValueFromCString(      Char8               *szString);
00456
00457 #ifndef OSG_DISABLE_DEPRECATED
00458     void setValue           (const Char8               *szString);
00459     void setValue           (      Char8               *szString);
00460 #endif
00461 
00463     /*---------------------------------------------------------------------*/
00467           ValueType *getValues(void);
00468     const ValueType *getValues(void) const;
00469
00471     /*---------------------------------------------------------------------*/
00475           bool            isZero  (      void                     ) const;
00476
00477           void            negate  (      void                     );
00478
00479           bool            equals  (const Point      &pnt,
00480                                    const ValueType       tolerance) const;
00481
00482           VectorType     &subZero (      void                     );
00483     const VectorType     &subZero (      void                     ) const;
00484
00485           RealReturnType  dist    (const Point &pnt      ) const;
00486           RealReturnType  dist2   (const Point &pnt      ) const;
00487
00488           RealReturnType  maxValue(      void                     ) const;
00489
00491     /*---------------------------------------------------------------------*/
00495     void       operator *=(const ValueType   val);
00496     void       operator /=(const ValueType   val);
00497
00498     VectorType operator - (const Point      &pnt) const;
00499
00500     Point      operator + (const VectorType &vec) const;
00501
00502     Point      operator - (const VectorType &vec) const;
00503
00504     Point      operator * (const ValueType   val) const;
00505
00506     Point      operator - (void                 );
00507
00508     void       operator +=(const VectorType &vec);
00509     void       operator -=(const VectorType &vec);
00510
00512     /*---------------------------------------------------------------------*/
00516            ValueType &operator[](const UInt32 uiVal);
00517     const  ValueType &operator[](const UInt32 uiVal) const;
00518
00520     /*---------------------------------------------------------------------*/
00524     Point &operator =(const Point      &source);
00525     Point &operator =(const VectorType &source);
00526
00528     /*---------------------------------------------------------------------*/
00532     bool operator <  (const Point &other)  const;
00533
00534     bool operator == (const Point &other) const;
00535     bool operator != (const Point &other) const;
00536
00538     /*=========================  PROTECTED  ===============================*/
00539
00540   protected:
00541
00542     /*==========================  PRIVATE  ================================*/
00543
00544   private:
00545 };
00546
00549 template <class  ValueTypeT,
00550           UInt32 SizeI      > inline
00551 Point<ValueTypeT, SizeI>
00552     operator *(const ValueTypeT                val,
00553                const Point<ValueTypeT, SizeI> &pnt );
00554
00557 template <class  ValueTypeT,
00558           UInt32 SizeI      > OSG_BASE_DLLMAPPING
00559 std::ostream &operator <<(
00560           std::ostream             &os,
00561     const Point<ValueTypeT, SizeI> &pnt);
00562
00565 template <class  ValueTypeT,
00566           UInt32 SizeI      > OSG_BASE_DLLMAPPING
00567 std::istream &operator >>(
00568     std::istream             &is,
00569     Point<ValueTypeT, SizeI> &pnt);
00570
00571 //---------------------------------------------------------------------------
00572 //  Class
00573 //---------------------------------------------------------------------------
00574
00582 template <class ValueTypeT, UInt32 SizeI>
00583 class Vector : public Point<ValueTypeT, SizeI>
00584 {
00585     /*==========================  PUBLIC  =================================*/
00586
00587   public:
00588
00589     typedef          Point <ValueTypeT, SizeI>              Inherited;
00590     typedef          Vector<ValueTypeT, SizeI>              Self;
00591
00592     typedef          ValueTypeT                             ValueType;
00593     typedef typename TypeTraits<ValueTypeT>::RealReturnType RealReturnType;
00594
00595     typedef typename Inherited::PointType                   PointType;
00596     typedef typename Inherited::VectorType                  VectorType;
00597
00598
00599     static  const    Vector                                 Null;
00600
00601     /*---------------------------------------------------------------------*/
00605              Vector(      void                   );
00606
00607     explicit Vector(const ValueTypeT      *pVals );
00608     explicit Vector(      ValueTypeT      *pVals );
00609
00610     template <class ValueType2T, UInt32 Size2I>
00611     explicit Vector(const Point <ValueType2T, Size2I> &pnt);
00612
00613     template <class ValueType2T, UInt32 Size2I>
00614     explicit Vector(const Vector<ValueType2T, Size2I> &vec);
00615
00616     Vector(const Vector &source);
00617
00618     /* Found so far no way to move these constructors to the memory
00619        interface :-(. I still find them a little bit wrong placed (GV)
00620     */
00621
00622     Vector(const ValueType rVal1                        );
00623
00624     Vector(const ValueType rVal1, const ValueType rVal2 );
00625
00626     Vector(const ValueType rVal1, const ValueType rVal2,
00627            const ValueType rVal3                        );
00628
00629     Vector(const ValueType rVal1, const ValueType rVal2,
00630            const ValueType rVal3, const ValueType rVal4 );
00631
00633     /*---------------------------------------------------------------------*/
00637     ~Vector(void);
00638
00640     /*---------------------------------------------------------------------*/
00644     RealReturnType length       (      void            ) const;
00645     RealReturnType squareLength (      void            ) const;
00646
00647     void           normalize    (      void            );
00648
00649     Vector         cross        (const Vector    &vec  ) const;
00650     Vector         operator %   (const Vector    &vec  ) const;
00651
00652     void           crossThis    (const Vector    &vec  );
00653
00654     ValueType      dot          (const Vector    &vec  ) const;
00655     ValueType      operator *   (const Vector    &vec  ) const;
00656     ValueType      dot          (const PointType &pnt  ) const;
00657     ValueType      operator *   (const PointType &pnt  ) const;
00658
00659     RealReturnType enclosedAngle(const Vector    &vec  ) const;
00660
00661     RealReturnType projectTo    (const Vector    &toVec);
00662
00664     /*---------------------------------------------------------------------*/
00668           PointType &addToZero (void);
00669     const PointType &addToZero (void) const;
00670
00671           Vector    &subZero   (void);
00672     const Vector    &subZero   (void) const;
00673
00675     /*---------------------------------------------------------------------*/
00679     Vector operator - (const Vector    &vec) const;
00680     Vector operator + (const Vector    &vec) const;
00681
00682     Vector operator * (const ValueType  val) const;
00683
00684     Vector operator - (      void          ) const;
00685
00687     /*---------------------------------------------------------------------*/
00691     Vector &operator =(const Vector &source);
00692
00694     /*---------------------------------------------------------------------*/
00698     bool operator <  (const Vector &other) const;
00699
00700     bool operator == (const Vector &other) const;
00701     bool operator != (const Vector &other) const;
00702
00704     /*=========================  PROTECTED  ===============================*/
00705
00706   protected:
00707
00708     /*==========================  PRIVATE  ================================*/
00709
00710   private:
00711 };
00712
00713 #ifdef __sgi
00714 #pragma reset woff 1375
00715 #endif
00716 
00719 template <class ValueTypeT,
00720           UInt32 SizeI     > inline
00721 Vector<ValueTypeT, SizeI>
00722     operator *(const ValueTypeT                 val,
00723                const Vector<ValueTypeT, SizeI> &vec );
00724
00727 template <class ValueTypeT,
00728           UInt32 SizeI     > OSG_BASE_DLLMAPPING
00729 std::ostream &operator <<(
00730           std::ostream              &os,
00731     const Vector<ValueTypeT, SizeI> &vec);
00732
00735 template <class  ValueTypeT,
00736           UInt32 SizeI      > OSG_BASE_DLLMAPPING
00737 std::istream &operator >>(
00738     std::istream              &is,
00739     Vector<ValueTypeT, SizeI> &vec);
00740
00741
00742 // Actual Types
00743
00744 /*---------------------------------------------------------------------*/
00753 typedef OSG::Vector< OSG::UInt8, 1> Vec1ub;
00754
00760 typedef OSG::Vec1ub *Vec1ubP;
00761
00762 #ifndef OSG_NO_INT8_PNT
00763 
00768 typedef OSG::Vector< OSG::Int8, 1 > Vec1b;
00769
00775 typedef OSG::Vec1b *Vec1bP;
00776 #endif
00777 
00783 typedef OSG::Vector< OSG::UInt16, 1 > Vec1us;
00784
00790 typedef OSG::Vec1us *Vec1usP;
00791
00797 typedef OSG::Vector< OSG::Int16, 1 > Vec1s;
00798
00804 typedef OSG::Vec1s *Vec1sP;
00805
00811 typedef OSG::Vector< OSG::Real32, 1 > Vec1f;
00812
00818 typedef OSG::Vec1f *Vec1fP;
00819
00825 typedef OSG::Vector< Fixed32, 1 > Vec1fx;
00826
00832 typedef OSG::Vec1fx *Vec1fxP;
00833
00839 typedef OSG::Vector< OSG::Real64, 1 > Vec1d;
00840
00846 typedef OSG::Vec1d *Vec1dP;
00847
00853 typedef OSG::Vector< OSG::Real128, 1 > Vec1ld;
00854
00860 typedef OSG::Vec1ld *Vec1ldP;
00861
00862
00868 typedef OSG::Vector< OSG::UInt8, 2 > Vec2ub;
00869
00875 typedef OSG::Vec2ub *Vec2ubP;
00876
00877 #ifndef OSG_NO_INT8_PNT
00878 
00883 typedef OSG::Vector< OSG::Int8, 2 > Vec2b;
00884
00890 typedef OSG::Vec2b *Vec2bP;
00891 #endif
00892 
00898 typedef OSG::Vector< OSG::UInt16, 2 > Vec2us;
00899
00905 typedef OSG::Vec2us *Vec2usP;
00906
00912 typedef OSG::Vector< OSG::Int16, 2 > Vec2s;
00913
00919 typedef OSG::Vec2s *Vec2sP;
00920
00926 typedef OSG::Vector< OSG::Int32, 2 > Vec2i;
00927
00933 typedef OSG::Vec2i *Vec2iP;
00934
00940 typedef OSG::Vector< OSG::UInt32, 2 > Vec2u;
00941
00947 typedef OSG::Vec2u *Vec2uP;
00948
00954 typedef OSG::Vector< OSG::Real32, 2 > Vec2f;
00955
00961 typedef OSG::Vec2f *Vec2fP;
00962
00969 typedef OSG::Vector< Fixed32, 2 > Vec2fx;
00970
00976 typedef OSG::Vec2fx *Vec2fxP;
00977
00983 typedef OSG::Vector< OSG::Real64, 2 > Vec2d;
00984
00990 typedef OSG::Vec2d *Vec2dP;
00991
00997 typedef OSG::Vector< OSG::Real128, 2 > Vec2ld;
00998
01004 typedef OSG::Vec2ld *Vec2ldP;
01005
01006
01012 typedef OSG::Vector< OSG::UInt8, 3 > Vec3ub;
01013
01019 typedef OSG::Vec3ub *Vec3ubP;
01020
01021 #ifndef OSG_NO_INT8_PNT
01022 
01027 typedef OSG::Vector< OSG::Int8, 3 > Vec3b;
01028
01034 typedef OSG::Vec3b *Vec3bP;
01035 #endif
01036 
01042 typedef OSG::Vector< OSG::UInt16, 3 > Vec3us;
01043
01049 typedef OSG::Vec3us *Vec3usP;
01050
01056 typedef OSG::Vector< OSG::Int16, 3 > Vec3s;
01057
01063 typedef OSG::Vec3s *Vec3sP;
01064
01070 typedef OSG::Vector < OSG::Real32, 3  > Vec3f;
01071
01077 typedef OSG::Vec3f *Vec3fP;
01078
01084 typedef OSG::Vector< Fixed32, 3 > Vec3fx;
01085
01091 typedef OSG::Vec3fx *Vec3fxP;
01092
01098 typedef OSG::Vector< OSG::Real64, 3 > Vec3d;
01099
01105 typedef OSG::Vec3d *Vec3dP;
01106
01112 typedef OSG::Vector< OSG::Real128, 3 > Vec3ld;
01113
01119 typedef OSG::Vec3ld *Vec3ldP;
01120
01121
01127 typedef OSG::Vector< OSG::UInt8, 4 > Vec4ub;
01128
01134 typedef OSG::Vec4ub *Vec4ubP;
01135
01136 #ifndef OSG_NO_INT8_PNT
01137 
01142 typedef OSG::Vector< OSG::Int8, 4 > Vec4b;
01143
01149 typedef OSG::Vec4b *Vec4bP;
01150 #endif
01151 
01157 typedef OSG::Vector< OSG::UInt16, 4 > Vec4us;
01158
01164 typedef OSG::Vec4us *Vec4usP;
01165
01171 typedef OSG::Vector< OSG::Int16, 4 > Vec4s;
01172
01178 typedef OSG::Vec4s *Vec4sP;
01179
01185 typedef OSG::Vector< OSG::Real32,  4 > Vec4f;
01186
01192 typedef OSG::Vec4f *Vec4fP;
01193
01199 typedef OSG::Vector< Fixed32, 4 > Vec4fx;
01200
01206 typedef OSG::Vec4fx *Vec4fxP;
01207
01213 typedef OSG::Vector< OSG::Real64, 4 > Vec4d;
01214
01220 typedef OSG::Vec4d *Vec4dP;
01221
01227 typedef OSG::Vector< OSG::Real128, 4 > Vec4ld;
01228
01234 typedef OSG::Vec4ld *Vec4ldP;
01235
01236
01238 /*---------------------------------------------------------------------*/
01248 typedef OSG::Point< OSG::UInt8, 1 > Pnt1ub;
01249
01255 typedef OSG::Pnt1ub *Pnt1ubP;
01256
01257 #ifndef OSG_NO_INT8_PNT
01258 
01263 typedef OSG::Point< OSG::Int8, 1 > Pnt1b;
01264
01270 typedef OSG::Pnt1b *Pnt1bP;
01271 #endif
01272 
01278 typedef OSG::Point< OSG::UInt16, 1 > Pnt1us;
01279
01285 typedef OSG::Pnt1us *Pnt1usP;
01286
01292 typedef OSG::Point< OSG::Int16, 1 > Pnt1s;
01293
01299 typedef OSG::Pnt1s *Pnt1sP;
01300
01306 typedef OSG::Point< OSG::Real32, 1 > Pnt1f;
01307
01313 typedef OSG::Pnt1f *Pnt1fP;
01314
01320 typedef OSG::Point< Fixed32, 1 > Pnt1fx;
01321
01327 typedef OSG::Pnt1fx *Pnt1fxP;
01328
01334 typedef OSG::Point< OSG::Real64, 1 > Pnt1d;
01335
01341 typedef OSG::Pnt1d *Pnt1dP;
01342
01348 typedef OSG::Point< OSG::Real128, 1 > Pnt1ld;
01349
01355 typedef OSG::Pnt1ld *Pnt1ldP;
01356
01357
01358
01364 typedef OSG::Point< OSG::UInt8, 2 > Pnt2ub;
01365
01371 typedef OSG::Pnt2ub *Pnt2ubP;
01372
01373 #ifndef OSG_NO_INT8_PNT
01374 
01379 typedef OSG::Point< OSG::Int8, 2 > Pnt2b;
01380
01386 typedef OSG::Pnt2b *Pnt2bP;
01387 #endif
01388 
01394 typedef OSG::Point< OSG::UInt16, 2 > Pnt2us;
01395
01401 typedef OSG::Pnt2us *Pnt2usP;
01402
01408 typedef OSG::Point< OSG::Int16, 2 > Pnt2s;
01409
01415 typedef OSG::Pnt2s *Pnt2sP;
01416
01422 typedef OSG::Point< OSG::Int32, 2 > Pnt2i;
01423
01429 typedef OSG::Pnt2i *Pnt2iP;
01430
01436 typedef OSG::Point< OSG::Real32,  2 > Pnt2f;
01437
01443 typedef OSG::Pnt2f *Pnt2fP;
01444
01450 typedef OSG::Point< Fixed32, 2 > Pnt2fx;
01451
01457 typedef OSG::Pnt2fx *Pnt2fxP;
01458
01464 typedef OSG::Point< OSG::Real64, 2 > Pnt2d;
01465
01471 typedef OSG::Pnt2d *Pnt2dP;
01472
01478 typedef OSG::Point< OSG::Real128, 2 > Pnt2ld;
01479
01485 typedef OSG::Pnt2ld *Pnt2ldP;
01486
01487
01493 typedef OSG::Point< OSG::UInt8, 3 > Pnt3ub;
01494
01500 typedef OSG::Pnt3ub *Pnt3ubP;
01501
01502 #ifndef OSG_NO_INT8_PNT
01503 
01508 typedef OSG::Point< OSG::Int8, 3 > Pnt3b;
01509
01515 typedef OSG::Pnt3b *Pnt3bP;
01516 #endif
01517 
01523 typedef OSG::Point< OSG::UInt16, 3 > Pnt3us;
01524
01530 typedef OSG::Pnt3us *Pnt3usP;
01531
01537 typedef OSG::Point< OSG::Int16, 3 > Pnt3s;
01538
01544 typedef OSG::Pnt3s *Pnt3sP;
01545
01551 typedef OSG::Point< OSG::Real32, 3 > Pnt3f;
01552
01558 typedef OSG::Pnt3f *Pnt3fP;
01559
01565 typedef OSG::Point < Fixed32, 3 > Pnt3fx;
01566
01572 typedef OSG::Pnt3fx *Pnt3fxP;
01573
01579 typedef OSG::Point< OSG::Real64, 3 > Pnt3d;
01580
01586 typedef OSG::Pnt3d *Pnt3dP;
01587
01593 typedef OSG::Point< OSG::Real128, 3 > Pnt3ld;
01594
01600 typedef OSG::Pnt3ld *Pnt3ldP;
01601
01602
01608 typedef OSG::Point< OSG::UInt8, 4 > Pnt4ub;
01609
01615 typedef OSG::Pnt4ub *Pnt4ubP;
01616
01617 #ifndef OSG_NO_INT8_PNT
01618 
01623 typedef OSG::Point< OSG::Int8, 4 > Pnt4b;
01624
01630 typedef OSG::Pnt4b *Pnt4bP;
01631 #endif
01632 
01638 typedef OSG::Point< OSG::UInt16, 4 > Pnt4us;
01639
01645 typedef OSG::Pnt4us *Pnt4usP;
01646
01652 typedef OSG::Point< OSG::Int16, 4 > Pnt4s;
01653
01659 typedef OSG::Pnt4s *Pnt4sP;
01660
01666 typedef OSG::Point< OSG::Real32, 4 > Pnt4f;
01667
01673 typedef OSG::Pnt4f *Pnt4fP;
01674
01680 typedef OSG::Point< Fixed32, 4 > Pnt4fx;
01681
01687 typedef OSG::Pnt4fx *Pnt4fxP;
01688
01694 typedef OSG::Point< OSG::Real64, 4 > Pnt4d;
01695
01701 typedef OSG::Pnt4d *Pnt4dP;
01702
01708 typedef OSG::Point< OSG::Real128, 4 > Pnt4ld;
01709
01715 typedef OSG::Pnt4ld *Pnt4ldP;
01716
01718 /*---------------------------------------------------------------------*/
01722 #ifdef OSG_FLOAT_PROFILE
01723 
01728 typedef OSG::Vec2f Vec2r;
01729
01734 typedef OSG::Vec3f Vec3r;
01735
01740 typedef OSG::Vec4f Vec4r;
01741
01746 typedef OSG::Pnt2f Pnt2r;
01747
01752 typedef OSG::Pnt3f Pnt3r;
01753
01758 typedef OSG::Pnt4f Pnt4r;
01759
01760 #else
01761 
01762
01767 typedef OSG::Vec2fx Vec2r;
01768
01773 typedef OSG::Vec3fx Vec3r;
01774
01779 typedef OSG::Vec4fx Vec4r;
01780
01785 typedef OSG::Pnt2fx Pnt2r;
01786
01791 typedef OSG::Pnt3fx Pnt3r;
01792
01797 typedef OSG::Pnt4fx Pnt4r;
01798
01799 #endif
01800 
01802 /*---------------------------------------------------------------------*/
01803
01804 OSG_END_NAMESPACE
01805
01806 #include "OSGVector.inl"
01807
01808
01809 #ifdef __sgi
01810 #pragma reset woff 1209
01811 #endif
01812 
01813 #endif /* OSGVECTOR_H */
01814
01815