Debian Codegraph @

src/Gui/Inventor/SoFCTransform.h

raw
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2
3 /***************************************************************************
4 * Copyright (c) 2024 Werner Mayer <wmayer[at]users.sourceforge.net> *
5 * *
6 * This file is part of FreeCAD. *
7 * *
8 * FreeCAD is free software: you can redistribute it and/or modify it *
9 * under the terms of the GNU Lesser General Public License as *
10 * published by the Free Software Foundation, either version 2.1 of the *
11 * License, or (at your option) any later version. *
12 * *
13 * FreeCAD is distributed in the hope that it will be useful, but *
14 * WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with FreeCAD. If not, see *
20 * <https://www.gnu.org/licenses/>. *
21 * *
22 **************************************************************************/
23
24 #ifndef GUI_INVENTOR_SOFCTRANSFORM_H
25 #define GUI_INVENTOR_SOFCTRANSFORM_H
26
27 #include <Inventor/nodes/SoTransform.h>
28 #include <FCGlobal.h>
29
30 namespace Gui
31 {
32
33 /**
34 * @class SoFCTransform
35 * @brief A temporary workaround for coin3d/coin#534.
36 *
37 * This class is a workaround for a missing feature to reduce the OpenGL stack size.
38 * The issue was reported here: https://github.com/coin3d/coin/issues/534
39 * And was merged here: https://github.com/coin3d/coin/pull/535
40 *
41 * Once this feature is available in all supported versions of Coin3D, this class should
42 * be removed and all instances should revert to using SoTransform.
43 */
44 class GuiExport SoFCTransform: public SoTransform
45 {
46 using inherited = SoTransform;
47
48 SO_NODE_HEADER(SoFCTransform);
49
50 public:
51 static void initClass();
52 SoFCTransform();
53
54 protected:
55 void GLRender(SoGLRenderAction* action) override;
56 void callback(SoCallbackAction* action) override;
57 void pick(SoPickAction* action) override;
58 void getPrimitiveCount(SoGetPrimitiveCountAction* action) override;
59 void getBoundingBox(SoGetBoundingBoxAction* action) override;
60 void doAction(SoAction* action) override;
61 };
62
63 } // namespace Gui
64
65 #endif // GUI_INVENTOR_SOFCTRANSFORM_H