openscenegraph
Outline
Go to the documentation of this file.
1// -*-c++-*-
2
3/*
4 * OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
5 *
6 * This library is open source and may be redistributed and/or modified under
7 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
8 * (at your option) any later version. The full license is in LICENSE file
9 * included with this distribution, and on the openscenegraph.org website.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * OpenSceneGraph Public License for more details.
15 */
16
17/*
18 * osgFX::Outline - Copyright (C) 2004,2009 Ulrich Hertlein
19 */
20
21#ifndef OSGFX_OUTLINE_
22#define OSGFX_OUTLINE_
23
24#include <osgFX/Export>
25#include <osgFX/Effect>
26
27namespace osgFX
28{
41 {
42 public:
45
47 Outline(const Outline& copy, const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY) : Effect(copy, op) {
48 _width = copy._width;
49 _color = copy._color;
50 _technique = copy._technique;
51 }
52
53 // Effect class info
55 "Stencil buffer based object outline effect.\n"
56 "This effect needs a properly setup stencil buffer.",
57 "Ulrich Hertlein");
58
60 void setWidth(float w);
61
63 float getWidth() const {
64 return _width;
65 }
66
68 void setColor(const osg::Vec4& color);
69
71 const osg::Vec4& getColor() const {
72 return _color;
73 }
74
75 protected:
77 virtual ~Outline() {
78 }
79
82
83 private:
85 float _width;
86
88 osg::Vec4 _color;
89
91 class OutlineTechnique;
92 OutlineTechnique* _technique;
93 };
94
95}
96
97#endif
Definition Effect:66
Definition Outline:41
Outline(const Outline &copy, const osg::CopyOp &op=osg::CopyOp::SHALLOW_COPY)
Copy constructor.
Definition Outline:47
const osg::Vec4 & getColor() const
Get outline color.
Definition Outline:71
bool define_techniques()
Define available techniques.
META_Effect(osgFX, Outline, "Outline", "Stencil buffer based object outline effect.\n" "This effect needs a properly setup stencil buffer.", "Ulrich Hertlein")
virtual ~Outline()
Destructor.
Definition Outline:77
void setWidth(float w)
Set outline width.
float getWidth() const
Get outline width.
Definition Outline:63
void setColor(const osg::Vec4 &color)
Set outline color.
Outline()
Constructor.
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition Vec4f:28
Definition AnisotropicLighting:25
#define OSGFX_EXPORT
Definition osgFX/Export:27