Make Array::className() support all Array::Type's
Array::className() had fallen out of date with respect to Array::Type. This commit updates it, and adds documentation and a debug message to serve as a reminder for future additions of values to Array::Type.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
#include <osg/Array>
|
||||
#include <osg/Notify>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -62,13 +63,20 @@ static const char* s_ArrayNames[] =
|
||||
|
||||
"MatrixArray", //33
|
||||
"MatrixdArray", //34
|
||||
|
||||
"QuatArray", //35
|
||||
|
||||
"UInt64Array", //36
|
||||
"Int64Array", //37
|
||||
};
|
||||
|
||||
const char* Array::className() const
|
||||
{
|
||||
if (_arrayType>=ArrayType && _arrayType<=Vec4dArrayType)
|
||||
if (_arrayType>=ArrayType && _arrayType<=LastArrayType)
|
||||
return s_ArrayNames[_arrayType];
|
||||
else
|
||||
else {
|
||||
OSG_DEBUG << "Array::className(): Unknown array type " << _arrayType << std::endl;
|
||||
return "UnknownArray";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user