2009-01-14 23:16:29 +08:00
|
|
|
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
2009-01-14 01:20:32 +08:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
#ifndef OSGVOLUME_RAYTRACEDTECHNIQUE
|
|
|
|
#define OSGVOLUME_RAYTRACEDTECHNIQUE 1
|
2009-01-14 01:20:32 +08:00
|
|
|
|
|
|
|
#include <osgVolume/VolumeTechnique>
|
2009-07-03 02:49:59 +08:00
|
|
|
#include <osg/MatrixTransform>
|
2009-01-14 01:20:32 +08:00
|
|
|
|
|
|
|
namespace osgVolume {
|
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
class OSGVOLUME_EXPORT RayTracedTechnique : public VolumeTechnique
|
2009-01-14 01:20:32 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
RayTracedTechnique();
|
2009-01-14 01:20:32 +08:00
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
RayTracedTechnique(const RayTracedTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
2009-01-14 01:20:32 +08:00
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
META_Object(osgVolume, RayTracedTechnique);
|
2009-01-14 01:20:32 +08:00
|
|
|
|
|
|
|
virtual void init();
|
|
|
|
|
|
|
|
virtual void update(osgUtil::UpdateVisitor* nv);
|
|
|
|
|
|
|
|
virtual void cull(osgUtil::CullVisitor* nv);
|
|
|
|
|
|
|
|
/** Clean scene graph from any terrain technique specific nodes.*/
|
|
|
|
virtual void cleanSceneGraph();
|
|
|
|
|
|
|
|
/** Traverse the terrain subgraph.*/
|
|
|
|
virtual void traverse(osg::NodeVisitor& nv);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2009-01-21 22:27:58 +08:00
|
|
|
virtual ~RayTracedTechnique();
|
2009-01-14 01:20:32 +08:00
|
|
|
|
2009-07-03 02:49:59 +08:00
|
|
|
osg::ref_ptr<osg::MatrixTransform> _transform;
|
2009-01-14 01:20:32 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|