2012-03-22 01:36:20 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
2003-01-22 00:45:36 +08:00
|
|
|
*
|
2012-03-22 01:36:20 +08:00
|
|
|
* This library is open source and may be redistributed and/or modified under
|
|
|
|
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
2003-01-22 00:45:36 +08:00
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
2012-03-22 01:36:20 +08:00
|
|
|
*
|
2003-01-22 00:45:36 +08:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2012-03-22 01:36:20 +08:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2003-01-22 00:45:36 +08:00
|
|
|
* OpenSceneGraph Public License for more details.
|
|
|
|
*/
|
2002-06-27 18:50:19 +08:00
|
|
|
#include <osg/Array>
|
|
|
|
|
|
|
|
using namespace osg;
|
|
|
|
|
2007-08-26 18:27:31 +08:00
|
|
|
static const char* s_ArrayNames[] =
|
2002-06-27 18:50:19 +08:00
|
|
|
{
|
2013-07-02 00:15:25 +08:00
|
|
|
"Array", // 0
|
|
|
|
"ByteArray", // 1
|
|
|
|
"ShortArray", // 2
|
|
|
|
"IntArray", // 3
|
|
|
|
|
|
|
|
"UByteArray", // 4
|
|
|
|
"UShortArray", // 5
|
|
|
|
"UIntArray", // 6
|
|
|
|
|
|
|
|
"FloatArray", // 7
|
|
|
|
"DoubleArray", // 8
|
|
|
|
|
|
|
|
"Vec2bArray", // 9
|
|
|
|
"Vec3bArray", //10
|
|
|
|
"Vec4bArray", //11
|
|
|
|
|
|
|
|
"Vec2sArray", //12
|
|
|
|
"Vec3sArray", //13
|
|
|
|
"Vec4sArray", //14
|
|
|
|
|
|
|
|
"Vec2iArray", //15
|
|
|
|
"Vec3iArray", //16
|
|
|
|
"Vec4iArray", //17
|
|
|
|
|
|
|
|
"Vec2ubArray", //18
|
|
|
|
"Vec3ubArray", //19
|
|
|
|
"Vec4ubArray", //20
|
|
|
|
|
|
|
|
"Vec2usArray", //21
|
|
|
|
"Vec3usArray", //22
|
|
|
|
"Vec4usArray", //23
|
|
|
|
|
|
|
|
"Vec2uiArray", //24
|
|
|
|
"Vec3uiArray", //25
|
|
|
|
"Vec4uiArray", //26
|
|
|
|
|
|
|
|
"Vec2Array", //27
|
|
|
|
"Vec3Array", //28
|
|
|
|
"Vec4Array", //29
|
|
|
|
|
|
|
|
"Vec2dArray", //30
|
|
|
|
"Vec3dArray", //31
|
|
|
|
"Vec4dArray", //32
|
|
|
|
|
|
|
|
"MatrixArray", //33
|
|
|
|
"MatrixdArray", //34
|
2002-06-27 18:50:19 +08:00
|
|
|
};
|
|
|
|
|
2002-06-27 21:15:34 +08:00
|
|
|
const char* Array::className() const
|
2002-06-27 18:50:19 +08:00
|
|
|
{
|
2007-12-04 22:44:21 +08:00
|
|
|
if (_arrayType>=ArrayType && _arrayType<=Vec4dArrayType)
|
2002-06-27 18:50:19 +08:00
|
|
|
return s_ArrayNames[_arrayType];
|
|
|
|
else
|
2005-12-08 22:08:09 +08:00
|
|
|
return "UnknownArray";
|
2002-06-27 18:50:19 +08:00
|
|
|
}
|
|
|
|
|