VolumeDrawWrapper Class Reference
[Geometry Functions]

List of all members.

Public Member Functions

 VolumeDrawWrapper (const DynamicVolume &vol, Color3f col)
 ~VolumeDrawWrapper ()

Static Public Member Functions

static void drop (DrawActionBase *action, NodePtr node, Color3f col)
static void drop (DrawActionBase *action, const DynamicVolume &volume, Color3f col)

Private Member Functions

Action::ResultE draw (DrawActionBase *)

Private Attributes

DynamicVolume _vol
Color3f _col


Detailed Description

Wrapper class for volume drawing. An instance of this class is dropped into the DrawTree and automaticaly destructs itself after it's drawn.

Definition at line 265 of file OSGVolumeDraw.cpp.


Constructor & Destructor Documentation

VolumeDrawWrapper::VolumeDrawWrapper ( const DynamicVolume vol,
Color3f  col 
) [inline]

Definition at line 269 of file OSGVolumeDraw.cpp.

00269                                                              : 
00270         _vol(vol), _col(col)
00271     {}

VolumeDrawWrapper::~VolumeDrawWrapper (  )  [inline]

Definition at line 273 of file OSGVolumeDraw.cpp.

00274     {}


Member Function Documentation

static void VolumeDrawWrapper::drop ( DrawActionBase action,
NodePtr  node,
Color3f  col 
) [inline, static]

Definition at line 276 of file OSGVolumeDraw.cpp.

Referenced by osg::dropVolume().

00277     {
00278         node->updateVolume();
00279         
00280         drop(action, node->getVolume(), col);
00281     }

static void VolumeDrawWrapper::drop ( DrawActionBase action,
const DynamicVolume volume,
Color3f  col 
) [inline, static]

Definition at line 283 of file OSGVolumeDraw.cpp.

References draw(), osg::RenderAction::dropFunctor(), osg::getCPtr(), osg::getDefaultUnlitMaterial(), and osg::osgTypedMethodFunctor1ObjPtr().

00284     {
00285         VolumeDrawWrapper * vdw = new VolumeDrawWrapper(volume, col);
00286 
00287         Material::DrawFunctor func;
00288         func = osgTypedMethodFunctor1ObjPtr(vdw, &VolumeDrawWrapper::draw);
00289     
00290         RenderAction *ra = dynamic_cast<RenderAction*>(action);
00291         
00292         ra->dropFunctor(func, getDefaultUnlitMaterial().getCPtr());
00293     }

Action::ResultE VolumeDrawWrapper::draw ( DrawActionBase  )  [inline, private]

Definition at line 297 of file OSGVolumeDraw.cpp.

References osg::Action::Continue, and osg::drawVolume().

Referenced by drop().

00298     {
00299         glColor3fv(_col.getValuesRGB());
00300         drawVolume(_vol);
00301         
00302         // self-destruct
00303         delete this;
00304         
00305         return Action::Continue;
00306     }


Member Data Documentation

Definition at line 308 of file OSGVolumeDraw.cpp.

Definition at line 309 of file OSGVolumeDraw.cpp.


The documentation for this class was generated from the following file:

Generated on Mon Mar 17 12:03:00 2008 for OpenSG by  doxygen 1.5.5