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 #ifndef __COLLADASTREAMWRITER_INSTANCE_CAMERA_H__ 12 #define __COLLADASTREAMWRITER_INSTANCE_CAMERA_H__ 13 14 #include "COLLADASWPrerequisites.h" 15 #include "COLLADASWElementWriter.h" 16 #include "COLLADABUURI.h" 17 18 namespace COLLADASW 19 { 20 21 /** A class that holds informations of an @a \<instance_camera\> element and writes it to stream. */ 22 class InstanceCamera : public ElementWriter 23 { 24 25 private: 26 27 /** The url to the camera information (library_cameras) */ 28 URI mUrl; 29 String mSid; 30 String mName; 31 32 public: 33 /** 34 * Constructor 35 * @param url The url 36 * @param sid The sid 37 * @param name The name 38 */ 39 InstanceCamera ( StreamWriter* streamWriter, const URI& url, const String &sid="", const String &name="" ) ElementWriter(streamWriter)40 : ElementWriter ( streamWriter ) 41 , mUrl ( url ) 42 , mSid ( sid ) 43 , mName ( name ) 44 {} 45 46 /** Returns the url */ getUrl()47 const URI& getUrl() const 48 { 49 return mUrl; 50 } 51 52 /** Returns the sid */ getSid()53 const String& getSid() const 54 { 55 return mSid; 56 } 57 58 /** Returns the name */ getName()59 const String& getName() const 60 { 61 return mName; 62 } 63 64 /** Write the instance camera to the stream*/ 65 void add(); 66 67 }; 68 69 } //namespace COLLADASW 70 71 72 #endif //__COLLADASTREAMWRITER_INSTANCE_CAMERA_H__ 73