1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
14#ifndef OSGVOLUME_FIXEDFUNCTIONTECHNIQUE
15#define OSGVOLUME_FIXEDFUNCTIONTECHNIQUE 1
17#include <osgVolume/VolumeTechnique>
21class OSGVOLUME_EXPORT FixedFunctionTechnique : public VolumeTechnique
25 FixedFunctionTechnique();
27 /** Copy constructor using CopyOp to manage deep vs shallow copy.*/
28 FixedFunctionTechnique(const FixedFunctionTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
30 META_Object(osgVolume, FixedFunctionTechnique);
34 virtual void update(osgUtil::UpdateVisitor* nv);
36 virtual void cull(osgUtil::CullVisitor* nv);
38 void setNumSlices(unsigned int numSlices);
40 unsigned int getNumSlices() const { return _numSlices; }
43 /** Clean scene graph from any terrain technique specific nodes.*/
44 virtual void cleanSceneGraph();
46 /** Traverse the terrain subgraph.*/
47 virtual void traverse(osg::NodeVisitor& nv);
51 virtual ~FixedFunctionTechnique();
53 osg::ref_ptr<osg::Node> _node;
55 unsigned int _numSlices;