Carsten Neumann wrote:
>       Hi Dirk,
> 
> Dirk Reiners wrote:
>> Carsten Neumann wrote:
>>> I've attached a draft  of what I mean.
>> I like the idea of specializing for identical types, that is neat.
> 
> I'm not sure if this turns into a case of premature optimization,
> because the compiler would get it right anyway, but its fun to play
> around with it a little :)
> 
>> Looks 
>> good to me, do you want to get it to the point that it compiles? And 
>> maybe add some unittests for it? ;)

Ok, here is what turned into. The files go into
Source/System/NodeCores/Drawables/Geometry/Properties and the diff
simply changes OSGGeoVectorProperty.h to include the new header and
disable the current code.
I wanted to get some feedback on this, before I commit it (doc will be
completed before that happens). It would be especially nice if someone
could try this on windows.

The high number of deactivated tests comes from the very limited
interaction Fixed32 allows with other types. I did not try all, but many
(all?) also fail to compile with the current code for the same reason -
OpenSG itself compiles of course with either one.

There are only these operators (where is + ??)

Fixed32 operator -(const Real32 lhs, const Fixed32 rhs);
Fixed32 operator /(const Real32 lhs, const Fixed32 rhs);
Fixed32 operator *(const Real32 lhs, const Fixed32 rhs);

and these constructors

Fixed32(const Real32 source);
Fixed32(const UInt32 source);
Fixed32(const Fixed32 &source);

Where is the Fixed32 code from, can someone give some insights on how to
make it play nicely with all other scalar types ?

        Thanks,
                Carsten
Index: Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorProperty.h
===================================================================
--- Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorProperty.h	(revision 231)
+++ Source/System/NodeCores/Drawables/Geometry/Properties/OSGGeoVectorProperty.h	(working copy)
@@ -44,10 +44,11 @@
 
 #include "OSGVector.h"
 #include "OSGGeoVectorPropertyBase.h"
+#include "OSGGeoVectorPropertyConversion.h"
 
 OSG_BEGIN_NAMESPACE
 
-
+#if 0
 /* Helper classes for vector type conversions */
 
 // Converter class for vector conversion
@@ -236,6 +237,8 @@
     }
 };
 
+#endif
+
 /*! \brief GeoVectorProperty class. See \ref 
            PageWindowGLUTGeoVectorProperty for a description.
 */
/*---------------------------------------------------------------------------*\
 *                                OpenSG                                     *
 *                                                                           *
 *                                                                           *
 *               Copyright (C) 2000-2006 by the OpenSG Forum                 *
 *                                                                           *
 *                            www.opensg.org                                 *
 *                                                                           *
 *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                License                                    *
 *                                                                           *
 * This library is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU Library General Public License as published    *
 * by the Free Software Foundation, version 2.                               *
 *                                                                           *
 * This library is distributed in the hope that it will be useful, but       *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
 * Library General Public License for more details.                          *
 *                                                                           *
 * You should have received a copy of the GNU Library General Public         *
 * License along with this library; if not, write to the Free Software       *
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                Changes                                    *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
\*---------------------------------------------------------------------------*/

#ifndef _OSGGEOVECTORPROPERTYCONVERSION_H_
#define _OSGGEOVECTORPROPERTYCONVERSION_H_
#ifdef __sgi
#pragma once
#endif

#include "OSGConfig.h"

#include <boost/type_traits/is_same.hpp>
#include <boost/mpl/if.hpp>

OSG_BEGIN_NAMESPACE

namespace detail
{

/*! \brief Empty tag type, to mark "in" conversions.
 */
struct GeoConvertInTag
{
};

/*! \brief Empty tag type, to mark "out" conversions.
 */
struct GeoConvertOutTag
{
};

/*! \brief Performs an "in" or "out" normalization.
 */
template <class ValueTypeT, class DirectionTagT>
class NormalizeFunc
{
public:
    typedef ValueTypeT    ValueType;
    typedef DirectionTagT DirectionTag;
    
