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

VolFieldVec Class Reference

#include <VolField.h>

Inheritance diagram for VolFieldVec:

SimBase List of all members.

Detailed Description

VolFieldVec, a collection of fields, with functionality of a std::vector.

Definition at line 138 of file VolField.h.

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 ()

Serialization:

from SimBase You MUST override these pure virtual functions, they "should" do something usefull.

It is also nice if you declare a static std::istream &create(std::istream &is) const; function, to create a class from a stream. This is done on a per-concrete class basis.

These aren't pure virutal yet, but will be soon!

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

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


Public Member Functions

 VolFieldVec ()
virtual ~VolFieldVec ()
int numFields ()
void addNrro (NrroSP n)
 Add Nrro, this is the correct way to add a new field to this array.

VolFieldSP getField (unsigned int i)
 it's safer to use these accessors

void setField (unsigned int i, VolField *f)
 Set Field.

void delField (unsigned int i)
 Delete Field.

virtual bool checkFields ()
 check all fields

virtual bool checkField (unsigned int i)
 check a field and break it up if it has too many channels 4 is the limmit, 1,2,4 fields are optimal for hardware

void brickData (gutz::vec3i maxBrickDims)
 brick all fields if they are active specific maximum dimensions

virtual bool needUpdate ()
 update: check if any field changed

virtual void update ()
 update all fields


Protected Attributes

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

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


Constructor & Destructor Documentation

VolFieldVec::VolFieldVec  )  [inline]
 

Definition at line 142 of file VolField.h.

virtual VolFieldVec::~VolFieldVec  )  [inline, virtual]
 

Definition at line 143 of file VolField.h.


Member Function Documentation

void VolFieldVec::addNrro NrroSP  n  ) 
 

Add Nrro, this is the correct way to add a new field to this array.

Definition at line 354 of file VolField.cpp.

References n, and VolFieldSP.

void VolFieldVec::brickData gutz::vec3i  bdims  ) 
 

brick all fields if they are active specific maximum dimensions

TODO: Need to handle different resolution datasets somehow hmm, really need to think that through

Definition at line 530 of file VolField.cpp.

References getField(), and size.

Referenced by Volume::updateRectLin().

bool VolFieldVec::checkField unsigned int  i  )  [virtual]
 

check a field and break it up if it has too many channels 4 is the limmit, 1,2,4 fields are optimal for hardware

I know this looks long, but it's mostly error checking!

this guy doesn't exist!

this guy doesn't exist!

we can't handle anything but volumes and images right now

break out into sets of fields 4 or less

this makes sure volumes are 4D and images are 3D

we don't know how to handle things bigger than this, TODO: need a way to render time series volumes

check to see if we have more than 4 channels, if so we need to split them TODO: handle images the same way TODO: Maybe we shouldn't do this automatically?

set this one inactive since we just generated a split up duplicate of it

Definition at line 449 of file VolField.cpp.

References SimBase::derr(), gutz::g_min(), getField(), Nrro::IMAGE, gutz::SmartPtr< VolField >::isNull(), n, and Nrro::VOLUME.

Referenced by checkFields().

bool VolFieldVec::checkFields  )  [virtual]
 

check all fields

we have a field

it is active, otherwize ignore it

make sure all is ready

maybe it isn't

we only check active fields

this is a place to handle this sort of thing

if k is active

for k

if i is active

for i

Check each fields for correctness:

an all to all check need this because all we support right now are equal sized bricks and textures TODO: handle unequal sized fields

Definition at line 401 of file VolField.cpp.

References checkField(), SimBase::derr(), getField(), gutz::SmartPtr< VolField >::isNull(), and size.

Referenced by Volume::updateRectLin().

void VolFieldVec::delField unsigned int  i  ) 
 

Delete Field.

TODO: Need to see if we can re-pack the fields TODO: See if vector::delete does the trick

Definition at line 390 of file VolField.cpp.

References size, and VolFieldSP.

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(), checkField(), 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(), 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().

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().

VolFieldSP VolFieldVec::getField unsigned int  i  ) 
 

it's safer to use these accessors

Definition at line 364 of file VolField.cpp.

References SimBase::derr(), size, and VolFieldSP.

Referenced by brickData(), checkField(), checkFields(), needUpdate(), update(), and Volume::updateVolytopesRL().

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

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

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

Definition at line 44 of file simBase.h.

References string.

bool VolFieldVec::needUpdate  )  [virtual]
 

update: check if any field changed

check if anyone needs an update

Definition at line 337 of file VolField.cpp.

References getField(), gutz::SmartPtr< VolField >::isNull(), and size.

Referenced by Volume::updateRectLin().

int VolFieldVec::numFields  )  [inline]
 

Definition at line 145 of file VolField.h.

References size.

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

unserialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 94 of file simBase.h.

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

serialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 92 of file simBase.h.

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 VolFieldVec::setField unsigned int  idx,
VolField f
 

Set Field.

TODO: see if we can use vector::insert here

Definition at line 377 of file VolField.cpp.

References size, and VolFieldSP.

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 VolFieldVec::update  )  [virtual]
 

update all fields

just call update on each of our children

Definition at line 325 of file VolField.cpp.

References getField(), gutz::SmartPtr< VolField >::isNull(), and size.

Referenced by Volume::updateRectLin().


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().

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().


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