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

VolytopeVec Class Reference

#include <Volytope.h>

Inheritance diagram for VolytopeVec:

SimBase List of all members.

Detailed Description

VolytopeVec.

Definition at line 170 of file Volytope.h.

Volytope management

void setVoly (VolytopeSP v, int i=0)
VolytopeSP getVoly (int i=0) const
void addVoly (VolytopeSP &v)

Fields

void setField (VolFieldSP f)
 Set field.


bounding boxes and sizes

gutz::vec3f getBoxMax () const
 Bounding box max.

gutz::vec3f getBoxMin () const
 Bounding box min.

gutz::vec3f getSize ()
void setSize (float size)
 sets the maximum dimension to "size"

gutz::vec3f getScale () const
 the scaling that returns the volytopes to their orginal size if you resized the volytopes this is the scale vector that undoes it.


transformations

void scale (gutz::vec3f scl)
 transformations

void translate (gutz::vec3f trans)
 Center.


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

 VolytopeVec ()
virtual ~VolytopeVec ()
void center ()
 center the volytopes around their center of mass

VolytopeVec sortFromPoint (gutz::vec3f pt)
 Sorting distance from a point, this only works if your volytopes are uniformly subdivided cubes.

gutz::vec3f getCenter () const
 get the center of all volytopes in this collection


Protected Attributes

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

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


Constructor & Destructor Documentation

VolytopeVec::VolytopeVec  )  [inline]
 

Definition at line 175 of file Volytope.h.

References _scale.

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

Definition at line 176 of file Volytope.h.


Member Function Documentation

void VolytopeVec::addVoly VolytopeSP v  )  [inline]
 

Definition at line 184 of file Volytope.h.

References v.

void VolytopeVec::center  ) 
 

center the volytopes around their center of mass

first figure out the dimensions

the amount to translate

Definition at line 326 of file Volytope.cpp.

References getBoxMax(), getBoxMin(), translate(), and gutz::vec3f.

Referenced by Volume::updateRectLin().

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

gutz::vec3f VolytopeVec::getBoxMax  )  const
 

Bounding box max.

Definition at line 259 of file Volytope.cpp.

References gutz::g_max(), getVoly(), gutz::SmartPtr< Volytope >::isNull(), size, and gutz::vec3f.

Referenced by center(), getCenter(), getSize(), and setSize().

gutz::vec3f VolytopeVec::getBoxMin  )  const
 

Bounding box min.

Definition at line 281 of file Volytope.cpp.

References gutz::g_min(), getVoly(), gutz::SmartPtr< Volytope >::isNull(), size, and gutz::vec3f.

Referenced by center(), getCenter(), getSize(), and setSize().

gutz::vec3f VolytopeVec::getCenter  )  const [inline]
 

get the center of all volytopes in this collection

Definition at line 224 of file Volytope.h.

References getBoxMax(), and getBoxMin().

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

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 VolytopeVec::getScale  )  const [inline]
 

the scaling that returns the volytopes to their orginal size if you resized the volytopes this is the scale vector that undoes it.

Definition at line 203 of file Volytope.h.

References _scale.

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

Definition at line 198 of file Volytope.h.

References getBoxMax(), and getBoxMin().

VolytopeSP VolytopeVec::getVoly int  i = 0  )  const [inline]
 

Definition at line 183 of file Volytope.h.

References VolytopeSP.

Referenced by getBoxMax(), getBoxMin(), scale(), setField(), sortFromPoint(), and translate().

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 VolytopeVec::scale gutz::vec3f  scl  ) 
 

transformations

Center

Definition at line 344 of file Volytope.cpp.

References getVoly(), gutz::SmartPtr< Volytope >::isNull(), and size.

Referenced by setSize().

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 VolytopeVec::setField VolFieldSP  f  ) 
 

Set field.

Definition at line 239 of file Volytope.cpp.

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

Referenced by Volume::updateVolytopesRL().

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 VolytopeVec::setSize float  sz  ) 
 

sets the maximum dimension to "size"

first figure out the scale factor

find the largest axis

scale so the largest axis

keep track of what we did to the volys

Definition at line 303 of file Volytope.cpp.

References _scale, getBoxMax(), getBoxMin(), scale(), gutz::vec3f, and gutz::vec3f_one.

Referenced by Volume::updateRectLin().

void VolytopeVec::setVoly VolytopeSP  v,
int  i = 0
[inline]
 

Definition at line 182 of file Volytope.h.

References v.

VolytopeVec VolytopeVec::sortFromPoint gutz::vec3f  pt  ) 
 

Sorting distance from a point, this only works if your volytopes are uniformly subdivided cubes.

Definition at line 385 of file Volytope.cpp.

References getVoly(), gutz::SmartPtr< Volytope >::isNull(), and size.

void VolytopeVec::translate gutz::vec3f  trans  ) 
 

Center.

Definition at line 359 of file Volytope.cpp.

References getVoly(), gutz::SmartPtr< Volytope >::isNull(), and size.

Referenced by center().


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

gutz::vec3f VolytopeVec::_scale [protected]
 

Definition at line 232 of file Volytope.h.

Referenced by getScale(), setSize(), and VolytopeVec().


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