SoBoxHighlightRenderAction.h
#ifndef COIN_SOBOXHIGHLIGHTRENDERACTION_H
#define COIN_SOBOXHIGHLIGHTRENDERACTION_H
/**************************************************************************\
* Copyright (c) Kongsberg Oil & Gas Technologies AS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\**************************************************************************/
#include <Inventor/actions/SoGLRenderAction.h>
#include <Inventor/SbColor.h>
class SoBoxHighlightRenderActionP;
class COIN_DLL_API SoBoxHighlightRenderAction : public SoGLRenderAction {
typedef SoGLRenderAction inherited;
SO_ACTION_HEADER(SoBoxHighlightRenderAction);
public:
static void initClass(void);
SoBoxHighlightRenderAction(void);
SoBoxHighlightRenderAction(const SbViewportRegion & viewportregion);
virtual ~SoBoxHighlightRenderAction(void);
virtual void apply(SoNode * node);
virtual void apply(SoPath * path);
virtual void apply(const SoPathList & pathlist, SbBool obeysrules = FALSE);
void setVisible(const SbBool visible);
SbBool isVisible(void) const;
void setColor(const SbColor & color);
const SbColor & getColor(void);
void setLinePattern(unsigned short pattern);
unsigned short getLinePattern(void) const;
void setLineWidth(const float width);
float getLineWidth(void) const;
protected:
SbBool hlVisible;
// Some protected members are missing compared to OIV here.
// I doubt that anyone will use them though, since it looked
// like they should have been private. We chose to implement this
// action in a different manner. But, if you need the protected members
// provided by OIV here, contact us any we'll consider reimplementing
// the action to conform more to OIV. pederb, 20000222
private:
void init(void);
void drawBoxes(SoPath * pathtothis, const SoPathList * pathlist);
private:
SbPimplPtr<SoBoxHighlightRenderActionP> pimpl;
// NOT IMPLEMENTED:
SoBoxHighlightRenderAction(const SoBoxHighlightRenderAction & rhs);
SoBoxHighlightRenderAction & operator = (const SoBoxHighlightRenderAction & rhs);
}; // SoBoxHighlightRenderAction
#endif // !COIN_SOBOXHIGHLIGHTRENDERACTION_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
SoBoxHighlightRenderAction::setLineWidth
void setLineWidth(const float width)
Definition SoBoxHighlightRenderAction.cpp:394
SoBoxHighlightRenderAction::setLinePattern
void setLinePattern(unsigned short pattern)
Definition SoBoxHighlightRenderAction.cpp:375
SoBoxHighlightRenderAction::SoBoxHighlightRenderAction
SoBoxHighlightRenderAction(void)
Definition SoBoxHighlightRenderAction.cpp:209
SoBoxHighlightRenderAction::isVisible
SbBool isVisible(void) const
Definition SoBoxHighlightRenderAction.cpp:346
SoBoxHighlightRenderAction::getLinePattern
unsigned short getLinePattern(void) const
Definition SoBoxHighlightRenderAction.cpp:384
SoBoxHighlightRenderAction::hlVisible
SbBool hlVisible
Definition SoBoxHighlightRenderAction.h:66
SoBoxHighlightRenderAction::setColor
void setColor(const SbColor &color)
Definition SoBoxHighlightRenderAction.cpp:356
SoBoxHighlightRenderAction::setVisible
void setVisible(const SbBool visible)
Definition SoBoxHighlightRenderAction.cpp:337
SoBoxHighlightRenderAction::getColor
const SbColor & getColor(void)
Definition SoBoxHighlightRenderAction.cpp:365
SoBoxHighlightRenderAction::getLineWidth
float getLineWidth(void) const
Definition SoBoxHighlightRenderAction.cpp:403
SoGLRenderAction::SoGLRenderAction
SoGLRenderAction(const SbViewportRegion &viewportregion)
Definition SoGLRenderAction.cpp:699
SoGLRenderAction::initClass
static void initClass(void)
Definition SoGLRenderAction.cpp:642
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