Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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.

Referenced by drop().

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::getDefaultUnlitMaterial(), osg::osgTypedMethodFunctor1ObjPtr(), and VolumeDrawWrapper().

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 _col, _vol, osg::NewActionTypes::Continue, osg::drawVolume(), and osg::Color3< ValueTypeT >::getValuesRGB().

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

DynamicVolume VolumeDrawWrapper::_vol [private]
 

Definition at line 308 of file OSGVolumeDraw.cpp.

Referenced by draw().

Color3f VolumeDrawWrapper::_col [private]
 

Definition at line 309 of file OSGVolumeDraw.cpp.

Referenced by draw().


The documentation for this class was generated from the following file:
Generated on Thu Aug 25 04:12:26 2005 for OpenSG by  doxygen 1.4.3