fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / FileIO / Collada / OSGColladaOptions.h
bloba84c6b5d0aa43ef31d09e9bdee7ca3af8a9f8988
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2009 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGCOLLADAOPTIONS_H_
40 #define _OSGCOLLADAOPTIONS_H_
42 #ifdef __sgi
43 #pragma once
44 #endif
46 /*! \file OSGColladaOptions.h
47 \ingroup GrpLoader
49 #include "OSGConfig.h"
51 #if defined(OSG_WITH_COLLADA) || defined(OSG_DO_DOC)
53 #include "OSGFileIODef.h"
54 #include "OSGMemoryObject.h"
55 #include "OSGRefCountPtr.h"
56 #include "OSGTransitPtr.h"
57 #include "OSGIOFileTypeBase.h"
59 OSG_BEGIN_NAMESPACE
61 /*! \ingroup GrpFileIOCollada
62 \nohierarchy
65 class OSG_FILEIO_DLLMAPPING ColladaOptions : public MemoryObject
67 /*========================== PUBLIC =================================*/
68 public:
69 /*---------------------------------------------------------------------*/
70 /*! \name Types */
71 /*! \{ */
73 typedef MemoryObject Inherited;
74 typedef ColladaOptions Self;
76 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaOptions);
78 typedef IOFileTypeBase::OptionSet OptionSet;
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Create */
83 /*! \{ */
85 static ObjTransitPtr create(void);
87 /*! \} */
88 /*---------------------------------------------------------------------*/
89 /*! \name Options */
90 /*! \{ */
92 virtual void parseOptions(const OptionSet &optSet);
94 /*! \} */
95 /*---------------------------------------------------------------------*/
96 /*! \name Options */
97 /*! \{ */
99 template <class ValueTypeT>
100 bool getOptionAs(const std::string &name,
101 ValueTypeT &value);
103 /*! \} */
104 /*---------------------------------------------------------------------*/
105 /*! \name Options */
106 /*! \{ */
108 bool getInvertTransparency (void ) const;
109 void setInvertTransparency (bool value);
111 bool getMergeTransforms (void ) const;
112 void setMergeTransforms (bool value);
114 bool getCreateNameAttachments (void ) const;
115 void setCreateNameAttachments (bool value);
117 bool getLoadAnimations (void ) const;
118 void setLoadAnimations (bool value);
120 bool getLoadLights (void ) const;
121 void setLoadLights (bool value);
123 bool getTryMergeInvalidIndices(void ) const;
124 void setTryMergeInvalidIndices(bool value);
126 /*! \} */
127 /*========================= PROTECTED ===============================*/
129 protected:
131 /*---------------------------------------------------------------------*/
132 /*! \name Constructors/Destructor */
133 /*! \{ */
135 ColladaOptions(void);
136 virtual ~ColladaOptions(void);
138 /*! \} */
139 /*---------------------------------------------------------------------*/
141 bool _invertTransparency;
142 bool _mergeTransforms;
143 bool _createNameAttachments;
144 bool _loadAnimations;
145 bool _loadLights;
146 bool _tryMergeInvalidIndices;
148 // remaining options
149 OptionSet _oOptions;
153 OSG_GEN_MEMOBJPTR(ColladaOptions);
155 OSG_END_NAMESPACE
157 #include "OSGColladaOptions.inl"
159 #endif // OSG_WITH_COLLADA
161 #endif // _OSGCOLLADAOPTIONS_H_