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

TFElementBox Class Reference

#include <TFElementSTD.h>

Inheritance diagram for TFElementBox:

TFElement SimBase gutz::Counted List of all members.

Detailed Description

box type tf element

Definition at line 29 of file TFElementSTD.h.

Element Kinds

enum  BOX_KIND { RADIAL, SEPARABLE }
int getKind () const
void setKind (const int kind)

Position, Size, BBox

enum  BOX_ELEMENT_IDS { LL, UR }
 you can use this like : TFElement::getPos(LL) there is also an interface to the elements below More...

PosTypeVec getBBox () const
 PosTypeVec[0] = min, PosTypeVec[1] = max.

PosType getCenter () const
 get center

void setCenter (PosType center)
 set center

PosType getSize () const
 get size

void setSize (PosType size)
 set Size

PosType getMin () const
 get min, same as getPos(LL)

void setMin (PosType ll)
 set Min

PosType getMax () const
 get max, same as getPos(UR)

void setMax (PosType ur)
 set max


Zero Val

The "Zero Val" is the value for "unclassified regions" this may or may not actually be zero, so you may need to change what that value is.

The zero value defaults to tfRangeType_default

ValType getZeroVal () const
void setZeroVal (const ValType &zv)

evaluator strategies Depricated?

TFEvalSP getEvaluator () const
void setEvaluator (TFEvalSP e)

Domain/Position

all of the "nodes" associated with this element, ie, verticies of polytope in tf domain

PosVecTypegetPosVec ()
PosVecType getPosVec () const
void setPosVec (PosVecType &pv)
PosTypegetPos (int i)
PosType getPos (int i) const
void setPos (int i, PosType p)

domain bounding box

you can override these for speed!! should we recompute on every call?? very slow! maybe you can cache this in a subclass.

virtual PosType getMinBox () const
virtual PosType getMaxBox () const

Range/Value

all of the values associated with each node, if vec::size() == 1 then the element has a global definition of range.

ValVecTypegetValVec ()
ValVecType getValVec () const

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

typedef TFElement::PosType PosType
 scalar type

typedef TFElement::PosVecType PosTypeVec
typedef TFElement::ValType ValType
typedef TFElement::ValVecType ValTypeVec
typedef STF::tfSType SType
typedef STF::tfDomainVec PosVecType
typedef STF::tfRangeVec ValVecType
typedef STF::tfVec2 tfVec2
typedef STF::tfRangeVec4 tfVec4

Public Member Functions

 TFElementBox ()
 construct

 TFElementBox (const PosType center, const PosType size)
virtual ~TFElementBox ()
virtual TFEltViewgetView (const gutz::vec2i &axes)
 get view, returns View interface, each concrete TFElement should have an associated view object than handles the collaboration between 2D manipulations and the full ND representation of the Element.

virtual ValType eval (const PosType &pos) const
 not implemented yet

ValType eval (const tfVec2 &tfpos, const gutz::vec2i &posIdx) const
 implementing now

virtual void rasterize2D (NrroSP n, const gutz::vec2i &posIdx, const int kind=STF::TF_RGBA)
 rasterize 2D

bool needRemove () const
 check to see if this element needs to be removed/deleted


Protected Member Functions

template<class T> void rasterize2D (Nrro::NrroIter< T > ni) const
SType myEval (const SType p2) const
void initBox (const PosType center, const PosType size)
 only called by constructor

virtual void updateBox ()
 update box

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

int _kind
gutz::vec2i _posIdx
 tmp for rasterization

STF::tfRangeIdx _valIdx
PosVecType _posVec
ValVecType _valVec
ValType _zeroVal
TFEvalSP _eval
bool _remove
 TFBlend _blend;.

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


Member Typedef Documentation

typedef TFElement::PosType TFElementBox::PosType
 

scalar type

Reimplemented from TFElement.

Definition at line 31 of file TFElementSTD.h.

Referenced by TFElementBox(), and TFView::TFView().

typedef TFElement::PosVecType TFElementBox::PosTypeVec
 

