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

VolyTet Class Reference

#include <VolytopeStd.h>

Inheritance diagram for VolyTet:

Volytope gutz::Counted SimBase List of all members.

Detailed Description

Create a Tetrahedron Volytope with user specified size and origin.

Defaults to a unit tet centered about (0,0,0)

Definition at line 115 of file VolytopeStd.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 Types

typedef gutz::vec3f V_TYPE
 this is to make this flexible, but not a template: change these to change whole class

typedef gutz::vec3f TC_TYPE
 Vertex type.

typedef glift::SingleTex TX_TYPE
 Texture Coordinate type.

typedef gutz::vec2i E_TYPE
 Texture type.

typedef gutz::arrayWrap1<
V_TYPE
VA_RTYPE
typedef gutz::arrayOwn1< V_TYPEVA_ITYPE
typedef gutz::arrayWrap1<
TC_TYPE
TA_RTYPE
typedef gutz::arrayOwn1< TC_TYPETA_ITYPE
typedef gutz::arrayWrap1<
E_TYPE
EA_RTYPE
typedef gutz::arrayOwn1< E_TYPEEA_ITYPE

Public Member Functions

 VolyTet (gutz::vec3f origin=gutz::vec3f_neg_half, gutz::vec3f size=gutz::vec3f_one)
 VolyTet (gutz::vec3f p0, gutz::vec3f p1, gutz::vec3f p2, gutz::vec3f p4)
virtual ~VolyTet ()
void setSize (gutz::vec3f size)
gutz::vec3f getSize ()
void setOrigin (gutz::vec3f origin)
gutz::vec3f getOrigin ()
virtual void loadField (VolFieldSP f, unsigned int brickNum=0)=0
 set some data, load a field into the volytope

virtual void setData (VA_RTYPE *verts, TA_RTYPE *tcoords, EA_RTYPE *edges)
 Set Data.

virtual VA_RTYPE genVerts (int nVerts)
 Generate Verts.

const VA_RTYPE getVerts () const
 get verts

VA_RTYPE getVerts ()
virtual TA_RTYPE genTcoords (int tNum=0)
 number of texture coordinates must match the number of verticies, thus "tNum" is the texture number, not the number of coordinates

const TA_RTYPE getTcoords (unsigned int tNum=0) const
 get tcoords

TA_RTYPE getTcoords (unsigned int tNum=0)
virtual EA_RTYPE genEdges (int nEdges)
 Generate edges.

const EA_RTYPE getEdges () const
 get edges

EA_RTYPE getEdges ()
int numTextures ()
 texture info

std::vector< gutz::SmartPtr<
TX_TYPE > > 
getTextures ()
gutz::SmartPtr< TX_TYPEgetTexture (int i)
gutz::SmartPtr< TX_TYPEremoveTexture (int i)
void clearTextures ()
void addTexture (glift::SingleTex *tex)
 add Texture

gutz::mat4f getMatrix () const
 get the volume matrix

void setMatrix (gutz::mat4f m)
virtual void setSizes ()
 bounding box update bounding box and center

virtual gutz::vec3f getBoxMax () const
virtual gutz::vec3f getBoxMin () const
gutz::vec3f getCenter () const
virtual void scale (gutz::vec3f scale)
 Transformations.

virtual void translate (gutz::vec3f trans)
 Translate.

void setPointDist (gutz::vec3f pt)
 sorting utilities sets the PointDist to the distance from the point to the nearest vertex of the volytope.

float getPointDist () const

Protected Member Functions

void setDims ()
virtual void writeState (NrroSP n)
 save volytope information into a nrro object

virtual void readState (NrroSP n)
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

gutz::vec3f _origin
gutz::vec3f _size
EA_ITYPE_edges
VA_ITYPE_verts
std::vector< TA_ITYPE * > _tcoords
std::vector< gutz::SmartPtr<
TX_TYPE > > 
_textures
gutz::mat4f _xform
gutz::vec3f _center
gutz::vec3f _min
gutz::vec3f _max
float _dist
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 gutz::vec2i Volytope::E_TYPE [inherited]
 

Texture type.

Definition at line 52 of file Volytope.h.

Referenced by Volytope::genEdges().

typedef gutz::arrayOwn1<E_TYPE> Volytope::EA_ITYPE [inherited]
 

