arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

VolRenSlab Class Reference

#include <VolRenSlab.h>

Inheritance diagram for VolRenSlab:

VolRenBase Renderable SimBase gutz::Counted List of all members.

Detailed Description

VolRenSlab.h.

Definition at line 25 of file VolRenSlab.h.

Algorithm

Set/Get the rendering algorithm, client strategy

virtual void setAlg (VolRenAlgBase *vrab)
virtual VolRenAlgBaseSP getAlg ()

Slicer

Set/Get the currrent Slicer, client strategy

virtual void setSlicer (VolSlicer *vslice)
virtual VolSlicerSP getSlicer ()

Set/Get sample spacing.

This is in volume model space, which is not the same as texture space.

virtual void setSampleSpace (float sampleSpace)
virtual float getSampleSpace ()

Serialize/un...

virtual std::ostream & saveSelf (std::ostream &os)
 serialize

virtual std::istream & readSelf (std::istream &is)
 unserialize


Draw on/off.

bool isOn () const
void setOn (bool yes)

Delete.

Does this object need to be removed from a render list? This means that the object is finished and anyone with a smart pointer to it needs to delete the smart pointer and stop using the renderable.

bool needsDelete () const
void setDelete (bool yes)

Interaction Functions

Return true if the event was for you.

By default interaction is forwarded to your protected manipulator (_manip). To use it just apply it in your draw function. However, if you don't add any events or call setManipEventsDefault(), you won't have any interaction. Override these functions in your base class to implement custom behaviors.

virtual bool key (unsigned char k, int x, int y)
virtual bool mouse (const gutz::MouseEvent &me)
virtual bool move (const gutz::MouseMoveEvent &mme)

Selected

Is this object currently selected?

virtual void setSelected (bool yes)
bool isSelected () const

Manipulator Interface

gutz::ManipgetManip () const
void setManip (gutz::Manip *const m)
void setManipEventsDefault ()
 you have to call this to enable default interaction, OR customize the manipulators events yourself.


Text object-name

from SimBase

std::string getObjName ()
std::string getName ()
void setName (std::string name)
void setName (const char *name)

Debug prints

from SimBase: These print the object name with the error, mostly for convenience, but they are compiled to inline-no-op if you build in release mode

void derr (const char *when, const char *where=0) const
template<class T> void derr (const char *when, const char *where, const T stuff) const

Modification, AKA "changed"

from SimBase: id based, you can capture the current id for comparison later, if the id's don't match the class has been changed

virtual int getChangeID ()
virtual int getChangeID () const
virtual void setChanged ()

Public Member Functions

 VolRenSlab ()
 VolRenSlab.cpp.

virtual ~VolRenSlab ()
virtual void init ()
 Init, to be called after Graphic context is valid.

void draw (const gutz::RenderEvent &re)
 Slice polytopes and render.

gutz::vec3f getCenter (const gutz::CameraEvent &ce) const
 Get the center of the volume rendered, given a specific camera.

void addLight (gutz::Light *lt)
 Light management, TODO: need a light class, yo.

gutz::LightgetLight (int i)
gutz::LightVec getLightVec ()
void setLightVec (gutz::LightVec &ltv)
unsigned int getNumLights ()
void enableLight (bool on)
 Lighting on/off.

void enableLTHA (bool on)
 Light transport using half angle on/off.

VolumeSP getVolume () const
void setVolume (Volume *v)

Protected Member Functions

virtual void preSlice (const gutz::RenderEvent &re)
 a couple of no-ops for sub-classes

virtual void postSlice (const gutz::RenderEvent &re)
virtual void drawDef (const gutz::RenderEvent &re)
virtual gutz::vec3f genSliceAxis (unsigned int light, gutz::vec3f volCtr)
 get the slice axis

virtual void rotateSampBuffs ()
 Rotate sample buffers, tripple buffered.

void err (char *when, float v=0.0f, char *where=0)
virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

VolRenAlgBaseSP _currentAlg
 Stratagies.

VolSlicerSP _currentSlicer
VolumeSP _v
 Member data.

VolytopeSP _vt
VolSamplesVec _vsv
int _vsBuff
gutz::LightVec _ltv
 which sample buffer are we about to render from?

