fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / FileIO / Collada / OSGColladaMaterial.h
blobf4f3f502bb508bec0791f78f27452d9dbdb9d717
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 _OSGCOLLADAMATERIAL_H_
40 #define _OSGCOLLADAMATERIAL_H_
42 #include "OSGConfig.h"
44 #if defined(OSG_WITH_COLLADA) || defined(OSG_DO_DOC)
46 #include "OSGColladaInstantiableElement.h"
47 #include "OSGColladaElementFactoryHelper.h"
48 #include "OSGColladaInstInfo.h"
49 #include "OSGMaterial.h"
51 OSG_BEGIN_NAMESPACE
53 // forward decl
54 class ColladaInstanceMaterial;
56 // forward decl
57 class ColladaInstanceMaterial;
59 /*! \ingroup GrpFileIOCollada
60 \nohierarchy
63 class OSG_FILEIO_DLLMAPPING ColladaMaterial : public ColladaInstantiableElement
65 /*========================== PUBLIC =================================*/
66 public:
67 /*---------------------------------------------------------------------*/
68 /*! \name Types */
69 /*! \{ */
71 typedef ColladaInstantiableElement Inherited;
72 typedef ColladaMaterial Self;
74 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaMaterial);
76 class ColladaMaterialInstInfo : public ColladaInstInfo
78 /*========================== PUBLIC =============================*/
79 public:
80 /*-----------------------------------------------------------------*/
81 /*! \name Types */
82 /*! \{ */
84 typedef ColladaInstInfo Inherited;
85 typedef ColladaMaterialInstInfo Self;
87 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaMaterialInstInfo);
89 /*! \} */
90 /*-----------------------------------------------------------------*/
91 /*! \name Create */
92 /*! \{ */
94 static ColladaInstInfoTransitPtr
95 create(ColladaElement *colInstParent,
96 ColladaInstanceMaterial *colInst );
98 /*! \} */
99 /*-----------------------------------------------------------------*/
100 /*! \name Process */
101 /*! \{ */
103 virtual void process(void);
105 /*! \} */
106 /*========================= PROTECTED ===========================*/
107 protected:
108 /*-----------------------------------------------------------------*/
109 /*! \name Constructors/Destructor */
110 /*! \{ */
112 ColladaMaterialInstInfo(
113 ColladaElement *colInstParent,
114 ColladaInstanceMaterial *colInst );
115 virtual ~ColladaMaterialInstInfo(void );
117 /*! \} */
118 /*-----------------------------------------------------------------*/
121 OSG_GEN_MEMOBJPTR(ColladaMaterialInstInfo);
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name Create */
126 /*! \{ */
128 static ColladaElementTransitPtr
129 create(daeElement *elem, ColladaGlobal *global);
131 /*! \} */
132 /*---------------------------------------------------------------------*/
133 /*! \name Reading */
134 /*! \{ */
136 virtual void read (ColladaElement *colElemParent);
137 virtual Material *createInstance(ColladaInstInfo *colInstInfo );
139 /*! \} */
140 /*========================= PROTECTED ===============================*/
141 protected:
142 /*---------------------------------------------------------------------*/
143 /*! \name Constructors/Destructor */
144 /*! \{ */
146 ColladaMaterial(daeElement *elem, ColladaGlobal *global);
147 virtual ~ColladaMaterial(void );
149 /*! \} */
150 /*---------------------------------------------------------------------*/
152 static ColladaElementRegistrationHelper _regHelper;
155 OSG_GEN_MEMOBJPTR(ColladaMaterial);
157 OSG_END_NAMESPACE
159 #endif // OSG_WITH_COLLADA
161 #endif // _OSGCOLLADAMATERIAL_H_