    inline static ValueType
    normalize(const ValueType& val, const Real64 scale, const Real64 offset);
    
private:
    inline static ValueType
    doNormalize(const ValueType&       val,
                const Real64           scale,
                const Real64           offset,
                const GeoConvertInTag&);
    
    inline static ValueType
    doNormalize(const ValueType&        val,
                const Real64            scale,
                const Real64            offset,
                const GeoConvertOutTag&);
};

/*! \brief Implements the conversion between two types.
 */
template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
class GeoConvertFuncs
{
    /*==========================  PUBLIC  =================================*/
public:
    /*---------------------------------------------------------------------*/
    /*! \name                      Types                                   */
    /*! \{                                                                 */
    
    typedef DestTypeT     DestType;
    typedef SourceTypeT   SourceType;
    typedef DirectionTagT DirectionTag;
    
    inline static void
    convert      (DestType& dest,      const SourceType& src,
                  Real64    scale = 1,       Real64      offset = 0);
    
    inline static void
    convertCustom(DestType& dest,      const SourceType& src,
                  Real64    scale = 1,       Real64      offset = 0);

    /*=========================  PRIVATE  =================================*/
private:
    /*---------------------------------------------------------------------*/
    /*! \name              Code path selection types                       */
    /*! \{                                                                 */
    
    typedef typename boost::is_same  <DestType, 
                                      SourceType        >::type SameType;
    typedef typename boost::mpl::if_c<NormalizeV,
                                      boost::true_type,
                                      boost::false_type >::type NormType;
    
    typedef detail::NormalizeFunc<typename SourceType::ValueType,
                                  DirectionTag                   > NormSourceFunc;
    typedef detail::NormalizeFunc<typename DestType::ValueType,
                                  DirectionTag                   > NormDestFunc;
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                     convert                                  */
    /*! \{                                                                 */
    
    inline static void
    convert(const boost::false_type& same,  const boost::false_type& norm,
                  DestType&          dest,  const SourceType&        src,
                  Real64             scale,       Real64             offset);
    
    inline static void
    convert(const boost::false_type& same,  const boost::true_type&  norm,
                  DestType&          dest,  const SourceType&        src,
                  Real64             scale,       Real64             offset);
    
    inline static void
    convert(const boost::true_type&  same,  const boost::false_type& norm,
                  DestType&          dest,  const SourceType&        src,
                  Real64             scale,       Real64             offset);
    
    inline static void
    convert(const boost::true_type&  same,  const boost::true_type&  norm,
                  DestType&          dest,  const SourceType&        src,
                  Real64             scale,       Real64             offset);
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertCustom                              */
    /*! \{                                                                 */
    
    inline static void
    convertCustom(const boost::false_type& same,  const boost::false_type& norm,
                        DestType&          dest,  const SourceType&        src,
                        Real64             scale,       Real64             offset);
    
    inline static void
    convertCustom(const boost::false_type& same,  const boost::true_type&  norm,
                        DestType&          dest,  const SourceType&        src,
                        Real64             scale,       Real64             offset);
    
    inline static void
    convertCustom(const boost::true_type&  same,  const boost::false_type& norm,
                        DestType&          dest,  const SourceType&        src,
                        Real64             scale,       Real64             offset);
    
    inline static void
    convertCustom(const boost::true_type&  same,  const boost::true_type&  norm,
                        DestType&          dest,  const SourceType&        src,
                        Real64             scale,       Real64             offset);
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
};

/*! \brief Helper for vectors with elements of type Fixed32.
 */
// Simplify implementation of Fixed32 special cases below
template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
struct GeoConvertCustomHelper
{
    /*---------------------------------------------------------------------*/
    /*! \name                      Types                                   */
    /*! \{                                                                 */
    