gutz::vec3f _sliceDir
bool _lightOn
bool _lthaOn
bool _on
 is this renderable currently "render-able"?

bool _selected
 is this renderable selected?

bool _deleteMe
 does this object need to be deleted?

gutz::ManipSP _manip
 You get a manipulator free, no charge.

std::string _name_
 a text name for the object, SimBase

int _changed
 change id, incremented whenever setChanged is called, SimBase


Friends

class SmartPtr
class SmartPtrRef


Constructor & Destructor Documentation

VolRenSlab::VolRenSlab  ) 
 

VolRenSlab.cpp.

Definition at line 24 of file VolRenSlab.cpp.

VolRenSlab::~VolRenSlab  )  [virtual]
 

Definition at line 30 of file VolRenSlab.cpp.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

void VolRenBase::addLight gutz::Light lt  )  [inline, inherited]
 

Light management, TODO: need a light class, yo.

Definition at line 109 of file VolRenBase.h.

References VolRenBase::_ltv.

template<class T>
void SimBase::derr const char *  when,
const char *  where,
const T  stuff
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 130 of file simBase.h.

References SimBase::_name_.

void SimBase::derr const char *  when,
const char *  where = 0
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 113 of file simBase.h.

References SimBase::_name_.

Referenced by AlgObj::addInput(), Key::addKey(), SourceObj::addOutput(), VolShader::bindBlend(), VolField::checkDims(), VolFieldVec::checkField(), VolFieldVec::checkFields(), AlgObj::checkInputs(), AlgObj::delInput(), Key::delKey(), Crank::delMP(), SourceObj::delOutput(), Crank::delTape(), TFGeneric::eval(), SourceObj::execDef(), ColorMapper::execDef(), AlgObj::execDef(), AlgObj::execute(), SourceObj::force(), AlgObj::force(), VolField::genTexture(), TFGeneric::get2DMap(), DataObj::getConsumer(), VolFieldVec::getField(), AlgObj::getInputN(), Key::getKey(), Crank::getMP(), Crank::getMPIdx(), SourceObj::getOutputN(), Crank::getTape(), AlgObj::inputsModified(), Crank::insertTape(), Crank::kindErr(), VolyCube::loadNrro(), VolyCube::readState(), Volytope::readState(), SourceObj::request(), DataObj::request_(), VolytopeVec::setField(), SourceObj::setForwardModified(), DataObj::setForwardModified(), TFGeneric::setImage(), AlgObj::setInputN(), Key::setKey(), Crank::setMP(), VolField::setNrro(), SourceObj::setOutputN(), Crank::setTape(), Volume::update(), SourceObj::updateOutputs(), Volume::updateRectLin(), Volume::updateVolytopesRL(), VolyCube::VolyCube(), and Volytope::writeState().

void VolRenBase::draw const gutz::RenderEvent re  )  [inline, virtual, inherited]
 

Slice polytopes and render.

Implements Renderable.

Definition at line 53 of file VolRenBase.h.

References VolRenBase::drawDef(), and gutz::RenderEvent::picking().

Referenced by VolRenLit::drawDef(), and VolRenCube::drawDef().

void VolRenBase::drawDef const gutz::RenderEvent re  )  [protected, virtual, inherited]
 

generate the slice axis

tell the algorithm which way it is going

construct the model view matrix

get the sorted volytopes

Reimplemented in VolRenCube, and VolRenLit.

Definition at line 86 of file VolRenBase.cpp.

References VolRenBase::_currentAlg, VolRenBase::_currentSlicer, VolRenBase::_lightOn, VolRenBase::_lthaOn, VolRenBase::_ltv, VolRenBase::_sliceDir, VolRenBase::_v, VolRenBase::_vsBuff, VolRenBase::_vsv, VolRenBase::_vt, gutz::CameraSP, end, VolRenBase::genSliceAxis(), gutz::CameraEvent::getCamera(), gutz::CameraEvent::getManip(), glErr(), glMultMatrixf(), glPopMatrix(), glPushMatrix(), gutz::SmartPtr< Volytope >::isNull(), gutz::ManipSP, gutz::mat4f, VolRenBase::postSlice(), VolRenBase::preSlice(), start, gutz::vec3f, and gutz::vec3f_neg_z.