Definition at line 32 of file TFElementSTD.h.

Referenced by getBBox().

typedef STF::tfDomainVec TFElement::PosVecType [inherited]
 

Definition at line 58 of file TFElement.h.

Referenced by TFElement::getPosVec().

typedef STF::tfSType TFElement::SType [inherited]
 

Definition at line 56 of file TFElement.h.

Referenced by myEval(), and rasterize2D().

typedef STF::tfVec2 TFElement::tfVec2 [inherited]
 

Definition at line 61 of file TFElement.h.

Referenced by TFView::TFView().

typedef STF::tfRangeVec4 TFElement::tfVec4 [inherited]
 

Definition at line 62 of file TFElement.h.

typedef TFElement::ValType TFElementBox::ValType
 

Reimplemented from TFElement.

Definition at line 33 of file TFElementSTD.h.

Referenced by TFElementBox().

typedef TFElement::ValVecType TFElementBox::ValTypeVec
 

Definition at line 34 of file TFElementSTD.h.

typedef STF::tfRangeVec TFElement::ValVecType [inherited]
 

Definition at line 60 of file TFElement.h.

Referenced by TFElement::getValVec().


Member Enumeration Documentation

enum TFElementBox::BOX_ELEMENT_IDS
 

you can use this like : TFElement::getPos(LL) there is also an interface to the elements below

Enumeration values:
LL 
UR  MAX pos (upper right).

Definition at line 58 of file TFElementSTD.h.

enum TFElementBox::BOX_KIND
 

Enumeration values:
RADIAL 
SEPARABLE  tent, pyramid

Definition at line 44 of file TFElementSTD.h.


Constructor & Destructor Documentation

TFElementBox::TFElementBox  ) 
 

construct

Definition at line 39 of file TFElementSTD.cpp.

References TFElement::_valVec, initBox(), PosType, STF::randval(), and ValType.

TFElementBox::TFElementBox const PosType  center,
const PosType  size
 

Definition at line 46 of file TFElementSTD.cpp.

References TFElement::_valVec, initBox(), STF::randval(), size, and ValType.

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

Definition at line 38 of file TFElementSTD.h.


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

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

TFElementBox::ValType TFElementBox::eval const tfVec2 tfpos,
const gutz::vec2i posIdx
const
 

implementing now

Definition at line 126 of file TFElementSTD.cpp.

References _kind, TFElement::_posVec, TFElement::_valVec, STF::ALPHA, gutz::g_min(), height, LL, RADIAL, SEPARABLE, STF::tfSType, UR, width, gutz::vec2< tfSType >::x, and gutz::vec2< tfSType >::y.

virtual ValType TFElementBox::eval const PosType pos  )  const [inline, virtual]
 

not implemented yet

Implements TFElement.

Definition at line 81 of file TFElementSTD.h.

Referenced by TFView::TFView().

PosTypeVec TFElementBox::getBBox  )  const [inline]
 

PosTypeVec[0] = min, PosTypeVec[1] = max.

Definition at line 64 of file TFElementSTD.h.

References TFElement::_posVec, and PosTypeVec.

PosType TFElementBox::getCenter  )  const [inline]
 

get center

Definition at line 66 of file TFElementSTD.h.

References TFElement::_posVec, LL, and UR.

Referenced by setCenter().

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

TFEvalSP TFElement::getEvaluator  )  const [inline, inherited]
 

Definition at line 121 of file TFElement.h.

References TFElement::_eval.

int TFElementBox::getKind  )  const [inline]
 

Definition at line 48 of file TFElementSTD.h.

References _kind.

PosType TFElementBox::getMax  )  const [inline]
 

get max, same as getPos(UR)

Definition at line 75 of file TFElementSTD.h.

References TFElement::_posVec, and UR.

virtual PosType TFElement::getMaxBox  )  const [inline, virtual, inherited]
 

Definition at line 158 of file TFElement.h.

References TFElement::_posVec, and gutz::vs_max().

PosType TFElementBox::getMin  )  const [inline]
 