Definition at line 74 of file Volytope.h.

Referenced by Volytope::genEdges(), Volytope::operator=(), and Volytope::setData().

typedef gutz::arrayWrap1<E_TYPE> Volytope::EA_RTYPE [inherited]
 

Definition at line 73 of file Volytope.h.

Referenced by Volytope::genEdges(), and Volytope::getEdges().

typedef gutz::arrayOwn1<TC_TYPE> Volytope::TA_ITYPE [inherited]
 

Definition at line 72 of file Volytope.h.

Referenced by Volytope::genTcoords(), Volytope::operator=(), Volytope::setData(), and Volytope::Volytope().

typedef gutz::arrayWrap1<TC_TYPE> Volytope::TA_RTYPE [inherited]
 

Definition at line 71 of file Volytope.h.

Referenced by Volytope::genTcoords(), and Volytope::getTcoords().

typedef gutz::vec3f Volytope::TC_TYPE [inherited]
 

Vertex type.

Definition at line 50 of file Volytope.h.

Referenced by Volytope::genTcoords(), and Volytope::Volytope().

typedef glift::SingleTex Volytope::TX_TYPE [inherited]
 

Texture Coordinate type.

Definition at line 51 of file Volytope.h.

typedef gutz::vec3f Volytope::V_TYPE [inherited]
 

this is to make this flexible, but not a template: change these to change whole class

Definition at line 49 of file Volytope.h.

Referenced by Volytope::genVerts().

typedef gutz::arrayOwn1<V_TYPE> Volytope::VA_ITYPE [inherited]
 

Definition at line 70 of file Volytope.h.

Referenced by Volytope::genVerts(), Volytope::operator=(), and Volytope::setData().

typedef gutz::arrayWrap1<V_TYPE> Volytope::VA_RTYPE [inherited]
 

Definition at line 69 of file Volytope.h.

Referenced by Volytope::genVerts(), and Volytope::getVerts().


Constructor & Destructor Documentation

VolyTet::VolyTet gutz::vec3f  origin = gutz::vec3f_neg_half,
gutz::vec3f  size = gutz::vec3f_one
 

Definition at line 316 of file VolytopeStd.cpp.

VolyTet::VolyTet gutz::vec3f  p0,
gutz::vec3f  p1,
gutz::vec3f  p2,
gutz::vec3f  p4
 

Definition at line 321 of file VolytopeStd.cpp.

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

Definition at line 123 of file VolytopeStd.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().

void Volytope::addTexture glift::SingleTex tex  )  [inherited]
 

add Texture

Definition at line 193 of file Volytope.cpp.

References Volytope::_textures.

Referenced by VolyCube::loadField(), and VolyCube::VolyCube().

void Volytope::clearTextures  )  [inherited]
 

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

Volytope::EA_RTYPE Volytope::genEdges int  nEdges  )  [virtual, inherited]
 

Generate edges.

Definition at line 128 of file Volytope.cpp.

References Volytope::_edges, Volytope::E_TYPE, Volytope::EA_ITYPE, and Volytope::EA_RTYPE.

Referenced by VolyCube::VolyCube().

Volytope::TA_RTYPE Volytope::genTcoords int  tNum = 0  )  [virtual, inherited]
 

number of texture coordinates must match the number of verticies, thus "tNum" is the texture number, not the number of coordinates

Definition at line 115 of file Volytope.cpp.

References Volytope::_tcoords, Volytope::_verts, gutz::arrayBase< V_TYPE >::size(), Volytope::TA_ITYPE, Volytope::TA_RTYPE, and Volytope::TC_TYPE.

Referenced by VolyCube::VolyCube().

Volytope::VA_RTYPE Volytope::genVerts int  nVerts  )  [virtual, inherited]
 

Generate Verts.

Definition at line 104 of file Volytope.cpp.

References Volytope::_verts, Volytope::V_TYPE, Volytope::VA_ITYPE, and Volytope::VA_RTYPE.

Referenced by VolyCube::VolyCube().

virtual gutz::vec3f Volytope::getBoxMax  )  const [inline, virtual, inherited]
 

Definition at line 121 of file Volytope.h.

References Volytope::_max.

virtual gutz::vec3f Volytope::getBoxMin  )  const [inline, virtual, inherited]
 

