Coin Logo 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 
37 #include <Inventor/SbColor.h>
38 
39 class SoLineHighlightRenderActionP;
40 
41 class COIN_DLL_API SoLineHighlightRenderAction : public SoGLRenderAction {
43 
44  SO_ACTION_HEADER(SoLineHighlightRenderAction);
45 
46 public:
47  static void initClass(void);
48 
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 
65 protected:
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 
74 private:
76  friend class SoLineHighlightRenderActionP;
77 
78  // NOT IMPLEMENTED:
81 }; // SoLineHighlightRenderAction
82 
83 #endif // !COIN_SOLINEHIGHLIGHTRENDERACTION_H
The SbColor class contains the red, green and blue components which make up a color value...
Definition: SbColor.h:39
The SoPathList class is a container for pointers to SoPath objects.
Definition: SoPathList.h:40
SbBool hlVisible
Definition: SoLineHighlightRenderAction.h:66
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:56
The SoPath class is a container class for traversal path descriptions.
Definition: SoPath.h:52
The SoAction class is the base class for all traversal actions.
Definition: SoAction.h:77
The SoLineHighlightRenderAction class renders selections with line highlighting.
Definition: SoLineHighlightRenderAction.h:41
The SbViewportRegion class is a viewport within a full window.
Definition: SbViewportRegion.h:40
virtual void apply(SoNode *root)
Definition: SoAction.cpp:463
The SoGLRenderAction class renders the scene graph with OpenGL calls.
Definition: SoGLRenderAction.h:50