get min, same as getPos(LL)

Definition at line 72 of file TFElementSTD.h.

References TFElement::_posVec, and LL.

virtual PosType TFElement::getMinBox  )  const [inline, virtual, inherited]
 

Definition at line 151 of file TFElement.h.

References TFElement::_posVec, and gutz::vs_min().

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.

PosType TFElement::getPos int  i  )  const [inline, inherited]
 

Definition at line 142 of file TFElement.h.

References TFElement::_posVec.

PosType& TFElement::getPos int  i  )  [inline, inherited]
 

Definition at line 141 of file TFElement.h.

References TFElement::_posVec.

Referenced by TFItem::getTFPosCA(), and TFItem::setTFPosCA().

PosVecType TFElement::getPosVec  )  const [inline, inherited]
 

Definition at line 139 of file TFElement.h.

References TFElement::_posVec, and TFElement::PosVecType.

PosVecType& TFElement::getPosVec  )  [inline, inherited]
 

Definition at line 138 of file TFElement.h.

References TFElement::_posVec, and TFElement::PosVecType.

Referenced by TFItem::getTFPosCA(), and TFItem::setTFPosCA().

PosType TFElementBox::getSize  )  const [inline]
 

get size

Definition at line 69 of file TFElementSTD.h.

References TFElement::_posVec, LL, and UR.

Referenced by setSize().

ValVecType TFElement::getValVec  )  const [inline, inherited]
 

Definition at line 174 of file TFElement.h.

References TFElement::_valVec, and TFElement::ValVecType.

ValVecType& TFElement::getValVec  )  [inline, inherited]
 

Definition at line 173 of file TFElement.h.

References TFElement::_valVec, and TFElement::ValVecType.

virtual TFEltView* TFElementBox::getView const gutz::vec2i axes  )  [inline, virtual]
 

get view, returns View interface, each concrete TFElement should have an associated view object than handles the collaboration between 2D manipulations and the full ND representation of the Element.

see TFEltView for the interface spec.

Implements TFElement.

Definition at line 40 of file TFElementSTD.h.

ValType TFElement::getZeroVal  )  const [inline, inherited]
 

Definition at line 114 of file TFElement.h.

References TFElement::_zeroVal.

void TFElementBox::initBox const PosType  center,
const PosType  size
[protected]
 

only called by constructor

Definition at line 56 of file TFElementSTD.cpp.

References TFElement::_posVec, and size.

Referenced by TFElementBox().

SType TFElementBox::myEval const SType  p2  )  const [inline, protected]
 

Definition at line 94 of file TFElementSTD.h.

References TFElement::SType.

bool TFElement::needRemove  )  const [inline, inherited]
 

check to see if this element needs to be removed/deleted

Definition at line 179 of file TFElement.h.

References TFElement::_remove.

template<class T>
void TFElementBox::rasterize2D Nrro::NrroIter< T >  ni  )  const [protected]
 

for each triangle

set the current triangle

