changed: gcc8 base update
[opensg.git] / Source / System / FileIO / Collada / OSGColladaInstanceEffect.h
blob26c49943de56d238b75c9fe976dacbe141ef684e
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 _OSGCOLLADAINSTANCEEFFECT_H_
40 #define _OSGCOLLADAINSTANCEEFFECT_H_
42 #include "OSGConfig.h"
44 #if defined(OSG_WITH_COLLADA) || defined(OSG_DO_DOC)
46 #include "OSGColladaInstanceElement.h"
47 #include "OSGColladaEffect.h"
48 #include "OSGColladaElementFactoryHelper.h"
49 #include "OSGMaterial.h"
51 #include <dom/domEffect.h>
53 OSG_BEGIN_NAMESPACE
55 /*! \ingroup GrpFileIOCollada
56 \nohierarchy
59 class OSG_FILEIO_DLLMAPPING ColladaInstanceEffect
60 : public ColladaInstanceElement
62 /*========================== PUBLIC =================================*/
63 public:
64 /*---------------------------------------------------------------------*/
65 /*! \name Types */
66 /*! \{ */
68 typedef ColladaInstanceElement Inherited;
69 typedef ColladaInstanceEffect Self;
71 OSG_GEN_INTERNAL_MEMOBJPTR(ColladaInstanceEffect);
73 // map <texture texcoord="Symbol"> to material texture slot
74 typedef std::map<std::string, UInt32> TCSymbolToSlotMap;
75 typedef TCSymbolToSlotMap::iterator TCSymbolToSlotMapIt;
76 typedef TCSymbolToSlotMap::const_iterator TCSymbolToSlotMapConstIt;
78 /*! \} */
79 /*---------------------------------------------------------------------*/
80 /*! \name Craete */
81 /*! \{ */
83 static ColladaElementTransitPtr
84 create(daeElement *elem, ColladaGlobal *global);
86 /*! \} */
87 /*---------------------------------------------------------------------*/
88 /*! \name Reading */
89 /*! \{ */
91 virtual void read(ColladaElement *colElemParent);
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name Access */
96 /*! \{ */
98 virtual ColladaEffect *getTargetElem (void) const;
99 virtual domEffect *getTargetDOMElem(void) const;
101 const TCSymbolToSlotMap &getTCMap (void) const;
102 TCSymbolToSlotMap &editTCMap(void);
104 bool findTC (const std::string &tcSymbol,
105 UInt32 &texSlot ) const;
107 /*! \} */
108 /*========================= PROTECTED ===============================*/
109 protected:
110 /*---------------------------------------------------------------------*/
111 /*! \name Constructors/Destructor */
112 /*! \{ */
114 ColladaInstanceEffect(daeElement *elem, ColladaGlobal *global);
115 virtual ~ColladaInstanceEffect(void );
117 /*! \} */
118 /*---------------------------------------------------------------------*/
120 static ColladaElementRegistrationHelper _regHelper;
122 TCSymbolToSlotMap _tcMap;
125 OSG_GEN_MEMOBJPTR(ColladaInstanceEffect);
127 OSG_END_NAMESPACE
129 // #include "OSGColladaInstanceEffect.inl"
131 #endif // OSG_WITH_COLLADA
133 #endif // _OSGCOLLADAINSTANCEEFFECT_H_