    typedef ExternalTypeT ExternalType;
    typedef StoredTypeT   StoredType;
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertIn                                  */
    /*! \{                                                                 */
    
    inline static void
    convertIn(StoredType& dest,      const ExternalType& src,
              Real64      scale = 1,       Real64        offset = 0);
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertOut                                 */
    /*! \{                                                                 */
    
    inline static void
    convertOut(ExternalType& dest,      const StoredType& src,
               Real64        scale = 1,       Real64      offset = 0);
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
};

template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
struct GeoConvertImpl
{
    /*---------------------------------------------------------------------*/
    /*! \name                      Types                                   */
    /*! \{                                                                 */
    
    typedef ExternalTypeT ExternalType;
    typedef StoredTypeT   StoredType;

    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertIn                                  */
    /*! \{                                                                 */

    inline static void
    convertIn(StoredType& dest,      const ExternalType& src,
              Real64      scale = 1,       Real64        offset = 0);
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertOut                                 */
    /*! \{                                                                 */
    
    inline static void
    convertOut(ExternalType& dest,      const StoredType& src,
               Real64        scale = 1,       Real64      offset = 0);

    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
};

// partial specialization for Fixed32 vector types - Vec{1,2,3,4}fx
template <class ExternalTypeT, class StorageInterfaceT, bool NormalizeV>
struct GeoConvertImpl<ExternalTypeT, 
                     VectorInterface<Fixed32, StorageInterfaceT>,
                     NormalizeV>
    : public GeoConvertCustomHelper<ExternalTypeT,
                                    VectorInterface<Fixed32, StorageInterfaceT>,
                                    NormalizeV>
{
    // implementation inherited from GeoConvertCustomHelper
};

// partial specialization for Fixed32 point types - Pnt{1,2,3,4}fx
template <class ExternalTypeT, class StorageInterfaceT, bool NormalizeV>
struct GeoConvertImpl<ExternalTypeT, 
                     PointInterface<Fixed32, StorageInterfaceT>,
                     NormalizeV>
    : public GeoConvertCustomHelper<ExternalTypeT,
                                    PointInterface<Fixed32, StorageInterfaceT>,
                                    NormalizeV>
{
    // implementation inherited from GeoConvertCustomHelper
};

// partial specialization for Color3fx
template <class ExternalTypeT, bool NormalizeV>
struct GeoConvertImpl<ExternalTypeT, Color3fx, NormalizeV>
    : public GeoConvertCustomHelper<ExternalTypeT, Color3fx, NormalizeV>
{
    // implementation inherited from GeoConvertCustomHelper
};

// partial specialization for Color4fx
template <class ExternalTypeT, bool NormalizeV>
struct GeoConvertImpl<ExternalTypeT, Color4fx, NormalizeV>
    : public GeoConvertCustomHelper<ExternalTypeT, Color4fx, NormalizeV>
{
    // implementation inherited from GeoConvertCustomHelper
};

} // namespace detail

OSG_END_NAMESPACE

// pull in implementation
#include "OSGGeoVectorPropertyConversion.inl"

OSG_BEGIN_NAMESPACE

struct GeoConvert
{
    /*---------------------------------------------------------------------*/
    /*! \name                   convertIn                                  */
    /*! \{                                                                 */
    
    template <class ExternalTypeT, class StoredTypeT>
    inline static void
    convertIn(StoredTypeT& dest,      const ExternalTypeT& src,
              Real64       scale = 1,       Real64         offset = 0)
    {
        detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, false>::convertIn(
                dest, src, scale, offset);
    }
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertOut                                 */
    /*! \{                                                                 */
    
    template <class ExternalTypeT, class StoredTypeT>
    inline static void
    convertOut(ExternalTypeT& dest,      const StoredTypeT& src,
               Real64         scale = 1,       Real64       offset = 0)
    {
        detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, false>::convertOut(
                dest, src, scale, offset);
    }
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
};