Referenced by VolRenBase::draw().

void VolRenBase::enableLight bool  on  )  [inline, inherited]
 

Lighting on/off.

Definition at line 115 of file VolRenBase.h.

References VolRenBase::_lightOn.

void VolRenBase::enableLTHA bool  on  )  [inline, inherited]
 

Light transport using half angle on/off.

Definition at line 117 of file VolRenBase.h.

References VolRenBase::_lthaOn.

void VolRenBase::err char *  when,
float  v = 0.0f,
char *  where = 0
[protected, inherited]
 

Definition at line 190 of file VolRenBase.cpp.

References v.

virtual gutz::vec3f VolRenBase::genSliceAxis unsigned int  light,
gutz::vec3f  volCtr
[inline, protected, virtual, inherited]
 

get the slice axis

Reimplemented in VolRenLit.

Definition at line 133 of file VolRenBase.h.

Referenced by VolRenBase::drawDef().

virtual VolRenAlgBaseSP VolRenBase::getAlg  )  [inline, virtual, inherited]
 

Definition at line 70 of file VolRenBase.h.

References VolRenBase::_currentAlg.

gutz::vec3f VolRenBase::getCenter const gutz::CameraEvent ce  )  const [inherited]
 

Get the center of the volume rendered, given a specific camera.

Definition at line 165 of file VolRenBase.cpp.

References VolRenBase::_v, gutz::CameraEvent::getCamera(), and gutz::CameraEvent::getManip().

virtual int SimBase::getChangeID  )  const [inline, virtual, inherited]
 

Definition at line 73 of file simBase.h.

References SimBase::_changed.

virtual int SimBase::getChangeID  )  [inline, virtual, inherited]
 

Reimplemented in TFGeneric, TFBaseSP, and TFEltSP.

Definition at line 72 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), and TFGeneric::getChangeID().

gutz::Light* VolRenBase::getLight int  i  )  [inline, inherited]
 

Definition at line 110 of file VolRenBase.h.

References VolRenBase::_ltv.

gutz::LightVec VolRenBase::getLightVec  )  [inline, inherited]
 

Definition at line 111 of file VolRenBase.h.

References VolRenBase::_ltv.

gutz::Manip* Renderable::getManip  )  const [inline, inherited]
 

Definition at line 184 of file Renderable.h.

References Renderable::_manip.

std::string SimBase::getName  )  [inline, inherited]
 

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

unsigned int VolRenBase::getNumLights  )  [inline, inherited]
 

Definition at line 113 of file VolRenBase.h.

References VolRenBase::_ltv.

std::string SimBase::getObjName  )  [inline, inherited]
 

Definition at line 44 of file simBase.h.

References string.

virtual float VolRenBase::getSampleSpace  )  [inline, virtual, inherited]
 

Definition at line 89 of file VolRenBase.h.

References VolRenBase::_currentSlicer.

virtual VolSlicerSP VolRenBase::getSlicer  )  [inline, virtual, inherited]
 

Definition at line 78 of file VolRenBase.h.

References VolRenBase::_currentSlicer.

VolumeSP VolRenBase::getVolume  )  const [inline, inherited]
 

Definition at line 119 of file VolRenBase.h.

References VolRenBase::_v.

void VolRenBase::init  )  [virtual, inherited]
 

Init, to be called after Graphic context is valid.

Reimplemented in VolRenCube, and VolRenLit.

Definition at line 67 of file VolRenBase.cpp.

References VolRenBase::_currentAlg, and VolRenBase::_currentSlicer.

Referenced by VolRenLit::init(), VolRenCube::init(), and VolRenBase::VolRenBase().

bool Renderable::isOn  )  const [inline, inherited]
 

Definition at line 141 of file Renderable.h.

References Renderable::_on.

bool Renderable::isSelected  )  const [inline, inherited]
 

Definition at line 177 of file Renderable.h.

References Renderable::_selected.

virtual bool Renderable::key unsigned char  k,
int  x,
int  y
[inline, virtual, inherited]
 

Definition at line 166 of file Renderable.h.

virtual bool Renderable::mouse const gutz::MouseEvent me  )  [inline, virtual, inherited]
 

Reimplemented in WidgetItem.

Definition at line 167 of file Renderable.h.