Definition at line 122 of file Volytope.h.

References Volytope::_min.

gutz::vec3f Volytope::getCenter  )  const [inline, inherited]
 

Definition at line 123 of file Volytope.h.

References Volytope::_center.

Referenced by Volytope::setPointDist().

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

EA_RTYPE Volytope::getEdges  )  [inline, inherited]
 

Definition at line 101 of file Volytope.h.

References Volytope::_edges, and Volytope::EA_RTYPE.

const EA_RTYPE Volytope::getEdges  )  const [inline, inherited]
 

get edges

Definition at line 100 of file Volytope.h.

References Volytope::_edges, and Volytope::EA_RTYPE.

Referenced by VolyCube::setDims().

gutz::mat4f Volytope::getMatrix  )  const [inline, inherited]
 

get the volume matrix

Definition at line 114 of file Volytope.h.

References Volytope::_xform.

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.

gutz::vec3f VolyTet::getOrigin  )  [inline]
 

Definition at line 129 of file VolytopeStd.h.

References _origin.

float Volytope::getPointDist  )  const [inline, inherited]
 

Definition at line 136 of file Volytope.h.

References Volytope::_dist.

gutz::vec3f VolyTet::getSize  )  [inline]
 

Definition at line 126 of file VolytopeStd.h.

References _size.

Volytope::TA_RTYPE Volytope::getTcoords unsigned int  tNum = 0  )  [inherited]
 

Definition at line 146 of file Volytope.cpp.

References Volytope::_tcoords, and Volytope::TA_RTYPE.

const Volytope::TA_RTYPE Volytope::getTcoords unsigned int  tNum = 0  )  const [inherited]
 

get tcoords

Definition at line 139 of file Volytope.cpp.

References Volytope::_tcoords, and Volytope::TA_RTYPE.

Referenced by VolyCube::checkTcoords(), and VolyCube::setTcoords().

gutz::SmartPtr<TX_TYPE> Volytope::getTexture int  i  )  [inline, inherited]
 

Definition at line 107 of file Volytope.h.

References Volytope::_textures.

std::vector< gutz::SmartPtr<TX_TYPE> > Volytope::getTextures  )  [inline, inherited]
 

Definition at line 106 of file Volytope.h.

References Volytope::_textures.

VA_RTYPE Volytope::getVerts  )  [inline, inherited]
 

Definition at line 86 of file Volytope.h.

References Volytope::_verts, and Volytope::VA_RTYPE.

const VA_RTYPE Volytope::getVerts  )  const [inline, inherited]
 

get verts

Definition at line 85 of file Volytope.h.

References Volytope::_verts, and Volytope::VA_RTYPE.

Referenced by VolyCube::setDims().

virtual void Volytope::loadField VolFieldSP  f,
unsigned int  brickNum = 0
[pure virtual, inherited]
 

set some data, load a field into the volytope

Implemented in VolyCube.

int Volytope::numTextures  )  [inline, inherited]
 

texture info

Definition at line 105 of file Volytope.h.

References Volytope::_textures.

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 void Volytope::readState NrroSP  n  )  [inline, protected, virtual, inherited]
 

Reimplemented in VolyCube.

Definition at line 143 of file Volytope.h.

References SimBase::derr().

gutz::SmartPtr<TX_TYPE> Volytope::removeTexture int  i  )  [inherited]
 

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 Volytope::scale gutz::vec3f  scale  )  [virtual, inherited]
 

Transformations.

Definition at line 201 of file Volytope.cpp.

References Volytope::_verts, scale, Volytope::setSizes(), and gutz::arrayBase< V_TYPE >::size().

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 Volytope::setData VA_RTYPE verts,
TA_RTYPE tcoords,
EA_RTYPE edges
[virtual, inherited]
 

Set Data.

Definition at line 86 of file Volytope.cpp.

References Volytope::_edges, Volytope::_tcoords, Volytope::_verts, Volytope::EA_ITYPE, Volytope::setSizes(), Volytope::TA_ITYPE, and Volytope::VA_ITYPE.

void VolyTet::setDims  )  [protected]
 

Referenced by setOrigin(), and setSize().

void Volytope::setMatrix gutz::mat4f  m  )  [inline, inherited]
 