struct GeoConvertNormalize
{
    /*---------------------------------------------------------------------*/
    /*! \name                   convertIn                                  */
    /*! \{                                                                 */

    template <class ExternalTypeT, class StoredTypeT>
    inline static void
    convertIn(StoredTypeT& dest,      const ExternalTypeT& src,
              Real64       scale = 1,       Real64         offset = 0)
    {
        detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, true>::convertIn(
                dest, src, scale, offset);
    }
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
    /*! \name                   convertOut                                 */
    /*! \{                                                                 */
    
    template <class ExternalTypeT, class StoredTypeT>
    inline static void 
    convertOut(ExternalTypeT& dest,      const StoredTypeT& src,
               Real64         scale = 1,       Real64       offset = 0)
    {
        detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, true>::convertOut(
                dest, src, scale, offset);
    }
    
    /*! \}                                                                 */
    /*---------------------------------------------------------------------*/
};

OSG_END_NAMESPACE

#define OSGGEOVECTORPROPERTYCONVERSION_HEADER_CVSID "@(#)$Id: $"

#endif /* _OSGGEOVECTORPROPERTYCONVERSION_H_ */
/*---------------------------------------------------------------------------*\
 *                                OpenSG                                     *
 *                                                                           *
 *                                                                           *
 *               Copyright (C) 2000-2006 by the OpenSG Forum                 *
 *                                                                           *
 *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                License                                    *
 *                                                                           *
 * This library is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU Library General Public License as published    *
 * by the Free Software Foundation, version 2.                               *
 *                                                                           *
 * This library is distributed in the hope that it will be useful, but       *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
 * Library General Public License for more details.                          *
 *                                                                           *
 * You should have received a copy of the GNU Library General Public         *
 * License along with this library; if not, write to the Free Software       *
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                Changes                                    *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
\*---------------------------------------------------------------------------*/

//---------------------------------------------------------------------------
//  Includes
//---------------------------------------------------------------------------

#include "OSGLog.h"
#include <typeinfo>

OSG_BEGIN_NAMESPACE

/*! \class detail::NormalizeFunc

    NormalizeFunc is used as a step in the conversion process, when getting
    or setting elements of certain GeoVectorProperties.
    It makes a distinction between an "in" conversion and an "out" conversion,
    where the former is used when setting an element, while the latter is used
    when getting an element.
    
    \param ValueTypeT Type of the value that is normalized.
    \param DirectionTagT Tag to designate the direction of the conversion,
        this must be one of GeoConvertInTag or GeoConvertOutTag.
*/

/*==========================  PUBLIC  =================================*/

/*! Normalize the given value, using the given scale factor and offset.
    Depending on the template parameter DirectionTagT this function
    forwards to the appropriate doNormalize function.

    \param[in] val Value to normalize.
    \param[in] scale Scaling factor applied to the value.
    \param[in] offset Offset applied to the value.
    \return The normalized value.
 */
