#include <Volume.h>
Inheritance diagram for Volume:
Notes:
Add data to the fields using the fieldvec: vol->fields->addNrro(myNrro);
Call vol->update() when you have added all of the fields you want. update calls update on all the fields and creates the volytopes that you will need for rendering the volume.
Definition at line 45 of file Volume.h.
Types of volumes supported | |
enum | VOLUME_KIND { RECTLIN, CURVLIN, VOLYTOPE, UNSTRUCT } |
int | getVolType () const |
void | setVolType (int vtype) |
Field & Volytope: Public data and accesors | |
We have public data, since the interface to it throught this class would have to duplicate their interface, exactly.
So what's the point?
TODO: this class really shouldn't own these objects! | |
VolFieldVec | getFields () const |
void | setFields (const VolFieldVec &vfv) |
VolytopeVec | getVolytopes () const |
void | setVolytopes (const VolytopeVec &vtv) |
VolFieldVec | fields |
VolytopeVec | volys |
Default texture qualities | |
from simTexture.h | |
int | getTexQual () const |
void | setTexQual (int tq=SIMT_BEST) |
Bricking info | |
default brick size set to {128,128,128} | |
gutz::vec3i | getBrickDims () const |
void | setBrickDims (gutz::vec3i bd) |
Set/Get size of volume. | |
-1 means that the size isn't set, and you are using the volytopes native size, setting the size scales the volytopes so that collectively they are no larger than the size along any axis need to call "update()" for this to take effect | |
float | getSize () const |
void | setSize (float size=-1) |
Set Size. | |
toggle centering on and off, | |
need to call "update()" for this to take effect | |
bool | getCentered () const |
void | setCentered (bool onoff) |
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 Types | |
Public Member Functions | |
Volume () | |
Construction. | |
virtual | ~Volume () |
bool | isValid () const |
is this object good to go? if not, needs update (most likely), or it is mis-configured | |
virtual void | update () |
Update the Volume if something changes. | |
Protected Member Functions | |
void | clearVolytopes () |
Clear Volytopes. | |
void | updateVolytopesRL () |
Update Volytopes. | |
void | updateRectLin () |
rectilinear volytopes | |
void | setDefault () |
Set Default, what to do if we have an invalid volume. | |
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 | |
bool | _valid |
is the volume valid? | |
int | _vtype |
what type of volume is this? | |
gutz::vec3i | _brickDims |
int | _texqual |
float | _size |
bool | _centered |
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 |
|
|
|
Construction.
Definition at line 28 of file Volume.cpp. |
|
|
|
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(). |
|
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. |
|
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(). |
|
Clear Volytopes.
Definition at line 112 of file Volume.cpp. References volys. Referenced by updateRectLin(). |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
Definition at line 108 of file Volume.h. References _brickDims. |
|
Definition at line 129 of file Volume.h. References _centered. |
|
Definition at line 73 of file simBase.h. References SimBase::_changed. |
|
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(). |
|
Definition at line 63 of file Volume.h. References fields. |
|
Definition at line 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
Definition at line 44 of file simBase.h. References string. |
|
Definition at line 121 of file Volume.h. References _size. |
|
Definition at line 96 of file Volume.h. References _texqual. |
|
Definition at line 87 of file Volume.h. References _vtype. |
|
Definition at line 67 of file Volume.h. References volys. |
|
is this object good to go?
Definition at line 76 of file Volume.h. References _valid. Referenced by updateRectLin(). |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Definition at line 109 of file Volume.h. References _brickDims. |
|
|
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update(). |
|
Set Default, what to do if we have an invalid volume. yep, creat one still not setup properly Definition at line 152 of file Volume.cpp. References _valid, volys, and VolytopeSP. Referenced by updateRectLin(), and updateVolytopesRL(). |
|
Definition at line 64 of file Volume.h. References fields. |
|
Definition at line 47 of file simBase.h. References SimBase::_name_, and name. |
|
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(). |
|
Set Size.
Definition at line 164 of file Volume.cpp. |
|
Definition at line 97 of file Volume.h. References _texqual. |
|
Definition at line 88 of file Volume.h. References _vtype. |
|
Definition at line 68 of file Volume.h. References volys. |
|
Update the Volume if something changes.
Definition at line 43 of file Volume.cpp. References _vtype, SimBase::derr(), RECTLIN, and updateRectLin(). Referenced by Volume(). |
|
rectilinear volytopes need to create a default volytope? we don't want to crash. nothing to do??? make sure the fields are valid made it this far must be good! only for un-configured volumes, this is just a convenience thing, so we don't crash when we forget to set the volume. ditch old setup if previously un-configured or something changed Definition at line 58 of file Volume.cpp. References _brickDims, _centered, _size, _valid, VolFieldVec::brickData(), VolytopeVec::center(), VolFieldVec::checkFields(), clearVolytopes(), SimBase::derr(), fields, isValid(), VolFieldVec::needUpdate(), setDefault(), VolytopeVec::setSize(), VolFieldVec::update(), updateVolytopesRL(), and volys. Referenced by update(). |
|
Update Volytopes. um they should be! initiallize it using the first field for each additional field, add it's data to the volytopes Definition at line 120 of file Volume.cpp. References SimBase::derr(), fields, genVolyCubes(), VolFieldVec::getField(), setDefault(), VolytopeVec::setField(), and volys. Referenced by updateRectLin(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
Definition at line 144 of file Volume.h. Referenced by getBrickDims(), setBrickDims(), and updateRectLin(). |
|
Definition at line 148 of file Volume.h. Referenced by getCentered(), setCentered(), and updateRectLin(). |
|
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(). |
|
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(). |
|
Definition at line 147 of file Volume.h. Referenced by getSize(), setSize(), and updateRectLin(). |
|
Definition at line 145 of file Volume.h. Referenced by getTexQual(), and setTexQual(). |
|
is the volume valid?
Definition at line 142 of file Volume.h. Referenced by isValid(), setCentered(), setDefault(), setSize(), and updateRectLin(). |
|
what type of volume is this?
Definition at line 143 of file Volume.h. Referenced by getVolType(), setVolType(), and update(). |
|
Definition at line 62 of file Volume.h. Referenced by getFields(), setFields(), updateRectLin(), and updateVolytopesRL(). |
|
Definition at line 66 of file Volume.h. Referenced by clearVolytopes(), getVolytopes(), setDefault(), setVolytopes(), updateRectLin(), and updateVolytopesRL(). |