-#include <osg/Vec4f>
-#include <osg/Vec4d>
-
-template<typename T>
-struct SGVec4Storage {
- /// Readonly raw storage interface
- const T (&data(void) const)[4]
- { return _data; }
- /// Readonly raw storage interface
- T (&data(void))[4]
- { return _data; }
-
- void osg() const
- { }
-
-private:
- T _data[4];
-};
-
-template<>
-struct SGVec4Storage<float> : public osg::Vec4f {
- /// Access raw data by index, the index is unchecked
- const float (&data(void) const)[4]
- { return osg::Vec4f::_v; }
- /// Access raw data by index, the index is unchecked
- float (&data(void))[4]
- { return osg::Vec4f::_v; }
-
- const osg::Vec4f& osg() const
- { return *this; }
- osg::Vec4f& osg()
- { return *this; }
-};
-
-template<>
-struct SGVec4Storage<double> : public osg::Vec4d {
- /// Access raw data by index, the index is unchecked
- const double (&data(void) const)[4]
- { return osg::Vec4d::_v; }
- /// Access raw data by index, the index is unchecked
- double (&data(void))[4]
- { return osg::Vec4d::_v; }
-
- const osg::Vec4d& osg() const
- { return *this; }
- osg::Vec4d& osg()
- { return *this; }
-};
-