1 /* 2 Copyright (c) 2008-2009 NetAllied Systems GmbH 3 4 This file is part of COLLADAStreamWriter. 5 6 Licensed under the MIT Open Source License, 7 for details please see LICENSE file or the website 8 http://www.opensource.org/licenses/mit-license.php 9 */ 10 11 #include "COLLADASWStreamWriter.h" 12 #include "COLLADASWLibraryVisualScenes.h" 13 #include "COLLADASWConstants.h" 14 #include "COLLADABUUtils.h" 15 16 namespace COLLADASW 17 { 18 19 //--------------------------------------------------------------- LibraryVisualScenes(COLLADASW::StreamWriter * streamWriter)20 LibraryVisualScenes::LibraryVisualScenes ( COLLADASW::StreamWriter *streamWriter ) 21 : Library ( streamWriter, CSWC::CSW_ELEMENT_LIBRARY_VISUAL_SCENES ) 22 {} 23 24 25 //--------------------------------------------------------------- openVisualScene(const String & nodeId,const String & nodeName)26 void LibraryVisualScenes::openVisualScene ( const String &nodeId, const String &nodeName ) 27 { 28 openLibrary(); 29 mCurrentVisualSceneCloser = mSW->openElement ( CSWC::CSW_ELEMENT_VISUAL_SCENE ); 30 31 if ( !nodeId.empty() ) 32 mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_ID, nodeId ); 33 34 if ( !nodeName.empty() ) 35 mSW->appendAttribute ( CSWC::CSW_ATTRIBUTE_NAME, nodeName ); 36 } 37 38 39 //--------------------------------------------------------------- closeVisualScene()40 void LibraryVisualScenes::closeVisualScene() 41 { 42 mCurrentVisualSceneCloser.close(); 43 } 44 45 } //namespace COLLADASW 46