[21] | 1 | /** |
---|
| 2 | * This source file is part of OgreColladaPlugin |
---|
| 3 | * an addon for OGRE (Object-oriented Graphics Rendering Engine) |
---|
| 4 | * For the latest info, see http://www.ogre3d.org/ |
---|
| 5 | * |
---|
| 6 | * This program is free software; you can redistribute it and/or modify it under |
---|
| 7 | * the terms of the GNU Lesser General Public License as published by the Free Software |
---|
| 8 | * Foundation; either version 2 of the License, or (at your option) any later |
---|
| 9 | * version. |
---|
| 10 | |
---|
| 11 | * This program is distributed in the hope that it will be useful, but WITHOUT |
---|
| 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
| 13 | * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
---|
| 14 | |
---|
| 15 | * You should have received a copy of the GNU Lesser General Public License along with |
---|
| 16 | * this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
| 17 | * Place - Suite 330, Boston, MA 02111-1307, USA, or go to |
---|
| 18 | * http://www.gnu.org/copyleft/lesser.txt. |
---|
| 19 | * |
---|
| 20 | * @authors Philipp Hartl, Jeff Doyle (nfz) |
---|
| 21 | * @see README |
---|
| 22 | */ |
---|
| 23 | |
---|
| 24 | #include "OgreColladaAsset.h" |
---|
| 25 | #include "OgreColladaUtils.h" |
---|
| 26 | #include "OgreColladaSyntax.h" |
---|
| 27 | |
---|
| 28 | namespace Ogre |
---|
| 29 | { |
---|
| 30 | //----------------------------------------------------------------------- |
---|
| 31 | ColladaAsset::~ColladaAsset() |
---|
| 32 | { |
---|
| 33 | |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | //----------------------------------------------------------------------- |
---|
| 37 | bool ColladaAsset::doImport() |
---|
| 38 | { |
---|
| 39 | // iterate through child elements and extract data |
---|
| 40 | // only care about getting <up_axis> for now |
---|
| 41 | xmlNode *upaxis = ColladaUtils::getChildByTagName(mNode, CS_ELM_UPAXIS); |
---|
| 42 | if (upaxis) |
---|
| 43 | { |
---|
| 44 | String content = ColladaUtils::getContentDirect(upaxis); |
---|
| 45 | if (content == CS_VAL_ASSET_UPAXIS_X) mUpAxis = X_UP; |
---|
| 46 | else if (content == CS_VAL_ASSET_UPAXIS_Y) mUpAxis = Y_UP; |
---|
| 47 | else if (content == CS_VAL_ASSET_UPAXIS_Z) mUpAxis = Z_UP; |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | return true; |
---|
| 51 | } |
---|
| 52 | } |
---|