Outline
Go to the documentation of this file.
// -*-c++-*-
/*
* OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
/*
* osgFX::Outline - Copyright (C) 2004,2009 Ulrich Hertlein
*/
#ifndef OSGFX_OUTLINE_
#define OSGFX_OUTLINE_
#include <osgFX/Export>
#include <osgFX/Effect>
namespace osgFX
{
class OSGFX_EXPORT Outline : public Effect
{
public:
Outline();
Outline(const Outline& copy, const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY) : Effect(copy, op) {
_width = copy._width;
_color = copy._color;
_technique = copy._technique;
}
// Effect class info
META_Effect(osgFX, Outline, "Outline",
"Stencil buffer based object outline effect.\n"
"This effect needs a properly setup stencil buffer.",
"Ulrich Hertlein");
void setWidth(float w);
float getWidth() const {
return _width;
}
void setColor(const osg::Vec4& color);
const osg::Vec4& getColor() const {
return _color;
}
protected:
virtual ~Outline() {
}
bool define_techniques();
private:
float _width;
osg::Vec4 _color;
class OutlineTechnique;
OutlineTechnique* _technique;
};
}
#endif
Effect
osgFX::Effect::Effect
Effect()
osgFX::Outline::Outline
Outline(const Outline &copy, const osg::CopyOp &op=osg::CopyOp::SHALLOW_COPY)
Copy constructor.
Definition Outline:47
osgFX::Outline::getColor
const osg::Vec4 & getColor() const
Get outline color.
Definition Outline:71
osgFX::Outline::define_techniques
bool define_techniques()
Define available techniques.
osgFX::Outline::META_Effect
META_Effect(osgFX, Outline, "Outline", "Stencil buffer based object outline effect.\n" "This effect needs a properly setup stencil buffer.", "Ulrich Hertlein")
osgFX::Outline::~Outline
virtual ~Outline()
Destructor.
Definition Outline:77
osgFX::Outline::setWidth
void setWidth(float w)
Set outline width.
osgFX::Outline::getWidth
float getWidth() const
Get outline width.
Definition Outline:63
osgFX::Outline::setColor
void setColor(const osg::Vec4 &color)
Set outline color.
osgFX::Outline::Outline
Outline()
Constructor.
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osgFX
Definition AnisotropicLighting:25
osg::Vec4
Vec4f Vec4
Definition Vec4:21
Export
OSGFX_EXPORT
#define OSGFX_EXPORT
Definition osgFX/Export:27