template <class ValueTypeT, class DirectionTagT>
inline ValueTypeT
detail::NormalizeFunc<ValueTypeT, DirectionTagT>::normalize(
    const ValueType& val, const Real64 scale, const Real64 offset)
{
    FDEBUG(("detail::NormalizeFunc::normalize\n"));
    FPDEBUG(("\t ValueTypeT: %s\n",    typeid(ValueType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));

    return doNormalize(val, scale, offset, DirectionTag());
}

/*==========================  PRIVATE  =================================*/

/*! Apply an "in" normalization on the given value.
    The return value is computed as <tt>(scale * val) + offset</tt>.
    
    \param[in] val Value to normalize.
    \param[in] scale Scaling factor applied to the value.
    \param[in] offset Offset applied to the value.
    \return The normalized value.
 */
template <class ValueTypeT, class DirectionTagT>
inline ValueTypeT
detail::NormalizeFunc<ValueTypeT, DirectionTagT>::doNormalize(
    const ValueType&       val, const Real64 scale, const Real64 offset,
    const GeoConvertInTag&)
{
    FDEBUG(("detail::NormalizeFunc::doNormalize\n"));
    FPDEBUG(("\t ValueTypeT: %s\n",    typeid(ValueType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));

    return static_cast<ValueType>((scale * val) + offset);
}

/*! Apply an "out" normalization on the given value.
    The return value is computed as <tt>(val - offset) / scale</tt>.
    
    \param[in] val Value to normalize.
    \param[in] scale Scaling factor applied to the value.
    \param[in] offset Offset applied to the value.
    \return The normalized value.
 */
template <class ValueTypeT, class DirectionTagT>
inline ValueTypeT
detail::NormalizeFunc<ValueTypeT, DirectionTagT>::doNormalize(
    const ValueType&        val, const Real64 scale, const Real64 offset,
    const GeoConvertOutTag&)
{
    FDEBUG(("detail::NormalizeFunc::doNormalize\n"));
    FPDEBUG(("\t ValueTypeT: %s\n",    typeid(ValueType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));

    return static_cast<ValueType>((val - offset) / scale);
}

/*! \class detail::GeoConvertFuncs

    Converts between two Vec, Pnt or Color types and optionally applies
    normalization.
    The meaning of the template parameters is as follows:
    
    \param DestTypeT Type to convert to - the destination type.
    \param SourceTypeT Type to convert from - the source type.
    \param DirectionTagT Tag to designate the direction of the conversion,
        this must be one of GeoConvertInTag or GeoConvertOutTag.
    \param NormalizeV A bool to enable or disable normalization for
        the conversion.
 */

/*==========================  PUBLIC  =================================*/

/*--------------------------- convert ---------------------------------*/

/*! Converts from src to dest, the template parameters DirectionTagT and
    NormalizeV determine if this is a "in" or "out" conversion and if
    normalization is applied in the process.

    \param[out] dest Converted value.
    \param[in] src Value to convert.
    \param[in] scale Scaling factor for normalization.
    \param[in] offset Offset for normalization.
 */
template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convert(
    DestType& dest,  const SourceType& src,
    Real64    scale,       Real64      offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convert\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));

    convert(SameType(), NormType(), dest, src, scale, offset);
}

/*------------------------- convertCustom -----------------------------*/

/*! Converts from src to dest, the template parameters DirectionTagT and
    NormalizeV determine if this is a "in" or "out" conversion and if
    normalization is applied in the process.

    \param[out] dest Converted value.
    \param[in] src Value to convert.
    \param[in] scale Scaling factor for normalization.
    \param[in] offset Offset for normalization.
 */
template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convertCustom(
    DestType& dest,  const SourceType& src,
    Real64    scale,       Real64      offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convertCustom\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));

    convertCustom(SameType(), NormType(), dest, src, scale, offset);
}

/*==========================  PRIVATE  =================================*/