Definition at line 115 of file Volytope.h.

References Volytope::_xform.

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 VolyTet::setOrigin gutz::vec3f  origin  )  [inline]
 

Definition at line 128 of file VolytopeStd.h.

References _origin, and setDims().

void Volytope::setPointDist gutz::vec3f  pt  )  [inherited]
 

sorting utilities sets the PointDist to the distance from the point to the nearest vertex of the volytope.

getPointDist() is designed to be a very fast call for sorting purposes

Definition at line 177 of file Volytope.cpp.

References Volytope::_dist, and Volytope::getCenter().

void VolyTet::setSize gutz::vec3f  size  )  [inline]
 

Definition at line 125 of file VolytopeStd.h.

References _size, setDims(), and size.

void Volytope::setSizes  )  [virtual, inherited]
 

bounding box update bounding box and center

Definition at line 157 of file Volytope.cpp.

References Volytope::_center, Volytope::_max, Volytope::_min, Volytope::_verts, gutz::g_max(), gutz::g_min(), and gutz::arrayBase< V_TYPE >::size().

Referenced by Volytope::operator=(), Volytope::scale(), Volytope::setData(), VolyCube::setDims(), Volytope::translate(), and Volytope::Volytope().

void Volytope::translate gutz::vec3f  trans  )  [virtual, inherited]
 

Translate.

Definition at line 214 of file Volytope.cpp.

References Volytope::_verts, Volytope::setSizes(), and gutz::arrayBase< V_TYPE >::size().

virtual void Volytope::writeState NrroSP  n  )  [inline, protected, virtual, inherited]
 

save volytope information into a nrro object

Reimplemented in VolyCube.

Definition at line 142 of file Volytope.h.

References SimBase::derr().


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

gutz::vec3f Volytope::_center [protected, inherited]
 

Definition at line 152 of file Volytope.h.

Referenced by Volytope::getCenter(), and Volytope::setSizes().

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

float Volytope::_dist [protected, inherited]
 

Definition at line 155 of file Volytope.h.

Referenced by Volytope::getPointDist(), and Volytope::setPointDist().

EA_ITYPE* Volytope::_edges [protected, inherited]
 

Definition at line 145 of file Volytope.h.

Referenced by Volytope::genEdges(), Volytope::getEdges(), Volytope::operator=(), Volytope::setData(), Volytope::Volytope(), and Volytope::~Volytope().

gutz::vec3f Volytope::_max [protected, inherited]
 

Definition at line 154 of file Volytope.h.

Referenced by Volytope::getBoxMax(), and Volytope::setSizes().

gutz::vec3f Volytope::_min [protected, inherited]
 

Definition at line 153 of file Volytope.h.

Referenced by Volytope::getBoxMin(), and Volytope::setSizes().

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::vec3f VolyTet::_origin [protected]
 

Definition at line 136 of file VolytopeStd.h.

Referenced by getOrigin(), and setOrigin().

gutz::vec3f VolyTet::_size [protected]
 

Definition at line 137 of file VolytopeStd.h.

Referenced by getSize(), and setSize().

std::vector<TA_ITYPE*> Volytope::_tcoords [protected, inherited]
 

Definition at line 147 of file Volytope.h.

Referenced by Volytope::genTcoords(), Volytope::getTcoords(), Volytope::operator=(), Volytope::setData(), Volytope::Volytope(), and Volytope::~Volytope().

std::vector< gutz::SmartPtr<TX_TYPE> > Volytope::_textures [protected, inherited]
 

Definition at line 149 of file Volytope.h.

Referenced by Volytope::addTexture(), Volytope::getTexture(), Volytope::getTextures(), Volytope::numTextures(), and Volytope::operator=().

VA_ITYPE* Volytope::_verts [protected, inherited]
 

Definition at line 146 of file Volytope.h.

Referenced by Volytope::genTcoords(), Volytope::genVerts(), Volytope::getVerts(), Volytope::operator=(), Volytope::scale(), Volytope::setData(), Volytope::setSizes(), Volytope::translate(), Volytope::Volytope(), and Volytope::~Volytope().

gutz::mat4f Volytope::_xform [protected, inherited]
 

Definition at line 151 of file Volytope.h.

Referenced by Volytope::getMatrix(), and Volytope::setMatrix().


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