RayTracedTechnique 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
  2. *
  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.
  7. *
  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.
  12. */
  13. #ifndef OSGVOLUME_RAYTRACEDTECHNIQUE
  14. #define OSGVOLUME_RAYTRACEDTECHNIQUE 1
  15. #include <osgVolume/VolumeTechnique>
  16. #include <osg/MatrixTransform>
  17. namespace osgVolume {
  18. class OSGVOLUME_EXPORT RayTracedTechnique : public VolumeTechnique
  19. {
  20. public:
  21. RayTracedTechnique();
  22. RayTracedTechnique(const RayTracedTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
  23. META_Object(osgVolume, RayTracedTechnique);
  24. virtual void init();
  25. virtual void update(osgUtil::UpdateVisitor* nv);
  26. virtual void cull(osgUtil::CullVisitor* nv);
  27. /** Clean scene graph from any terrain technique specific nodes.*/
  28. virtual void cleanSceneGraph();
  29. /** Traverse the terrain subgraph.*/
  30. virtual void traverse(osg::NodeVisitor& nv);
  31. protected:
  32. virtual ~RayTracedTechnique();
  33. osg::ref_ptr<osg::MatrixTransform> _transform;
  34. osg::ref_ptr<osg::StateSet> _whenMovingStateSet;
  35. };
  36. }
  37. #endif