References Renderable::_manip.

virtual bool Renderable::move const gutz::MouseMoveEvent mme  )  [inline, virtual, inherited]
 

Reimplemented in WidgetItem.

Definition at line 168 of file Renderable.h.

References Renderable::_manip.

bool Renderable::needsDelete  )  const [inline, inherited]
 

Definition at line 152 of file Renderable.h.

References Renderable::_deleteMe.

void VolRenSlab::postSlice const gutz::RenderEvent re  )  [protected, virtual]
 

Reimplemented from VolRenBase.

Definition at line 42 of file VolRenSlab.cpp.

void VolRenSlab::preSlice const gutz::RenderEvent re  )  [protected, virtual]
 

a couple of no-ops for sub-classes

Reimplemented from VolRenBase.

Definition at line 36 of file VolRenSlab.cpp.

virtual std::istream& VolRenBase::readSelf std::istream &  is  )  [inline, virtual, inherited]
 

unserialize

Reimplemented from SimBase.

Definition at line 101 of file VolRenBase.h.

virtual void VolRenBase::rotateSampBuffs  )  [inline, protected, virtual, inherited]
 

Rotate sample buffers, tripple buffered.

Definition at line 143 of file VolRenBase.h.

References VolRenBase::_vsBuff.

virtual std::ostream& VolRenBase::saveSelf std::ostream &  os  )  [inline, virtual, inherited]
 

serialize

Reimplemented from SimBase.

Definition at line 99 of file VolRenBase.h.

void VolRenBase::setAlg VolRenAlgBase vrab  )  [virtual, inherited]
 

Definition at line 180 of file VolRenBase.cpp.

References VolRenBase::_currentAlg.

virtual void SimBase::setChanged  )  [inline, virtual, inherited]
 

Definition at line 74 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update().

void Renderable::setDelete bool  yes  )  [inline, inherited]
 

Definition at line 153 of file Renderable.h.

References Renderable::_deleteMe, and Renderable::setOn().

void VolRenBase::setLightVec gutz::LightVec ltv  )  [inline, inherited]
 

Definition at line 112 of file VolRenBase.h.

References VolRenBase::_ltv.

void Renderable::setManip gutz::Manip *const  m  )  [inline, inherited]
 

Definition at line 185 of file Renderable.h.

References Renderable::_manip.

void Renderable::setManipEventsDefault  )  [inline, inherited]
 

you have to call this to enable default interaction, OR customize the manipulators events yourself.

Definition at line 188 of file Renderable.h.

References Renderable::_manip.

void SimBase::setName const char *  name  )  [inline, inherited]
 

Definition at line 47 of file simBase.h.

References SimBase::_name_, and name.

void SimBase::setName std::string  name  )  [inline, inherited]
 

Reimplemented in Key.

Definition at line 46 of file simBase.h.

References SimBase::_name_, and name.

Referenced by EventData::EventData(), and GenDataObj_base< Nrro, gutz::SmartPtr< Nrro > >::GenDataObj_base().

void Renderable::setOn bool  yes  )  [inline, inherited]
 

Definition at line 142 of file Renderable.h.

References Renderable::_on.

Referenced by Renderable::setDelete().

virtual void VolRenBase::setSampleSpace float  sampleSpace  )  [inline, virtual, inherited]
 

Definition at line 87 of file VolRenBase.h.

References VolRenBase::_currentSlicer.

virtual void Renderable::setSelected bool  yes  )  [inline, virtual, inherited]
 

Definition at line 176 of file Renderable.h.

References Renderable::_selected.

void VolRenBase::setSlicer VolSlicer vslice  )  [virtual, inherited]
 

Definition at line 185 of file VolRenBase.cpp.

References VolRenBase::_currentSlicer.

void VolRenBase::setVolume Volume v  )  [inline, inherited]
 

Definition at line 120 of file VolRenBase.h.

References VolRenBase::_v, and v.


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

int SimBase::_changed [protected, inherited]
 

change id, incremented whenever setChanged is called, SimBase

Definition at line 103 of file simBase.h.

Referenced by SimBase::getChangeID(), SimBase::setChanged(), and SimBase::SimBase().

VolRenAlgBaseSP VolRenBase::_currentAlg [protected, inherited]
 