/*--------------------------- convert ----------------------------------*/

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convert(
    const boost::false_type&,       const boost::false_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convert\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest != Source\n"));
    FPDEBUG(("\t\t Direct\n"));

    if(SourceType::_uiSize >= DestType::_uiSize)
    {
        UInt32 i;
        for(i = 0; i < DestType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(src[i]);
        }
    }
    else
    {
        UInt32 i;
        for(i = 0; i < SourceType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(src[i]);
        }
        for(; i < DestType::_uiSize; ++i)
            dest[i] = DestType::Null[i];
    }
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convert(
    const boost::false_type&,       const boost::true_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convert\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest != Source\n"));
    FPDEBUG(("\t\t Normalize\n"));

    if(SourceType::_uiSize >= DestType::_uiSize)
    {
        UInt32 i;
        for(i = 0; i < DestType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    NormSourceFunc::normalize(src[i], scale, offset));
        }
    }
    else
    {
        UInt32 i;
        for(i = 0; i < SourceType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    NormSourceFunc::normalize(src[i], scale, offset));
        }
        for(; i < DestType::_uiSize; ++i)
            dest[i] = NormDestFunc::normalize(DestType::Null[i], scale, offset);
    }
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convert(
    const boost::true_type&,        const boost::false_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convert\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest == Source\n"));
    FPDEBUG(("\t\t Direct\n"));

    dest = src;
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convert(
    const boost::true_type&,        const boost::true_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convert\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest == Source\n"));
    FPDEBUG(("\t\t Normalize\n"));

    for(UInt32 i = 0; i < SourceType::_uiSize; ++i)
    {
        dest[i] = static_cast<typename DestType::ValueType>(
                NormSourceFunc::normalize(src[i], scale, offset));
    }
}

/*------------------------ convertCustom -------------------------------*/

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convertCustom(
    const boost::false_type&,       const boost::false_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convertCustom\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest != Source\n"));
    FPDEBUG(("\t\t Direct\n"));

    if(SourceType::_uiSize >= DestType::_uiSize)
    {
        UInt32 i;
        for(i = 0; i < DestType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    src[i].getValue());
        }
    }
    else
    {
        UInt32 i;
        for(i = 0; i < SourceType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    src[i].getValue());
        }
        for(; i < DestType::_uiSize; ++i)
            dest[i] = DestType::Null[i];
    }
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convertCustom(
    const boost::false_type&,       const boost::true_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convertCustom\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest != Source\n"));
    FPDEBUG(("\t\t Normalize\n"));

    if(SourceType::_uiSize >= DestType::_uiSize)
    {
        UInt32 i;
        for(i = 0; i < DestType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    NormSourceFunc::normalize(src[i].getValue(), scale, 
offset));
        }
    }
    else
    {
        UInt32 i;
        for(i = 0; i < SourceType::_uiSize; ++i)
        {
            dest[i] = static_cast<typename DestType::ValueType>(
                    NormSourceFunc::normalize(src[i].getValue(), scale, 
offset));
        }
        for(; i < DestType::_uiSize; ++i)
            dest[i] = NormDestFunc::normalize(DestType::Null[i], scale, offset);
    }
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convertCustom(
    const boost::true_type&,        const boost::false_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convertCustom\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest == Source\n"));
    FPDEBUG(("\t\t Direct\n"));

    dest = src;
}

template <class DestTypeT,     class SourceTypeT,
          class DirectionTagT, bool  NormalizeV>
inline void
detail::GeoConvertFuncs<DestTypeT,     SourceTypeT,
                        DirectionTagT, NormalizeV  >::convertCustom(
    const boost::true_type&,        const boost::true_type&,
          DestType&          dest,  const SourceType&        src,
          Real64             scale,       Real64             offset)
{
    FDEBUG(("detail::GeoConvertFuncs::convertCustom\n"));
    FPDEBUG(("\t DestTypeT: %s\n",     typeid(DestType).name()));
    FPDEBUG(("\t SourceTypeT: %s\n",   typeid(SourceType).name()));
    FPDEBUG(("\t DirectionTagT: %s\n", typeid(DirectionTag).name()));
    FPDEBUG(("\t NormalizeV: %s\n",    (NormalizeV ? "true" : "false")));
    FPDEBUG(("\t\t Dest == Source\n"));
    FPDEBUG(("\t\t Normalize\n"));

    for(UInt32 i = 0; i < SourceType::_uiSize; ++i)
    {
        dest[i] = static_cast<typename DestType::ValueType>(
                NormSourceFunc::normalize(src[i].getValue(), scale, offset));
    }
}

// GeoConvertCustomHelper

template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
inline void
detail::GeoConvertCustomHelper<ExternalTypeT, StoredTypeT, 
NormalizeV>::convertIn(
    StoredType& dest,  const ExternalType& src,
    Real64      scale,       Real64        offset)
{
    typedef detail::GeoConvertFuncs<StoredType,      ExternalType,
                                    GeoConvertInTag, NormalizeV   > GCFunc;

    GCFunc::convert(dest, src, scale, offset);
}

