Coin: SoLineHighlightRenderAction.h Source File

| Coin3D is Free Software, published under the BSD 3-clause license. | https://coin3d.github.io https://www.kongsberg.com/en/kogt/

SoLineHighlightRenderAction.h
1#ifndef COIN_SOLINEHIGHLIGHTRENDERACTION_H
2#define COIN_SOLINEHIGHLIGHTRENDERACTION_H
3
4/**************************************************************************\
5 * Copyright (c) Kongsberg Oil & Gas Technologies AS
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met:
11 *
12 * Redistributions of source code must retain the above copyright notice,
13 * this list of conditions and the following disclaimer.
14 *
15 * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 *
19 * Neither the name of the copyright holder nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34\**************************************************************************/
35
36#include <Inventor/actions/SoGLRenderAction.h>
37#include <Inventor/SbColor.h>
38
39class SoLineHighlightRenderActionP;
40
41 class COIN_DLL_API SoLineHighlightRenderAction : public SoGLRenderAction {
42 typedef SoGLRenderAction inherited;
43
44 SO_ACTION_HEADER(SoLineHighlightRenderAction);
45
46public:
47 static void initClass(void);
48
49 SoLineHighlightRenderAction(void);
50 SoLineHighlightRenderAction(const SbViewportRegion & viewportregion);
51 virtual ~SoLineHighlightRenderAction(void);
52
53 virtual void apply(SoNode * node);
54 virtual void apply(SoPath * path);
55 virtual void apply(const SoPathList & pathlist, SbBool obeysrules = FALSE);
56 void setVisible(const SbBool visible);
57 SbBool isVisible(void) const;
58 void setColor(const SbColor & color);
59 const SbColor & getColor(void);
60 void setLinePattern(uint16_t pattern);
61 uint16_t getLinePattern(void) const;
62 void setLineWidth(const float width);
63 float getLineWidth(void) const;
64
65protected:
66 SbBool hlVisible;
67 // Some protected members are missing compared to OIV here.
68 // I doubt that anyone will use them though, since it looked
69 // like they should have been private. We chose to implement this
70 // action in a different manner. But, if you need the protected members
71 // provided by OIV here, contact us any we'll consider reimplementing
72 // the action to conform more to OIV. pederb, 20000222
73
74private:
75 SbPimplPtr<SoLineHighlightRenderActionP> pimpl;
76 friend class SoLineHighlightRenderActionP;
77
78 // NOT IMPLEMENTED:
79 SoLineHighlightRenderAction(const SoLineHighlightRenderAction & rhs);
80 SoLineHighlightRenderAction & operator = (const SoLineHighlightRenderAction & rhs);
81}; // SoLineHighlightRenderAction
82
83#endif // !COIN_SOLINEHIGHLIGHTRENDERACTION_H
SbColor
The SbColor class contains the red, green and blue components which make up a color value.
Definition SbColor.h:39
SbPimplPtr
Definition SbPimplPtr.h:55
SbViewportRegion
The SbViewportRegion class is a viewport within a full window.
Definition SbViewportRegion.h:40
SoAction::apply
virtual void apply(SoNode *root)
Definition SoAction.cpp:463
SoGLRenderAction
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition SoGLRenderAction.h:50
SoGLRenderAction::initClass
static void initClass(void)
Definition SoGLRenderAction.cpp:642
SoLineHighlightRenderAction
The SoLineHighlightRenderAction class renders selections with line highlighting.
Definition SoLineHighlightRenderAction.h:41
SoLineHighlightRenderAction::hlVisible
SbBool hlVisible
Definition SoLineHighlightRenderAction.h:66
SoNode
The SoNode class is the base class for nodes used in scene graphs.
Definition SoNode.h:56
SoPathList
The SoPathList class is a container for pointers to SoPath objects.
Definition SoPathList.h:40
SoPath
The SoPath class is a container class for traversal path descriptions.
Definition SoPath.h:52