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 | * @author Philipp Hartl |
---|
21 | * @see README |
---|
22 | */ |
---|
23 | |
---|
24 | #include "OgreColladaEntity.h" |
---|
25 | #include "OgreColladaSyntax.h" |
---|
26 | #include "OgreColladaUtils.h" |
---|
27 | |
---|
28 | namespace Ogre |
---|
29 | { |
---|
30 | //------------------------------------------------------------------------- |
---|
31 | void ColladaEntity::initialise(void) |
---|
32 | { |
---|
33 | if (mNode != NULL) |
---|
34 | { |
---|
35 | mId = ColladaUtils::getProperty(mNode, CS_ATR_ID); |
---|
36 | mName = ColladaUtils::getProperty(mNode, CS_ATR_NAME); |
---|
37 | |
---|
38 | if (!mId.length() && mName.length()) mId = mName; |
---|
39 | else if (mId.length() && !mName.length()) mName = mId; |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | } |
---|