/* * Copyright 2006 Sony Computer Entertainment Inc. * * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: * http://research.scea.com/scea_shared_source_license.html * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. See the License for the specific language governing permissions and limitations under the * License. */ #ifndef _DOM_SRC_CONV_H_ #define _DOM_SRC_CONV_H_ #include #include class domSource; namespace osgdae { /** @class domSourceReader @brief Convert sources from DAE to OSG arrays */ class domSourceReader { public: enum ArrayType {None,Float,Vec2,Vec3,Vec4}; public: domSourceReader(); domSourceReader( domSource *src ); ArrayType getArrayType() const { return m_array_type; }; osg::FloatArray* getFloatArray() { return m_float_array.get(); }; osg::Vec2Array* getVec2Array() { return m_vec2_array.get(); }; osg::Vec3Array* getVec3Array() { return m_vec3_array.get(); }; osg::Vec4Array* getVec4Array() { return m_vec4_array.get(); }; int getCount() const { return m_count; }; #define ASSERT_TYPE(type) if (type!=m_array_type) { osg::notify(osg::WARN)<<"Wrong array type requested ("#type" != "< m_float_array; osg::ref_ptr m_vec2_array; osg::ref_ptr m_vec3_array; osg::ref_ptr m_vec4_array; }; } #endif