go `till it's completely rasterized

Definition at line 199 of file TFElementSTD.cpp.

References _posIdx, TFElement::_posVec, _V3, TriRasterInfo< T, TT >::alpha, TriRasterInfo< T, TT >::beta, TriRasterInfo< T, TT >::end(), TriRasterInfo< T, TT >::gamma, TriRasterInfo< T, TT >::getMaxX(), TriRasterInfo< T, TT >::getMinX(), TriRasterInfo< T, TT >::getTri(), TriRasterInfo< T, TT >::incX(), TriRasterInfo< T, TT >::interp2(), LL, TriRasterInfo< T, TT >::maxX, TriRasterInfo< T, TT >::maxY, TriRasterInfo< T, TT >::minX, TriRasterInfo< T, TT >::minY, Triangle< T >::setPoints(), Triangle< T >::setTexCoord(), TriRasterInfo< T, TT >::setTri(), TriRasterInfo< T, TT >::setUp(), TFElement::SType, TFRasterInfo, STF::tfSType, UR, x, TriRasterInfo< T, TT >::x(), y, and TriRasterInfo< T, TT >::y().

void TFElementBox::rasterize2D NrroSP  n,
const gutz::vec2i posIdx,
const int  kind = STF::TF_RGBA
[virtual]
 

rasterize 2D

Implements TFElement.

Definition at line 177 of file TFElementSTD.cpp.

References _posIdx, _valIdx, dispatchIter1, n, rasterize2D(), and STF::TF_RGBA.

Referenced by rasterize2D().

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.

void TFElementBox::setCenter PosType  center  ) 
 

set center

Definition at line 69 of file TFElementSTD.cpp.

References TFElement::_posVec, getCenter(), LL, and UR.

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 TFElement::setEvaluator TFEvalSP  e  )  [inline, inherited]
 

Definition at line 122 of file TFElement.h.

References TFElement::_eval.

void TFElementBox::setKind const int  kind  )  [inline]
 

Definition at line 49 of file TFElementSTD.h.

References _kind.

void TFElementBox::setMax PosType  ur  ) 
 

set max

Definition at line 98 of file TFElementSTD.cpp.

References TFElement::_posVec, updateBox(), and UR.

void TFElementBox::setMin PosType  ll  ) 
 

set Min

Definition at line 89 of file TFElementSTD.cpp.

References TFElement::_posVec, LL, and updateBox().

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 TFElement::setPos int  i,
PosType  p
[inline, inherited]
 

Definition at line 143 of file TFElement.h.

References TFElement::_posVec.

Referenced by TFItem::setTFPosCA().

void TFElement::setPosVec PosVecType pv  )  [inline, inherited]
 

Definition at line 140 of file TFElement.h.

References TFElement::_posVec.

void TFElementBox::setSize PosType  size  ) 
 

set Size

Definition at line 79 of file TFElementSTD.cpp.

References TFElement::_posVec, getSize(), LL, size, and UR.

void TFElement::setZeroVal const ValType zv  )  [inline, inherited]
 

Definition at line 115 of file TFElement.h.

References TFElement::_zeroVal.

void TFElementBox::updateBox  )  [protected, virtual]
 

update box

make sure the max is UR and min is LL

Definition at line 107 of file TFElementSTD.cpp.

References TFElement::_posVec, LL, and UR.

Referenced by setMax(), and setMin().


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

TFEvalSP TFElement::_eval [protected, inherited]
 

Definition at line 208 of file TFElement.h.

Referenced by TFElement::getEvaluator(), TFElement::setEvaluator(), and TFElement::TFElement().

int TFElementBox::_kind [protected]
 

Definition at line 103 of file TFElementSTD.h.

Referenced by eval(), getKind(), and setKind().

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

gutz::vec2i TFElementBox::_posIdx [protected]
 

tmp for rasterization

Definition at line 105 of file TFElementSTD.h.

Referenced by rasterize2D().

PosVecType TFElement::_posVec [protected, inherited]
 

Definition at line 203 of file TFElement.h.

Referenced by eval(), getBBox(), getCenter(), getMax(), TFElement::getMaxBox(), getMin(), TFElement::getMinBox(), TFElement::getPos(), TFElement::getPosVec(), getSize(), initBox(), rasterize2D(), setCenter(), setMax(), setMin(), TFElement::setPos(), TFElement::setPosVec(), setSize(), and updateBox().

bool TFElement::_remove [protected, inherited]
 

TFBlend _blend;.

Definition at line 211 of file TFElement.h.

Referenced by TFElement::needRemove(), and TFElement::TFElement().

STF::tfRangeIdx TFElementBox::_valIdx [protected]
 

Definition at line 106 of file TFElementSTD.h.

Referenced by rasterize2D().

ValVecType TFElement::_valVec [protected, inherited]
 

Definition at line 204 of file TFElement.h.

Referenced by eval(), TFElement::getValVec(), and TFElementBox().

ValType TFElement::_zeroVal [protected, inherited]
 

Definition at line 206 of file TFElement.h.

Referenced by TFElement::getZeroVal(), and TFElement::setZeroVal().


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