changed: gcc8 base update
[opensg.git] / Source / System / NodeCores / Groups / Base / OSGMultiCore.h
blob9776d4849630ba46bf2152526986c09bf91ff14c
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2006 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 _OSGMULTICORE_H_
40 #define _OSGMULTICORE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGMultiCoreBase.h"
47 OSG_BEGIN_NAMESPACE
49 /*! \brief MultiCore class. See \ref
50 PageSystemMultiCore for a description.
51 \ingroup GrpSystemNodeCoreGroupsCores
52 \ingroup GrpLibOSGSystem
53 \includebasedoc
56 class OSG_SYSTEM_DLLMAPPING MultiCore : public MultiCoreBase
58 protected:
60 /*========================== PUBLIC =================================*/
62 public:
64 typedef MultiCoreBase Inherited;
65 typedef MultiCore Self;
67 /*---------------------------------------------------------------------*/
68 /*! \name Sync */
69 /*! \{ */
71 virtual void changed(ConstFieldMaskArg whichField,
72 UInt32 origin,
73 BitVector details );
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name Transformation */
78 /*! \{ */
80 UInt32 getNCores (void ) const;
81 Int32 findCore (NodeCore * const pCore ) const;
82 void insertCore(UInt32 corendex,
83 NodeCore * const coreP );
85 /*! \} */
86 /*---------------------------------------------------------------------*/
87 /*! \name Transformation */
88 /*! \{ */
90 const MFUnrecChildNodeCorePtr *getMFCores( void ) const;
92 NodeCore *getCores (const UInt32 index) const;
94 /*! \} */
95 /*---------------------------------------------------------------------*/
96 /*! \name Transformation */
97 /*! \{ */
99 void addCore ( NodeCore * const value );
100 void assignCoresFrom (const MFUnrecChildNodeCorePtr & value );
101 void subCore ( UInt32 uiIndex );
102 void subCoreByObj ( NodeCore * const value );
103 void clearCores ( void );
105 void replaceCore ( UInt32 uiIndex,
106 NodeCore * const value );
108 void replaceCoreByObj( NodeCore * const pOldElem,
109 NodeCore * const pNewElem);
111 /*! \} */
112 /*---------------------------------------------------------------------*/
113 /*! \name Transformation */
114 /*! \{ */
116 virtual void accumulateMatrix(Matrix &result);
118 /*! \} */
119 /*---------------------------------------------------------------------*/
120 /*! \name Output */
121 /*! \{ */
123 virtual void dump( UInt32 uiIndent = 0,
124 const BitVector bvFlags = 0) const;
126 /*! \} */
127 /*========================= PROTECTED ===============================*/
129 protected:
131 // Variables should all be in MultiCoreBase.
133 /*---------------------------------------------------------------------*/
134 /*! \name Constructors */
135 /*! \{ */
137 MultiCore(void);
138 MultiCore(const MultiCore &source);
140 /*! \} */
141 /*---------------------------------------------------------------------*/
142 /*! \name Destructors */
143 /*! \{ */
145 virtual ~MultiCore(void);
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Volume */
150 /*! \{ */
152 virtual void adjustVolume (Volume &volume);
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Draw */
157 /*! \{ */
159 Action::ResultE renderEnter (Action *action );
160 Action::ResultE renderLeave (Action *action );
162 Action::ResultE actionEnterFrom(Action *action, NodeCore *pFrom);
163 Action::ResultE actionLeaveFrom(Action *action, NodeCore *pFrom);
165 /*! \} */
166 /*---------------------------------------------------------------------*/
167 /*! \name Init */
168 /*! \{ */
170 static void initMethod(InitPhase ePhase);
172 /*! \} */
173 /*========================== PRIVATE ================================*/
175 private:
177 friend class FieldContainer;
178 friend class MultiCoreBase;
179 friend class Action;
181 // prohibit default functions (move to 'public' if you need one)
182 void operator =(const MultiCore &source);
185 typedef MultiCore *MultiCoreP;
187 OSG_SYSTEM_DLLMAPPING
188 void addCoreToNode (Node *pNode,
189 NodeCore *pCore);
191 template <class ObjectT>
192 void addCoreToNode (Node *pNode,
193 TransitPtr<ObjectT> pCore);
195 OSG_SYSTEM_DLLMAPPING
196 void subCoreFromNode(Node *pNode,
197 NodeCore *pCore,
198 bool bSimplify = true);
200 OSG_END_NAMESPACE
202 #include "OSGMultiCoreBase.inl"
203 #include "OSGMultiCore.inl"
205 #endif /* _OSGMULTICORE_H_ */