template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
inline void
detail::GeoConvertCustomHelper<ExternalTypeT, StoredTypeT, 
NormalizeV>::convertOut(
    ExternalType& dest,  const StoredType& src,
    Real64        scale,       Real64      offset)
{
    typedef detail::GeoConvertFuncs<ExternalType,     StoredType,
                                    GeoConvertOutTag, NormalizeV  > GCFunc;

    GCFunc::convertCustom(dest, src, scale, offset);
}

// GeoConvertImpl

template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
inline void
detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, NormalizeV>::convertIn(
    StoredType& dest,  const ExternalType& src,
    Real64      scale,      Real64        offset)
{
    typedef detail::GeoConvertFuncs<StoredType,      ExternalType,
                                    GeoConvertInTag, NormalizeV   > GCFunc;

    GCFunc::convert(dest, src, scale, offset);
}

template <class ExternalTypeT, class StoredTypeT, bool NormalizeV>
inline void
detail::GeoConvertImpl<ExternalTypeT, StoredTypeT, NormalizeV>::convertOut(
    ExternalType& dest,  const StoredType& src,
    Real64        scale,       Real64      offset)
{
    typedef detail::GeoConvertFuncs<ExternalType,     StoredType,
                                    GeoConvertOutTag, NormalizeV  > GCFunc;

    GCFunc::convert(dest, src, scale, offset);
}

OSG_END_NAMESPACE

#define OSGGEOVECTORPROPERTYCONVERSION_INLINE_CVSID "@(#)$Id: $"
/*---------------------------------------------------------------------------*\
 *                                OpenSG                                     *
 *                                                                           *
 *                                                                           *
 *               Copyright (C) 2000-2006 by the OpenSG Forum                 *
 *                                                                           *
 *   contact: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]          *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                License                                    *
 *                                                                           *
 * This library is free software; you can redistribute it and/or modify it   *
 * under the terms of the GNU Library General Public License as published    *
 * by the Free Software Foundation, version 2.                               *
 *                                                                           *
 * This library is distributed in the hope that it will be useful, but       *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
 * Library General Public License for more details.                          *
 *                                                                           *
 * You should have received a copy of the GNU Library General Public         *
 * License along with this library; if not, write to the Free Software       *
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
 *                                                                           *
\*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*\
 *                                Changes                                    *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
 *                                                                           *
\*---------------------------------------------------------------------------*/

#define OSG_DEBUG

#include <UnitTest++.h>

#include <OpenSG/OSGVector.h>
#include <OpenSG/OSGColor.h>
//#include <OpenSG/OSGGeoVectorPropertyConversion.h>
#include <OpenSG/OSGGeoVectorProperty.h>

