Ticket #18: BaseFunctions-Doc.diff

File BaseFunctions-Doc.diff, 48.2 kB (added by cneumann, 2 years ago)
  • Source/Base/Base/OSGBaseFunctions.h

    old new  
    242242inline 
    243243Real32 osgrand(void); 
    244244 
    245 inline 
    246 bool osgIsBigEndian(void); 
    247  
    248245#if defined(WIN32) && defined(_MSC_VER)  
    249246#if _MSC_VER <= 1200  // VC6 
    250247inline 
     
    258255/*---------------------------------------------------------------------*/ 
    259256/*               big/little endian conversion functions                */ 
    260257 
     258inline 
     259bool osgIsBigEndian(void); 
     260 
    261261// host to network 
    262262 
    263263inline 
  • Source/Base/Base/OSGBaseFunctions.inl

    old new  
    4848/*! \name sqrt                                                         */ 
    4949/*! \{                                                                 */ 
    5050 
    51 /*! \ingroup GrpBaseBaseMathFn 
     51/*! Return the square root of the argument, i.e. the number \c y that satisfies 
     52    <tt>y<sup>2</sup> == rValue</tt>. The argument must be nonnegative. 
     53 
     54    \param[in] rValue The number to compute the square root of, must be >= 0. 
     55    \return The square root of the argument. 
     56 
     57    \note This function forwards to an appropriate C++ or C library function, 
     58    hence exhibits the respective error behavior. 
     59 
     60    \ingroup GrpBaseBaseMathFn 
    5261 */ 
    53  
    5462template <class FloatTypeT> inline 
    5563typename TypeTraits<FloatTypeT>::RealReturnType  
    5664    osgsqrt(const FloatTypeT rValue) 
     
    6270 
    6371/*! \ingroup GrpBaseBaseMathFn 
    6472 */ 
    65  
    6673inline 
    6774Real32 osgsqrt(const Real32 rValue) 
    6875{ 
     
    7784 
    7885/*! \ingroup GrpBaseBaseMathFn 
    7986 */ 
    80  
    8187inline 
    8288Real64 osgsqrt(const Real64 rValue) 
    8389{ 
     
    9096 
    9197/*! \ingroup GrpBaseBaseMathFn 
    9298 */ 
    93  
    9499inline 
    95100Real128 osgsqrt(const Real128 rValue) 
    96101{ 
     
    104109 
    105110/*! \ingroup GrpBaseBaseMathFn 
    106111 */ 
    107  
    108112inline 
    109113Fixed32 osgsqrt(const Fixed32 rValue) 
    110114{ 
     
    116120/*! \name cos                                                          */ 
    117121/*! \{                                                                 */ 
    118122 
    119 /*! \ingroup GrpBaseBaseMathFn 
     123/*! Return the cosine of the argument, which is given in radians. 
     124 
     125    \param[in] rValue The angle in radians to compute the cosine of. 
     126    \return Cosine of \a rValue, it is in the range -1 to 1. 
     127 
     128    \note This function forwards to an appropriate C++ or C library function, 
     129    hence exhibits the respective error behavior. 
     130 
     131    \ingroup GrpBaseBaseMathFn 
    120132 */ 
    121  
    122133template <class FloatTypeT> inline 
    123134typename TypeTraits<FloatTypeT>::RealReturnType  
    124135    osgcos(const FloatTypeT rValue) 
     
    130141 
    131142/*! \ingroup GrpBaseBaseMathFn 
    132143 */ 
    133  
    134144inline 
    135145Real32 osgcos(const Real32 rValue) 
    136146{ 
     
    145155 
    146156/*! \ingroup GrpBaseBaseMathFn 
    147157 */ 
    148  
    149158inline 
    150159Real64 osgcos(const Real64 rValue) 
    151160{ 
     
    158167 
    159168/*! \ingroup GrpBaseBaseMathFn 
    160169 */ 
    161  
    162170inline 
    163171Real128 osgcos(const Real128 rValue) 
    164172{ 
     
    171179 
    172180/*! \ingroup GrpBaseBaseMathFn 
    173181 */ 
    174  
    175182inline 
    176183Fixed32 osgcos(const Fixed32 rValue) 
    177184{ 
     
    183190/*! \name sin                                                          */ 
    184191/*! \{                                                                 */ 
    185192 
    186 /*! \ingroup GrpBaseBaseMathFn 
     193/*! Return the sine of the argument, which is given in radians. 
     194 
     195    \param[in] rValue The angle in radians to compute the sine of. 
     196    \return Sine of \a rValue, it is in the range -1 to 1. 
     197 
     198    \note This function forwards to an appropriate C++ or C library function, 
     199    hence exhibits the respective error behavior. 
     200 
     201    \ingroup GrpBaseBaseMathFn 
    187202 */ 
    188  
    189203template <class FloatTypeT> inline 
    190204typename TypeTraits<FloatTypeT>::RealReturnType  
    191205    osgsin(const FloatTypeT rValue) 
     
    197211 
    198212/*! \ingroup GrpBaseBaseMathFn 
    199213 */ 
    200  
    201214inline 
    202215Real32 osgsin(const Real32 rValue) 
    203216{ 
     
    212225 
    213226/*! \ingroup GrpBaseBaseMathFn 
    214227 */ 
    215  
    216228inline 
    217229Real64 osgsin(const Real64 rValue) 
    218230{ 
     
    225237 
    226238/*! \ingroup GrpBaseBaseMathFn 
    227239 */ 
    228  
    229240inline 
    230241Real128 osgsin(const Real128 rValue) 
    231242{ 
     
    238249 
    239250/*! \ingroup GrpBaseBaseMathFn 
    240251 */ 
    241  
    242252inline 
    243253Fixed32 osgsin(const Fixed32 rValue) 
    244254{ 
     
    251261/*! \name tan                                                          */ 
    252262/*! \{                                                                 */ 
    253263 
    254 /*! \ingroup GrpBaseBaseMathFn 
     264/*! Return the tangent of the argument, which is given in radians. The tangent 
     265    is defined as tan(x) = sin(x) / cos(x) and therefore has singularities at 
     266    odd multiples of pi/2. 
     267 
     268    \param[in] rValue The angle in radians to compute the tangent of. 
     269    \return Tangent of \a rValue. 
     270 
     271    \note This function forwards to an appropriate C++ or C library function, 
     272    hence exhibits the respective error behavior. 
     273 
     274    \ingroup GrpBaseBaseMathFn 
    255275 */ 
    256  
    257276template <class FloatTypeT> inline 
    258277typename TypeTraits<FloatTypeT>::RealReturnType 
    259278    osgtan(const FloatTypeT rValue) 
     
    265284 
    266285/*! \ingroup GrpBaseBaseMathFn 
    267286 */ 
    268  
    269287inline 
    270288Real32 osgtan(const Real32 rValue) 
    271289{ 
     
    280298 
    281299/*! \ingroup GrpBaseBaseMathFn 
    282300 */ 
    283  
    284301inline 
    285302Real64 osgtan(const Real64 rValue) 
    286303{ 
     
    293310 
    294311/*! \ingroup GrpBaseBaseMathFn 
    295312 */ 
    296  
    297313inline 
    298314Real128 osgtan(const Real128 rValue) 
    299315{ 
     
    306322 
    307323/*! \ingroup GrpBaseBaseMathFn 
    308324 */ 
    309  
    310325inline 
    311326Fixed32 osgtan(const Fixed32 rValue) 
    312327{ 
     
    318333/*! \name acos                                                         */ 
    319334/*! \{                                                                 */ 
    320335 
    321 /*! \ingroup GrpBaseBaseMathFn 
     336/*! Return the arc cosine (in radians) of the argument, i.e. the number \c y 
     337    such that <tt>rValue == cos(y)</tt> and \c y is in the range [-pi/2; pi/2]. 
     338 
     339    \param[in] rValue The number to compute the arc cosine of, must be 
     340    in the range [-1; 1]. 
     341    \return The arc cosine of \a rValue in the range [-pi/2; pi/2]. 
     342 
     343    \note This function forwards to an appropriate C++ or C library function, 
     344    hence exhibits the respective error behavior. 
     345 
     346    \ingroup GrpBaseBaseMathFn 
    322347 */ 
    323  
    324348template <class FloatTypeT> inline 
    325349typename TypeTraits<FloatTypeT>::RealReturnType  
    326350    osgacos(const FloatTypeT rValue) 
     
    332356 
    333357/*! \ingroup GrpBaseBaseMathFn 
    334358 */ 
    335  
    336359inline 
    337360Real32 osgacos(const Real32 rValue) 
    338361{ 
     
    347370 
    348371/*! \ingroup GrpBaseBaseMathFn 
    349372 */ 
    350  
    351373inline 
    352374Real64 osgacos(const Real64 rValue) 
    353375{ 
     
    360382 
    361383/*! \ingroup GrpBaseBaseMathFn 
    362384 */ 
    363  
    364385inline 
    365386Real128 osgacos(const Real128 rValue) 
    366387{ 
     
    376397/*! \name asin                                                         */ 
    377398/*! \{                                                                 */ 
    378399 
    379 /*! \ingroup GrpBaseBaseMathFn 
     400/*! Return the arc sine (in radians) of the argument, i.e. the number \c y such 
     401    that <tt>rValue == sin(y)</tt> and \c y is in the range [-pi/2; pi/2]. 
     402 
     403    \param[in] rValue The number to compute the arc sine of, must be 
     404    in the range [-1; 1]. 
     405    \return The arc sine of \a rValue in the range [-pi/2; pi/2]. 
     406 
     407    \note This function forwards to an appropriate C++ or C library function, 
     408    hence exhibits the respective error behavior. 
     409 
     410    \ingroup GrpBaseBaseMathFn 
    380411 */ 
    381  
    382412template <class FloatTypeT> inline 
    383413typename TypeTraits<FloatTypeT>::RealReturnType 
    384414    osgasin(const FloatTypeT rValue) 
     
    390420 
    391421/*! \ingroup GrpBaseBaseMathFn 
    392422 */ 
    393  
    394423inline 
    395424Real32 osgasin(const Real32 rValue) 
    396425{ 
     
    406435 
    407436/*! \ingroup GrpBaseBaseMathFn 
    408437 */ 
    409  
    410438inline 
    411439Real64 osgasin(const Real64 rValue) 
    412440{ 
     
    419447 
    420448/*! \ingroup GrpBaseBaseMathFn 
    421449 */ 
    422  
    423450inline 
    424451Real128 osgasin(const Real128 rValue) 
    425452{ 
     
    435462/*! \name atan                                                         */ 
    436463/*! \{                                                                 */ 
    437464 
    438 /*! \ingroup GrpBaseBaseMathFn 
     465/*! Return the arc tangent (in radians) of the argument, i.e. the number \c y 
     466    such that <tt>rValue == tan(y)</tt> and \c y is in the range [-pi/2; pi/2]. 
     467 
     468    \param[in] rValue The number to compute the arc tangent of. 
     469    \return The arc tangent of \a rValue in the range [-pi/2; pi/2]. 
     470 
     471    \note This function forwards to an appropriate C++ or C library function, 
     472    hence exhibits the respective error behavior. 
     473 
     474    \sa osgatan2(const FloatTypeT,const FloatTypeT) 
     475 
     476    \ingroup GrpBaseBaseMathFn 
    439477 */ 
    440  
    441478template <class FloatTypeT> inline 
    442479typename TypeTraits<FloatTypeT>::RealReturnType  
    443480    osgatan(const FloatTypeT rValue) 
     
    449486 
    450487/*! \ingroup GrpBaseBaseMathFn 
    451488 */ 
    452  
    453489inline 
    454490Real32 osgatan(const Real32 rValue) 
    455491{ 
     
    464500 
    465501/*! \ingroup GrpBaseBaseMathFn 
    466502 */ 
    467  
    468503inline 
    469504Real64 osgatan(const Real64 rValue) 
    470505{ 
     
    477512 
    478513/*! \ingroup GrpBaseBaseMathFn 
    479514 */ 
    480  
    481515inline 
    482516Real128 osgatan(const Real128 rValue) 
    483517{ 
     
    493527/*! \name atan2                                                        */ 
    494528/*! \{                                                                 */ 
    495529 
    496 /*! \ingroup GrpBaseBaseMathFn 
     530/*! Return the arc tangent (in radians) of <tt>rValue1 / rValue2</tt> using 
     531    the signs of both arguments to determine the quadrant. This can be used to 
     532    obtain the angle component of the polar coordinates of a point with 
     533    cartesian coordinates (\a rValue2, \a rValue1). 
     534 
     535    \param[in] rValue1 The numerator of the value to compute atan of. 
     536    \param[in] rValue2 The denominator of the value to compute atan of. 
     537    \return The arc tangent of <tt>rValue1 / rValue2</tt> in the range [-pi; pi]. 
     538 
     539    \note This function forwards to an appropriate C++ or C library function, 
     540    hence exhibits the respective error behavior. 
     541 
     542    \ingroup GrpBaseBaseMathFn 
    497543 */ 
    498  
    499544template <class FloatTypeT> inline 
    500545typename TypeTraits<FloatTypeT>::RealReturnType  
    501546    osgatan2(const FloatTypeT rValue1, 
     
    508553 
    509554/*! \ingroup GrpBaseBaseMathFn 
    510555 */ 
    511  
    512556inline 
    513557Real32 osgatan2(const Real32 rValue1, const Real32 rValue2) 
    514558{ 
     
    527571 
    528572/*! \ingroup GrpBaseBaseMathFn 
    529573 */ 
    530  
    531574inline 
    532575Real64 osgatan2(const Real64 rValue1, const Real64 rValue2) 
    533576{ 
     
    540583 
    541584/*! \ingroup GrpBaseBaseMathFn 
    542585 */ 
    543  
    544586inline 
    545587Real128 osgatan2(const Real128 rValue1, const Real128 rValue2) 
    546588{ 
     
    556598/*! \name abs                                                          */ 
    557599/*! \{                                                                 */ 
    558600 
    559 /*! \ingroup GrpBaseBaseMathFn 
     601/*! Return the absolute value of the argument. 
     602 
     603    \param[in] rValue Number to compute absolute value of. 
     604    \return Absolute value of \a rValue. 
     605 
     606    \note For floating point arguments this function forwards to an 
     607    appropriate C++ or C library function, hence exhibits the  
     608    respective error behavior. 
     609 
     610    \ingroup GrpBaseBaseMathFn 
    560611 */ 
    561  
    562612template <class TypeT> inline 
    563613TypeT osgabs(const TypeT rValue) 
    564614{ 
     
    567617 
    568618/*! \ingroup GrpBaseBaseMathFn 
    569619 */ 
    570  
    571620inline 
    572621Real32 osgabs(const Real32 rValue) 
    573622{ 
     
    582631 
    583632/*! \ingroup GrpBaseBaseMathFn 
    584633 */ 
    585  
    586634inline 
    587635Real64 osgabs(const Real64 rValue) 
    588636{ 
     
    595643 
    596644/*! \ingroup GrpBaseBaseMathFn 
    597645 */ 
    598  
    599646inline 
    600647Fixed32 osgabs(const Fixed32 rValue) 
    601648{ 
     
    604651 
    605652/*! \ingroup GrpBaseBaseMathFn 
    606653 */ 
    607  
    608654inline 
    609655Real128 osgabs(const Real128 rValue) 
    610656{ 
     
    620666/*! \name pow                                                          */ 
    621667/*! \{                                                                 */ 
    622668 
    623 /*! \ingroup GrpBaseBaseMathFn 
     669/*! Return \a rValue to the power of \a rExp. 
     670 
     671    \param[in] rValue Base. 
     672    \param[in] rExp Exponent. 
     673 
     674    \note This function forwards to an appropriate C++ or C library function, 
     675    hence exhibits the respective error behavior. 
     676 
     677    \ingroup GrpBaseBaseMathFn 
    624678 */ 
    625  
    626679template <class FloatTypeT> inline 
    627680typename TypeTraits<FloatTypeT>::RealReturnType 
    628681    osgpow(const FloatTypeT rValue, 
     
    635688 
    636689/*! \ingroup GrpBaseBaseMathFn 
    637690 */ 
    638  
    639691inline 
    640692Real32 osgpow(const Real32 rValue, const Real32 rExp) 
    641693{ 
     
    650702 
    651703/*! \ingroup GrpBaseBaseMathFn 
    652704 */ 
    653  
    654705inline 
    655706Real64 osgpow(const Real64 rValue, const Real64 rExp) 
    656707{ 
     
    663714 
    664715/*! \ingroup GrpBaseBaseMathFn 
    665716 */ 
    666  
    667717inline 
    668718Real128 osgpow(const Real128 rValue, const Real128 rExp) 
    669719{ 
     
    679729/*! \name log                                                          */ 
    680730/*! \{                                                                 */ 
    681731 
    682 /*! \ingroup GrpBaseBaseMathFn 
     732/*! Return the natural logarithm of the argument, i.e. the number \c y such that 
     733    <tt>e<sup>y</sup> == rValue</tt>, where e is Euler's number. 
     734 
     735    \param[in] rValue The number to compute the natural logarithm of, 
     736    must be >= 0. 
     737    \return Natural logarithm of \a rValue. 
     738 
     739    \note This function forwards to an appropriate C++ or C library function, 
     740    hence exhibits the respective error behavior. 
     741 
     742    \ingroup GrpBaseBaseMathFn 
    683743 */ 
    684  
    685744template <class FloatTypeT> inline 
    686745typename TypeTraits<FloatTypeT>::RealReturnType 
    687746    osglog(const FloatTypeT rValue) 
     
    693752 
    694753/*! \ingroup GrpBaseBaseMathFn 
    695754 */ 
    696  
    697755inline 
    698756Real32 osglog(const Real32 rValue) 
    699757{ 
     
    708766 
    709767/*! \ingroup GrpBaseBaseMathFn 
    710768 */ 
    711  
    712769inline 
    713770Real64 osglog(const Real64 rValue) 
    714771{ 
     
    721778 
    722779/*! \ingroup GrpBaseBaseMathFn 
    723780 */ 
    724  
    725781inline 
    726782Real128 osglog(const Real128 rValue) 
    727783{ 
     
    737793/*! \name exp                                                          */ 
    738794/*! \{                                                                 */ 
    739795 
    740 /*! \ingroup GrpBaseBaseMathFn 
     796/*! Return e to the power \a rValue, where e is Euler's number, the base of the 
     797    natural logarithm. 
     798 
     799    \param[in] rValue Exponent. 
     800    \return e to the power \a rValue. 
     801 
     802    \note This function forwards to an appropriate C++ or C library function, 
     803    hence exhibits the respective error behavior. 
     804 
     805    \ingroup GrpBaseBaseMathFn 
    741806 */ 
    742  
    743807template <class FloatTypeT> inline 
    744808typename TypeTraits<FloatTypeT>::RealReturnType 
    745809    osgexp(const FloatTypeT rValue) 
     
    751815 
    752816/*! \ingroup GrpBaseBaseMathFn 
    753817 */ 
    754  
    755818inline 
    756819Real32 osgexp(const Real32 rValue) 
    757820{ 
     
    766829 
    767830/*! \ingroup GrpBaseBaseMathFn 
    768831 */ 
    769  
    770832inline 
    771833Real64 osgexp(const Real64 rValue) 
    772834{ 
     
    779841 
    780842/*! \ingroup GrpBaseBaseMathFn 
    781843 */ 
    782  
    783844inline 
    784845Real128 osgexp(const Real128 rValue) 
    785846{ 
     
    795856/*! \name floor                                                        */ 
    796857/*! \{                                                                 */ 
    797858 
    798 /*! \ingroup GrpBaseBaseMathFn 
     859/*! Returns the argument rounded downwards to the nearest integer, i.e. returns 
     860    the largest integer not greater than \a rValue. 
     861 
     862    Example: 
     863    \code 
     864    osgfloor( 1.5) ==  1.0; 
     865    osgfloor(-1.5) == -2.0; 
     866    \endcode 
     867 
     868    \param[in] rValue Number to round down. 
     869    \return Largest integer not greater than the argument. 
     870 
     871    \note This function forwards to an appropriate C++ or C library function, 
     872    hence exhibits the respective error behavior. 
     873 
     874    \ingroup GrpBaseBaseMathFn 
    799875 */ 
    800  
    801876template <class FloatTypeT> inline 
    802877typename TypeTraits<FloatTypeT>::RealReturnType 
    803878    osgfloor(const FloatTypeT rValue) 
     
    809884 
    810885/*! \ingroup GrpBaseBaseMathFn 
    811886 */ 
    812  
    813887inline 
    814888Real32 osgfloor(const Real32 rValue) 
    815889{ 
     
    828902 
    829903/*! \ingroup GrpBaseBaseMathFn 
    830904 */ 
    831  
    832905inline 
    833906Real64 osgfloor(const Real64 rValue) 
    834907{ 
     
    841914 
    842915/*! \ingroup GrpBaseBaseMathFn 
    843916 */ 
    844  
    845917inline 
    846918Real128 osgfloor(const Real128 rValue) 
    847919{ 
     
    857929/*! \name ceil                                                         */ 
    858930/*! \{                                                                 */ 
    859931 
    860 /*! \ingroup GrpBaseBaseMathFn 
     932/*! Returns the argument rounded upwards to the nearest integer, i.e. returns 
     933    the smallest integer not less than \a rValue. 
     934 
     935    Example: 
     936    \code 
     937    osgceil( 1.5) ==  2.0; 
     938    osgceil(-1.5) == -1.0; 
     939    \endcode 
     940 
     941    \param[in] rValue Number to round up. 
     942    \return Smallest integer not less than the argument. 
     943 
     944    \note This function forwards to an appropriate C++ or C library function, 
     945    hence exhibits the respective error behavior. 
     946 
     947    \ingroup GrpBaseBaseMathFn 
    861948 */ 
    862  
    863949template <class FloatTypeT> inline 
    864950typename TypeTraits<FloatTypeT>::RealReturnType 
    865951    osgceil(const FloatTypeT rValue) 
     
    871957 
    872958/*! \ingroup GrpBaseBaseMathFn 
    873959 */ 
    874  
    875960inline 
    876961Real32 osgceil(const Real32 rValue) 
    877962{ 
     
    890975 
    891976/*! \ingroup GrpBaseBaseMathFn 
    892977 */ 
    893  
    894978inline 
    895979Real64 osgceil(const Real64 rValue) 
    896980{ 
     
    903987 
    904988/*! \ingroup GrpBaseBaseMathFn 
    905989 */ 
    906  
    907990inline 
    908991Real128 osgceil(const Real128 rValue) 
    909992{ 
     
    9191002/*! \name finite                                                       */ 
    9201003/*! \{                                                                 */ 
    9211004 
    922 /*! \ingroup GrpBaseBaseMathFn 
     1005/*! Returns a nonzero value if \a rValue is a finite number, i.e. neither 
     1006    plus or minus infinity nor NAN. 
     1007 
     1008    \param[in] rValue Number to test. 
     1009    \return Nonzero value if argument is finite. 
     1010 
     1011    \note This function forwards to an appropriate C++ or C library function, 
     1012    hence exhibits the respective error behavior. 
     1013 
     1014    \ingroup GrpBaseBaseMathFn 
    9231015 */ 
    924  
    9251016template <class FloatTypeT> inline 
    9261017UInt32 osgfinite(const FloatTypeT rValue) 
    9271018{ 
     
    9411032/*! \name min / max                                                    */ 
    9421033/*! \{                                                                 */ 
    9431034 
    944 /*! \ingroup GrpBaseBaseMathFn 
     1035/*! Return the smaller of the two arguments. 
     1036 
     1037    \param[in] lVal First value for comparison. 
     1038    \param[in] rValue Second value for comparison. 
     1039    \return The smaller of the two arguments. 
     1040 
     1041    \ingroup GrpBaseBaseMathFn 
    9451042 */ 
    946  
    9471043template <class TypeT> inline 
    9481044TypeT osgMin(const TypeT lValue, const TypeT rValue) 
    9491045{ 
    9501046    return ((lValue < rValue) ? lValue : rValue); 
    9511047} 
    9521048 
    953 /*! \ingroup GrpBaseBaseMathFn 
     1049/*! Return the larger of the two arguments. 
     1050 
     1051    \param[in] lVal First value for comparison. 
     1052    \param[in] rValue Second value for comparison. 
     1053    \return The larger of the two arguments. 
     1054 
     1055    \ingroup GrpBaseBaseMathFn 
    9541056 */ 
    955  
    9561057template <class TypeT> inline 
    9571058TypeT osgMax(const TypeT lValue, const TypeT rValue) 
    9581059{ 
    9591060    return ((lValue > rValue) ? lValue : rValue); 
    9601061} 
    9611062 
    962 /*! \ingroup GrpBaseBaseMathFn 
    963     Clamp \a val to [\a minVal - \a maxVal]. 
    964  */ 
     1063/*! Restrict val to the range [minVal; maxVal], inclusive. 
    9651064 
     1065    \param[in] minVal Lower bound of the range. 
     1066    \param[in] val Value to clamp. 
     1067    \param[in] maxVal Upper bound of the range. 
     1068    \return The value from the given range that is closest to val. 
     1069 
     1070    \ingroup GrpBaseBaseMathFn 
     1071*/ 
    9661072template <class TypeT> inline 
    9671073TypeT osgClamp(const TypeT minVal, const TypeT val, const TypeT maxVal) 
    9681074{ 
     
    9741080/*! \name sgn                                                          */ 
    9751081/*! \{                                                                 */ 
    9761082 
    977 /*! \ingroup GrpBaseBaseMathFn 
     1083/*! Return the sign of the argument, i.e. -1 if val is negative, 1 if it is 
     1084    positive and 0 otherwise. 
     1085 
     1086    \param[in] val The number to classify. 
     1087    \return The sign of the argument. 
     1088 
     1089    \ingroup GrpBaseBaseMathFn 
    9781090 */ 
    979  
    9801091template <class TypeT> inline 
    9811092Int8 osgSgn(TypeT val) 
    9821093{ 
     
    9941105/*! \name swap                                                         */ 
    9951106/*! \{                                                                 */ 
    9961107 
    997 /*! \ingroup GrpBaseBaseMathFn 
     1108/*! Exchanges the values of the arguments. 
     1109 
     1110    \param[in,out] lVal New value for \a rValue, is assigned the  
     1111    old value of \a rValue. 
     1112    \param[in,out] rValue New value for lVal, is assigned the 
     1113    old value of rVal. 
     1114 
     1115    \ingroup GrpBaseBaseMathFn 
    9981116 */ 
    999  
    10001117template <class TypeT> inline 
    10011118void osgSwap(TypeT & lValue, TypeT & rValue) 
    10021119{ 
     
    10111128/*! \name degree2rad                                                   */ 
    10121129/*! \{                                                                 */ 
    10131130 
    1014 /*! \ingroup GrpBaseBaseMathFn 
     1131/*! Converts the argument angle from degrees to radians. 
     1132 
     1133    \param[in] rValue Angle in degree to convert. 
     1134    \return Angle in radians. 
     1135 
     1136    \ingroup GrpBaseBaseMathFn 
    10151137 */ 
    1016  
    10171138inline 
    10181139Real32 osgdegree2rad(const Real32 rValue) 
    10191140{ 
     
    10221143 
    10231144/*! \ingroup GrpBaseBaseMathFn 
    10241145 */ 
    1025  
    10261146inline 
    10271147Real64 osgdegree2rad(const Real64 rValue) 
    10281148{ 
     
    10311151 
    10321152/*! \ingroup GrpBaseBaseMathFn 
    10331153 */ 
    1034  
    10351154inline 
    10361155Fixed32 osgdegree2rad(const Fixed32 rValue) 
    10371156{ 
     
    10551174/*! \name rad2degree                                                   */ 
    10561175/*! \{                                                                 */ 
    10571176 
    1058 /*! \ingroup GrpBaseBaseMathFn 
     1177/*! Converts the argument angle from radians to degrees. 
     1178 
     1179    \param[in] rValue Angle in radians to convert. 
     1180    \return Angle in degrees. 
     1181 
     1182    \ingroup GrpBaseBaseMathFn 
    10591183 */ 
    1060  
    10611184inline 
    10621185Real32 osgrad2degree(const Real32 rValue) 
    10631186{ 
     
    10661189 
    10671190/*! \ingroup GrpBaseBaseMathFn 
    10681191 */ 
    1069  
    10701192inline 
    10711193Real64 osgrad2degree(const Real64 rValue) 
    10721194{ 
     
    10751197 
    10761198/*! \ingroup GrpBaseBaseMathFn 
    10771199 */ 
    1078  
    10791200inline 
    10801201Fixed32 osgrad2degree(const Fixed32 rValue) 
    10811202{ 
     
    10841205 
    10851206/*! \ingroup GrpBaseBaseMathFn 
    10861207 */ 
    1087  
    10881208template <class FloatTypeT> inline 
    10891209typename TypeTraits<FloatTypeT>::RealReturnType 
    10901210    osgrad2degree(const FloatTypeT rValue) 
     
    10991219/*! \name deg2rad / rad2deg                                            */ 
    11001220/*! \{                                                                 */ 
    11011221 
    1102 /*! \ingroup GrpBaseBaseMathFn 
     1222/*! Converts the argument angle from degrees to radians. 
     1223 
     1224    \param[in] rValue Angle in degree to convert. 
     1225    \return Angle in radians. 
     1226 
     1227    \ingroup GrpBaseBaseMathFn 
    11031228 */ 
    1104  
    11051229template <class FloatTypeT> inline 
    11061230typename TypeTraits<FloatTypeT>::RealReturnType 
    11071231    deg2rad(const FloatTypeT rValue) 
     
    11091233    return osgdegree2rad(rValue); 
    11101234} 
    11111235 
    1112 /*! \ingroup GrpBaseBaseMathFn 
     1236/*! Converts the argument angle from radians to degrees. 
     1237 
     1238    \param[in] rValue Angle in radians to convert. 
     1239    \return Angle in degrees. 
     1240 
     1241    \ingroup GrpBaseBaseMathFn 
    11131242 */ 
    1114  
    11151243template <class FloatTypeT> inline 
    11161244typename TypeTraits<FloatTypeT>::RealReturnType  
    11171245    rad2deg(const FloatTypeT rValue) 
     
    11241252/*! \name ispower2                                                     */ 
    11251253/*! \{                                                                 */ 
    11261254 
    1127 /*! \ingroup GrpBaseBaseMathFn 
     1255/*! Test if the argument is a power of 2 or zero. 
     1256 
     1257    \param[in] rValue Number to test. 
     1258    \return true if rValue is a power of 2 or zero. 
     1259 
     1260    \ingroup GrpBaseBaseMathFn 
    11281261 */ 
    1129  
    11301262template <> inline 
    11311263bool osgispower2<UInt32>(UInt32 rValue) 
    11321264{ 
     
    11461278        return true; 
    11471279} 
    11481280 
    1149 /*! \ingroup GrpBaseBaseMathFn 
     1281/*! Test if the argument is a power of 2 or zero. 
     1282 
     1283    \param[in] rValue Number to test, must be >= 0. 
     1284    \return true if rValue is a power of 2 or zero. 
     1285 
     1286    \ingroup GrpBaseBaseMathFn 
    11501287 */ 
    1151  
    11521288template <> inline 
    11531289bool osgispower2<Int32>(Int32 rValue) 
    11541290{ 
     
    11731309/*! \name nextpower2                                                   */ 
    11741310/*! \{                                                                 */ 
    11751311 
    1176 /*! \ingroup GrpBaseBaseMathFn 
     1312/*! Return the next larger power of 2, i.e. the smallest power of 2 not less 
     1313    than \a rValue. 
     1314 
     1315    \param[in] rValue The lower bound for the wanted power of 2. 
     1316    \return A power of 2 to not less than \a rValue. 
     1317 
     1318    \ingroup GrpBaseBaseMathFn 
    11771319 */ 
    1178  
    11791320template <> inline 
    11801321UInt32 osgnextpower2<UInt32>(UInt32 rValue) 
    11811322{ 
     
    11931334 
    11941335/*! \ingroup GrpBaseBaseMathFn 
    11951336 */ 
    1196  
    11971337template <> inline 
    11981338Int32 osgnextpower2<Int32>(Int32 rValue) 
    11991339{ 
     
    12111351 
    12121352/*! \ingroup GrpBaseBaseMathFn 
    12131353 */ 
    1214  
    12151354template <> inline 
    12161355Int64 osgnextpower2<Int64>(Int64 rValue) 
    12171356{ 
     
    12291368 
    12301369/*! \ingroup GrpBaseBaseMathFn 
    12311370 */ 
    1232  
    12331371template <> inline 
    12341372UInt64 osgnextpower2<UInt64>(UInt64 rValue) 
    12351373{ 
     
    12491387 
    12501388/*! \ingroup GrpBaseBaseMathFn 
    12511389 */ 
    1252  
    12531390template <> inline 
    12541391size_t osgnextpower2<size_t>(size_t rValue) 
    12551392{ 
     
    12681405#endif 
    12691406 
    12701407/*! \}                                                                 */ 
    1271 //--------------------------------------------------------------------------- 
    1272 // Misc Functions 
    1273 //--------------------------------------------------------------------------- 
     1408/*---------------------------------------------------------------------*/ 
     1409/*! \name Misc                                                         */ 
     1410/*! \{                                                                 */ 
    12741411 
    1275 /*! find the index that has the largest absolute value for a vec3/pnt3 
     1412/*! Returns the index of the element that has the largest absolute value in 
     1413    a Vec3 or Pnt3. 
     1414 
     1415    \param[in] v Input Vec3 or Pnt3. 
     1416    \return Index of the element with largest absolute value. 
     1417 
    12761418    \ingroup GrpBaseBaseMiscFn 
    12771419 */ 
    1278  
    1279  
    12801420template<class VecPntT> inline 
    12811421UInt32 getMaxIndexAbs3(const VecPntT &v) 
    12821422{ 
     
    12861426            (osgabs(v[1]) > osgabs(v[2]) ? 1 : 2); 
    12871427} 
    12881428 
    1289 /*! \ingroup GrpBaseBaseMiscFn 
     1429#ifndef OSG_WINCE 
     1430/*! Sets or removes an environment variable. If the \a string is of the form 
     1431    <tt>name=value</tt> the env. variable \c name is set to \c value. Otherwise 
     1432    the contents of \a string a interpreted as the name of an env. variable and 
     1433    any definition of this variable is removed from the environment. 
     1434 
     1435    \param[in] string String to put into the environment. 
     1436 
     1437    \note This function forwards to an appropriate C++ or C library function, 
     1438    hence exhibits the respective error behavior. 
     1439 
     1440    \warning The exact \a string is put into the environment, any changes to 
     1441    it will be directly reflected there. The lifetime of \a string must only end 
     1442    when the program terminates. 
     1443 
     1444    \ingroup GrpBaseBaseMiscFn 
    12901445 */ 
    1291  
    1292 #ifndef OSG_WINCE 
    12931446inline 
    12941447Int32 putenv(Char8 *string) 
    12951448{ 
     
    13071460} 
    13081461#endif 
    13091462 
    1310 /*! \ingroup GrpBaseBaseMiscFn 
    1311  */ 
     1463/*! Pause program execution for the given number of milliseconds. 
    13121464 
     1465    \param[in] millisecs Duration of the pause. 
    13131466 
     1467    \ingroup GrpBaseBaseMiscFn 
     1468 */ 
    13141469inline 
    13151470void osgsleep(UInt32 millisecs) 
    13161471{ 
     
    13511506#endif 
    13521507} 
    13531508 
    1354 /*! get a random value between 0 and 1 
     1509/*! Returns a uniformly distributed random Real32 between 0 and 1 inclusive. 
     1510 
     1511    \return A random Real32 number between 0 and 1 inclusive. 
     1512 
    13551513    \ingroup GrpBaseBaseMiscFn 
    13561514 */ 
    1357  
    1358  
    13591515inline 
    13601516Real32 osgrand(void) 
    13611517{ 
    13621518    return rand() / (Real32) RAND_MAX; 
    13631519} 
    13641520 
    1365 /*! return true if the current system is big endian 
     1521#if defined(WIN32) && defined(_MSC_VER)  
     1522#if _MSC_VER <= 1200  // VC6 
     1523/*! Write a UInt64 value to the given stream. 
     1524 
     1525    \param[in] os Output stream to write to. 
     1526    \param[in] v Value to write. 
     1527    \return The given output stream. 
     1528 
    13661529    \ingroup GrpBaseBaseMiscFn 
    13671530 */ 
    1368  
    13691531inline 
    1370 bool osgIsBigEndian(void) 
    1371 { 
    1372     return (BYTE_ORDER) == (BIG_ENDIAN);    
    1373 } 
    1374  
    1375 #if defined(WIN32) && defined(_MSC_VER)  
    1376 #if _MSC_VER <= 1200  // VC6 
    1377 inline 
    13781532std::ostream &operator<<(std::ostream &os, UInt64 v) 
    13791533{ 
    13801534    char buf[30]; 
     
    13821536    return os << buf; 
    13831537} 
    13841538 
     1539/*! Write a Int64 value to the given stream. 
     1540 
     1541    \param[in] os Output stream to write to. 
     1542    \param[in] v Value to write. 
     1543    \return The given output stream. 
     1544 
     1545    \ingroup GrpBaseBaseMiscFn 
     1546 */ 
    13851547inline 
    13861548std::ostream &operator<<(std::ostream &os, Int64 v) 
    13871549{ 
     
    13921554#endif 
    13931555#endif 
    13941556 
     1557/*! \}                                                                 */ 
    13951558/*---------------------------------------------------------------------*/ 
    1396 /*               big/little endian conversion functions                */ 
     1559/*! \name Byte Order                                                   */ 
     1560/*! \{                                                                 */ 
    13971561 
     1562