1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2009 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
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"
54 class ColladaInstanceMaterial
;
57 class ColladaInstanceMaterial
;
59 /*! \ingroup GrpFileIOCollada
63 class OSG_FILEIO_DLLMAPPING ColladaMaterial
: public ColladaInstantiableElement
65 /*========================== PUBLIC =================================*/
67 /*---------------------------------------------------------------------*/
71 typedef ColladaInstantiableElement Inherited
;
72 typedef ColladaMaterial Self
;
74 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaMaterial
);
76 class ColladaMaterialInstInfo
: public ColladaInstInfo
78 /*========================== PUBLIC =============================*/
80 /*-----------------------------------------------------------------*/
84 typedef ColladaInstInfo Inherited
;
85 typedef ColladaMaterialInstInfo Self
;
87 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaMaterialInstInfo
);
90 /*-----------------------------------------------------------------*/
94 static ColladaInstInfoTransitPtr
95 create(ColladaElement
*colInstParent
,
96 ColladaInstanceMaterial
*colInst
);
99 /*-----------------------------------------------------------------*/
103 virtual void process(void);
106 /*========================= PROTECTED ===========================*/
108 /*-----------------------------------------------------------------*/
109 /*! \name Constructors/Destructor */
112 ColladaMaterialInstInfo(
113 ColladaElement
*colInstParent
,
114 ColladaInstanceMaterial
*colInst
);
115 virtual ~ColladaMaterialInstInfo(void );
118 /*-----------------------------------------------------------------*/
121 OSG_GEN_MEMOBJPTR(ColladaMaterialInstInfo
);
124 /*---------------------------------------------------------------------*/
128 static ColladaElementTransitPtr
129 create(daeElement
*elem
, ColladaGlobal
*global
);
132 /*---------------------------------------------------------------------*/
136 virtual void read (ColladaElement
*colElemParent
);
137 virtual Material
*createInstance(ColladaInstInfo
*colInstInfo
);
140 /*========================= PROTECTED ===============================*/
142 /*---------------------------------------------------------------------*/
143 /*! \name Constructors/Destructor */
146 ColladaMaterial(daeElement
*elem
, ColladaGlobal
*global
);
147 virtual ~ColladaMaterial(void );
150 /*---------------------------------------------------------------------*/
152 static ColladaElementRegistrationHelper _regHelper
;
155 OSG_GEN_MEMOBJPTR(ColladaMaterial
);
159 #endif // OSG_WITH_COLLADA
161 #endif // _OSGCOLLADAMATERIAL_H_