namespace {

TEST(GeoConvert_Vec3_to_Vec3ld)
{
    OSG::Vec3b  v3b(1, 2, 3);
    OSG::Vec3s  v3s(1, 2, 3);
    OSG::Vec3f  v3f(1.0, 2.0, 3.0);
    OSG::Vec3d  v3d(1.0, 2.0, 3.0);
    OSG::Vec3ld v3ld(1.0, 2.0, 3.0);
    OSG::Vec3fx v3fx(1.0f, 2.0f, 3.0f);
    
    OSG::Vec3ld v3ld_dest;
    OSG::Vec3ld v3ld_ref(1.0, 2.0, 3.0);
    
    OSG::GeoConvert::convertIn(v3ld_dest, v3b);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertIn(v3ld_dest, v3s);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertIn(v3ld_dest, v3f);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertIn(v3ld_dest, v3d);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertIn(v3ld_dest, v3ld);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
//     OSG::GeoConvert::convertIn(v3ld_dest, v3fx);
//     CHECK(v3ld_dest[0] == v3ld_ref[0]);
//     CHECK(v3ld_dest[1] == v3ld_ref[1]);
//     CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertOut(v3ld_dest, v3b);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertOut(v3ld_dest, v3s);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertOut(v3ld_dest, v3f);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertOut(v3ld_dest, v3d);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvert::convertOut(v3ld_dest, v3ld);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
//     OSG::GeoConvert::convertOut(v3ld_dest, v3fx);
//     CHECK(v3ld_dest[0] == v3ld_ref[0]);
//     CHECK(v3ld_dest[1] == v3ld_ref[1]);
//     CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3b);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3s);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3f);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3d);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3ld);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3ld_dest, v3fx);
//     CHECK(v3ld_dest[0] == v3ld_ref[0]);
//     CHECK(v3ld_dest[1] == v3ld_ref[1]);
//     CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3b);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3s);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3f);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3d);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
    OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3ld);
    CHECK(v3ld_dest[0] == v3ld_ref[0]);
    CHECK(v3ld_dest[1] == v3ld_ref[1]);
    CHECK(v3ld_dest[2] == v3ld_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3ld_dest, v3fx);
//     CHECK(v3ld_dest[0] == v3ld_ref[0]);
//     CHECK(v3ld_dest[1] == v3ld_ref[1]);
//     CHECK(v3ld_dest[2] == v3ld_ref[2]);
}

TEST(GeoConvert_Vec3_to_Vec3fx)
{
    OSG::Vec3b  v3b(1, 2, 3);
    OSG::Vec3s  v3s(1, 2, 3);
    OSG::Vec3f  v3f(1.0, 2.0, 3.0);
    OSG::Vec3d  v3d(1.0, 2.0, 3.0);
    OSG::Vec3ld v3ld(1.0, 2.0, 3.0);
    OSG::Vec3fx v3fx(1.0f, 2.0f, 3.0f);
    
    OSG::Vec3fx v3fx_dest;
    OSG::Vec3fx v3fx_ref(1.0f, 2.0f, 3.0f);
    
//     OSG::GeoConvert::convertIn(v3fx_dest, v3b);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertIn(v3fx_dest, v3s);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
    OSG::GeoConvert::convertIn(v3fx_dest, v3f);
    CHECK(v3fx_dest[0] == v3fx_ref[0]);
    CHECK(v3fx_dest[1] == v3fx_ref[1]);
    CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertIn(v3fx_dest, v3d);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertIn(v3fx_dest, v3ld);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
    OSG::GeoConvert::convertIn(v3fx_dest, v3fx);
    CHECK(v3fx_dest[0] == v3fx_ref[0]);
    CHECK(v3fx_dest[1] == v3fx_ref[1]);
    CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertOut(v3fx_dest, v3b);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertOut(v3fx_dest, v3s);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
    OSG::GeoConvert::convertOut(v3fx_dest, v3f);
    CHECK(v3fx_dest[0] == v3fx_ref[0]);
    CHECK(v3fx_dest[1] == v3fx_ref[1]);
    CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertOut(v3fx_dest, v3d);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvert::convertOut(v3fx_dest, v3ld);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
    OSG::GeoConvert::convertOut(v3fx_dest, v3fx);
    CHECK(v3fx_dest[0] == v3fx_ref[0]);
    CHECK(v3fx_dest[1] == v3fx_ref[1]);
    CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3b);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3s);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3f);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3d);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3ld);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertIn(v3fx_dest, v3fx);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3b);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3s);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3f);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3d);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3ld);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
    
//     OSG::GeoConvertNormalize::convertOut(v3fx_dest, v3fx);
//     CHECK(v3fx_dest[0] == v3fx_ref[0]);
//     CHECK(v3fx_dest[1] == v3fx_ref[1]);
//     CHECK(v3fx_dest[2] == v3fx_ref[2]);
}

}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to