Stratagies.

Definition at line 148 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), VolRenBase::getAlg(), VolRenBase::init(), VolRenBase::setAlg(), and VolRenBase::~VolRenBase().

VolSlicerSP VolRenBase::_currentSlicer [protected, inherited]
 

Definition at line 149 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), VolRenBase::getSampleSpace(), VolRenBase::getSlicer(), VolRenBase::init(), AnalyticVolRen::postSlice(), VolRenBase::setSampleSpace(), and VolRenBase::setSlicer().

bool Renderable::_deleteMe [protected, inherited]
 

does this object need to be deleted?

Definition at line 237 of file Renderable.h.

Referenced by Renderable::needsDelete(), Renderable::Renderable(), and Renderable::setDelete().

bool VolRenBase::_lightOn [protected, inherited]
 

Definition at line 166 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), and VolRenBase::enableLight().

bool VolRenBase::_lthaOn [protected, inherited]
 

Definition at line 166 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), and VolRenBase::enableLTHA().

gutz::LightVec VolRenBase::_ltv [protected, inherited]
 

which sample buffer are we about to render from?

Definition at line 162 of file VolRenBase.h.

Referenced by VolRenBase::addLight(), VolRenBase::drawDef(), VolRenLit::genSliceAxis(), VolRenBase::getLight(), VolRenBase::getLightVec(), VolRenBase::getNumLights(), and VolRenBase::setLightVec().

gutz::ManipSP Renderable::_manip [protected, inherited]
 

You get a manipulator free, no charge.

Definition at line 240 of file Renderable.h.

Referenced by FrameWidget::configureFrame(), GLUEdgeWidget::drawDef(), GLUNodeWidget::drawDef(), GLSurfaceWidget::drawQuad(), EdgeWidget::getEndPoint(), Renderable::getManip(), SurfaceWidget::getPoint(), NodeWidget::getPoint(), NodeWidget::getPointLocal(), EdgeWidget::getStartPoint(), SurfaceWidget::intersectPlane(), Renderable::mouse(), FrameWidget::mouseChild(), WidgetItem::mouseDef(), Renderable::move(), FrameWidget::moveChild(), WidgetItem::moveDef(), NodeWidget::NodeWidget(), Renderable::operator=(), Renderable::Renderable(), EdgeWidget::setEndPoint(), Renderable::setManip(), Renderable::setManipEventsDefault(), WidgetItem::setParent(), SurfaceWidget::setPoint(), NodeWidget::setPoint(), NodeWidget::setPointLocal(), EdgeWidget::setStartPoint(), and FrameWidget::updateManip().

std::string SimBase::_name_ [protected, inherited]
 

a text name for the object, SimBase

Definition at line 101 of file simBase.h.

Referenced by SimBase::derr(), SimBase::getName(), SimBase::setName(), and SimBase::SimBase().

bool Renderable::_on [protected, inherited]
 

is this renderable currently "render-able"?

Definition at line 235 of file Renderable.h.

Referenced by Renderable::isOn(), Renderable::operator=(), Renderable::Renderable(), and Renderable::setOn().

bool Renderable::_selected [protected, inherited]
 

is this renderable selected?

Definition at line 236 of file Renderable.h.

Referenced by Renderable::isSelected(), Renderable::Renderable(), and Renderable::setSelected().

gutz::vec3f VolRenBase::_sliceDir [protected, inherited]
 

Definition at line 164 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), and AnalyticVolRen::postSlice().

VolumeSP VolRenBase::_v [protected, inherited]
 

Member data.

Definition at line 155 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), VolRenBase::getCenter(), VolRenBase::getVolume(), and VolRenBase::setVolume().

int VolRenBase::_vsBuff [protected, inherited]
 

Definition at line 160 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), AnalyticVolRen::postSlice(), and VolRenBase::rotateSampBuffs().

VolSamplesVec VolRenBase::_vsv [protected, inherited]
 

Definition at line 159 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), AnalyticVolRen::postSlice(), and VolRenBase::VolRenBase().

VolytopeSP VolRenBase::_vt [protected, inherited]
 

Definition at line 157 of file VolRenBase.h.

Referenced by VolRenBase::drawDef(), and AnalyticVolRen::postSlice().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk