Renamed ShaderTechnique to RayTracedTechnique

This commit is contained in:
Robert Osfield
2009-01-21 14:27:58 +00:00
parent 0897368fa6
commit a6284b0e03
9 changed files with 74 additions and 74 deletions

View File

@@ -63,7 +63,7 @@
#include <osg/ImageUtils>
#include <osgVolume/Volume>
#include <osgVolume/VolumeTile>
#include <osgVolume/ShaderTechnique>
#include <osgVolume/RayTracedTechnique>
#include <osgVolume/FixedFunctionTechnique>
typedef std::vector< osg::ref_ptr<osg::Image> > ImageList;
@@ -1324,7 +1324,7 @@ int main( int argc, char **argv )
layer->addProperty(new osgVolume::TransferFunctionProperty(transferFunction.get()));
}
tile->setVolumeTechnique(new osgVolume::ShaderTechnique);
tile->setVolumeTechnique(new osgVolume::RayTracedTechnique);
}
else
{

View File

@@ -11,22 +11,22 @@
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGVOLUME_SHADERTECHNIQUE
#define OSGVOLUME_SHADERTECHNIQUE 1
#ifndef OSGVOLUME_RAYTRACEDTECHNIQUE
#define OSGVOLUME_RAYTRACEDTECHNIQUE 1
#include <osgVolume/VolumeTechnique>
namespace osgVolume {
class OSGVOLUME_EXPORT ShaderTechnique : public VolumeTechnique
class OSGVOLUME_EXPORT RayTracedTechnique : public VolumeTechnique
{
public:
ShaderTechnique();
RayTracedTechnique();
ShaderTechnique(const ShaderTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
RayTracedTechnique(const RayTracedTechnique&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgVolume, ShaderTechnique);
META_Object(osgVolume, RayTracedTechnique);
virtual void init();
@@ -42,7 +42,7 @@ class OSGVOLUME_EXPORT ShaderTechnique : public VolumeTechnique
protected:
virtual ~ShaderTechnique();
virtual ~RayTracedTechnique();
osg::ref_ptr<osg::Geode> _geode;
};

View File

@@ -16,7 +16,7 @@
#include <osgVolume/Volume>
#include <osgVolume/VolumeTile>
#include <osgVolume/ShaderTechnique>
#include <osgVolume/RayTracedTechnique>
#ifdef USE_DCMTK
#define HAVE_CONFIG_H
@@ -122,7 +122,7 @@ class ReaderWriterDICOM : public osgDB::ReaderWriter
osg::ref_ptr<osgVolume::VolumeTile> tile = new osgVolume::VolumeTile;
tile->setVolume(volume.get());
tile->setVolumeTechnique(new osgVolume::ShaderTechnique());
tile->setVolumeTechnique(new osgVolume::RayTracedTechnique());
osg::ref_ptr<osgVolume::ImageLayer> layer= new osgVolume::ImageLayer(result.getImage());
layer->rescaleToZeroToOneRange();

View File

@@ -4,7 +4,7 @@ SET(TARGET_SRC
Layer.cpp
Volume.cpp
VolumeTile.cpp
ShaderTechnique.cpp
RayTracedTechnique.cpp
FixedFunctionTechnique.cpp
)

View File

@@ -0,0 +1,40 @@
#include <osgVolume/RayTracedTechnique>
#include <iostream>
#include <string>
#include <osg/Vec3>
#include <osg/Vec4>
#include <osg/io_utils>
#include <osgDB/ReadFile>
#include <osgDB/Registry>
#include <osgDB/Input>
#include <osgDB/Output>
#include <osgDB/ParameterOutput>
bool RayTracedTechnique_readLocalData(osg::Object &obj, osgDB::Input &fr);
bool RayTracedTechnique_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy RayTracedTechnique_Proxy
(
new osgVolume::RayTracedTechnique,
"RayTracedTechnique",
"RayTracedTechnique Object",
RayTracedTechnique_readLocalData,
RayTracedTechnique_writeLocalData
);
bool RayTracedTechnique_readLocalData(osg::Object& obj, osgDB::Input &fr)
{
//osgVolume::RayTracedTechnique& st = static_cast<osgVolume::RayTracedTechnique&>(obj);
bool itrAdvanced = false;
return itrAdvanced;
}
bool RayTracedTechnique_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
//const osgVolume::RayTracedTechnique& st = static_cast<const osgVolume::RayTracedTechnique&>(obj);
return true;
}

View File

@@ -1,40 +0,0 @@
#include <osgVolume/ShaderTechnique>
#include <iostream>
#include <string>
#include <osg/Vec3>
#include <osg/Vec4>
#include <osg/io_utils>
#include <osgDB/ReadFile>
#include <osgDB/Registry>
#include <osgDB/Input>
#include <osgDB/Output>
#include <osgDB/ParameterOutput>
bool ShaderTechnique_readLocalData(osg::Object &obj, osgDB::Input &fr);
bool ShaderTechnique_writeLocalData(const osg::Object &obj, osgDB::Output &fw);
osgDB::RegisterDotOsgWrapperProxy ShaderTechnique_Proxy
(
new osgVolume::ShaderTechnique,
"ShaderTechnique",
"ShaderTechnique Object",
ShaderTechnique_readLocalData,
ShaderTechnique_writeLocalData
);
bool ShaderTechnique_readLocalData(osg::Object& obj, osgDB::Input &fr)
{
//osgVolume::ShaderTechnique& st = static_cast<osgVolume::ShaderTechnique&>(obj);
bool itrAdvanced = false;
return itrAdvanced;
}
bool ShaderTechnique_writeLocalData(const osg::Object& obj, osgDB::Output& fw)
{
//const osgVolume::ShaderTechnique& st = static_cast<const osgVolume::ShaderTechnique&>(obj);
return true;
}

View File

@@ -13,7 +13,7 @@ SET(LIB_PUBLIC_HEADERS
${HEADER_PATH}/Layer
${HEADER_PATH}/Locator
${HEADER_PATH}/Property
${HEADER_PATH}/ShaderTechnique
${HEADER_PATH}/RayTracedTechnique
${HEADER_PATH}/Version
${HEADER_PATH}/Volume
${HEADER_PATH}/VolumeTechnique
@@ -28,7 +28,7 @@ ADD_LIBRARY(${LIB_NAME}
Layer.cpp
Locator.cpp
Property.cpp
ShaderTechnique.cpp
RayTracedTechnique.cpp
Version.cpp
Volume.cpp
VolumeTechnique.cpp

View File

@@ -11,7 +11,7 @@
* OpenSceneGraph Public License for more details.
*/
#include <osgVolume/ShaderTechnique>
#include <osgVolume/RayTracedTechnique>
#include <osgVolume/VolumeTile>
#include <osg/Geometry>
@@ -28,16 +28,16 @@
using namespace osgVolume;
ShaderTechnique::ShaderTechnique()
RayTracedTechnique::RayTracedTechnique()
{
}
ShaderTechnique::ShaderTechnique(const ShaderTechnique& fft,const osg::CopyOp& copyop):
RayTracedTechnique::RayTracedTechnique(const RayTracedTechnique& fft,const osg::CopyOp& copyop):
VolumeTechnique(fft,copyop)
{
}
ShaderTechnique::~ShaderTechnique()
RayTracedTechnique::~RayTracedTechnique()
{
}
@@ -49,9 +49,9 @@ enum ShadingModel
MaximumIntensityProjection
};
void ShaderTechnique::init()
void RayTracedTechnique::init()
{
osg::notify(osg::NOTICE)<<"ShaderTechnique::init()"<<std::endl;
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init()"<<std::endl;
if (!_volumeTile) return;
@@ -432,28 +432,28 @@ void ShaderTechnique::init()
}
void ShaderTechnique::update(osgUtil::UpdateVisitor* uv)
void RayTracedTechnique::update(osgUtil::UpdateVisitor* uv)
{
// osg::notify(osg::NOTICE)<<"ShaderTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
// osg::notify(osg::NOTICE)<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<<std::endl;
}
void ShaderTechnique::cull(osgUtil::CullVisitor* cv)
void RayTracedTechnique::cull(osgUtil::CullVisitor* cv)
{
//osg::notify(osg::NOTICE)<<"ShaderTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
//osg::notify(osg::NOTICE)<<"RayTracedTechnique::cull(osgUtil::CullVisitor* nv)"<<std::endl;
if (_geode.valid())
{
_geode->accept(*cv);
}
}
void ShaderTechnique::cleanSceneGraph()
void RayTracedTechnique::cleanSceneGraph()
{
osg::notify(osg::NOTICE)<<"ShaderTechnique::cleanSceneGraph()"<<std::endl;
osg::notify(osg::NOTICE)<<"RayTracedTechnique::cleanSceneGraph()"<<std::endl;
}
void ShaderTechnique::traverse(osg::NodeVisitor& nv)
void RayTracedTechnique::traverse(osg::NodeVisitor& nv)
{
// osg::notify(osg::NOTICE)<<"ShaderTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
// osg::notify(osg::NOTICE)<<"RayTracedTechnique::traverse(osg::NodeVisitor& nv)"<<std::endl;
if (!_volumeTile) return;
// if app traversal update the frame count.

View File

@@ -15,7 +15,7 @@
#include <osg/Object>
#include <osgUtil/CullVisitor>
#include <osgUtil/UpdateVisitor>
#include <osgVolume/ShaderTechnique>
#include <osgVolume/RayTracedTechnique>
// Must undefine IN and OUT macros defined in Windows headers
#ifdef IN
@@ -25,14 +25,14 @@
#undef OUT
#endif
BEGIN_OBJECT_REFLECTOR(osgVolume::ShaderTechnique)
I_DeclaringFile("osgVolume/ShaderTechnique");
BEGIN_OBJECT_REFLECTOR(osgVolume::RayTracedTechnique)
I_DeclaringFile("osgVolume/RayTracedTechnique");
I_BaseType(osgVolume::VolumeTechnique);
I_Constructor0(____ShaderTechnique,
I_Constructor0(____RayTracedTechnique,
"",
"");
I_ConstructorWithDefaults2(IN, const osgVolume::ShaderTechnique &, x, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
____ShaderTechnique__C5_ShaderTechnique_R1__C5_osg_CopyOp_R1,
I_ConstructorWithDefaults2(IN, const osgVolume::RayTracedTechnique &, x, , IN, const osg::CopyOp &, copyop, osg::CopyOp::SHALLOW_COPY,
____RayTracedTechnique__C5_RayTracedTechnique_R1__C5_osg_CopyOp_R1,
"",
"");
I_Method0(osg::Object *, cloneType,