2006-07-18 23:21:48 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
|
2003-01-22 00:45:36 +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
|
|
|
|
* (at your option) any later version. The full license is in LICENSE file
|
|
|
|
* included with this distribution, and on the openscenegraph.org website.
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* 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
|
|
|
{
|
2002-06-27 21:15:34 +08:00
|
|
|
"Array", // 0
|
2002-06-27 18:50:19 +08:00
|
|
|
"ByteArray", // 1
|
|
|
|
"ShortArray", // 2
|
|
|
|
"IntArray", // 3
|
|
|
|
|
|
|
|
"UByteArray", // 4
|
|
|
|
"UShortArray", // 5
|
|
|
|
"UIntArray", // 6
|
2005-07-15 22:41:19 +08:00
|
|
|
"Vec4ubArray", // 7
|
2002-06-27 18:50:19 +08:00
|
|
|
|
|
|
|
"FloatArray", // 8
|
|
|
|
"Vec2Array", // 9
|
|
|
|
"Vec3Array", // 10
|
2005-07-15 22:41:19 +08:00
|
|
|
"Vec4Array", // 11
|
2005-07-05 23:57:53 +08:00
|
|
|
|
2005-07-15 22:41:19 +08:00
|
|
|
"Vec2sArray", // 12
|
|
|
|
"Vec3sArray", // 13
|
|
|
|
"Vec4sArray", // 14
|
2005-07-05 23:57:53 +08:00
|
|
|
|
2005-07-15 22:41:19 +08:00
|
|
|
"Vec2bArray", // 15
|
|
|
|
"Vec3bArray", // 16
|
|
|
|
"Vec4bArray", // 17
|
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
|
|
|
{
|
2005-07-15 22:41:19 +08:00
|
|
|
if (_arrayType>=ArrayType && _arrayType<=Vec4bArrayType)
|
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
|
|
|
}
|
|
|
|
|