#include <VolytopeStd.h>
Inheritance diagram for VolyCube:
Defaults to a unit cube centered about (0,0,0)
Definition at line 32 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_TYPE > | VA_ITYPE |
typedef gutz::arrayWrap1< TC_TYPE > | TA_RTYPE |
typedef gutz::arrayOwn1< TC_TYPE > | TA_ITYPE |
typedef gutz::arrayWrap1< E_TYPE > | EA_RTYPE |
typedef gutz::arrayOwn1< E_TYPE > | EA_ITYPE |
Public Member Functions | |
VolyCube (gutz::vec3f origin=gutz::vec3f_neg_half, gutz::vec3f size=gutz::vec3f_one, gutz::vec3f lltex=gutz::vec3f_zero, gutz::vec3f urtex=gutz::vec3f_one) | |
VolyCube (NrroSP nrro) | |
Create a VolyCube from a nrro, you have to add the texture yourself. | |
VolyCube (VolFieldSP f, unsigned int brickNum=0) | |
Creat a VolyCube from a VolField, adds the texture for you. | |
VolyCube (const VolyCube &v) | |
virtual | ~VolyCube () |
virtual void | operator= (const VolyCube &v) |
void | setOrigin (gutz::vec3f origin) |
gutz::vec3f | getOrigin () |
void | setSize (gutz::vec3f size) |
gutz::vec3f | getSize () |
virtual void | loadField (VolFieldSP f, unsigned int brickNum=0) |
Load Field. | |
virtual void | loadNrro (NrroSP n) |
Load Nrro. | |
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_TYPE > | getTexture (int i) |
gutz::SmartPtr< TX_TYPE > | removeTexture (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 | |
virtual void | writeState (NrroSP n) |
save volytope information into a nrro object | |
virtual void | readState (NrroSP n) |
read state | |
void | setDims (gutz::vec3f origin, gutz::vec3f size) |
set dims | |
void | setNrroDims (NrroSP n) |
set Nrro Dims | |
void | setTcoords (gutz::vec3f lltex, gutz::vec3f urtex, unsigned int texNum) |
set tcoords | |
void | setNrroTcoords (NrroSP n, int texNum) |
if texNum == -1, it checks to make sure the texture coordinates are the same, if not, it adds another texture coodinate set | |
bool | checkTcoords (gutz::vec3f lltex, gutz::vec3f urtex, unsigned int texNum) |
check texture coordinates | |
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 |
|
Texture type.
Definition at line 52 of file Volytope.h. Referenced by Volytope::genEdges(). |
|
Definition at line 74 of file Volytope.h. Referenced by Volytope::genEdges(), Volytope::operator=(), and Volytope::setData(). |
|
Definition at line 73 of file Volytope.h. Referenced by Volytope::genEdges(), and Volytope::getEdges(). |
|
Definition at line 72 of file Volytope.h. Referenced by Volytope::genTcoords(), Volytope::operator=(), Volytope::setData(), and Volytope::Volytope(). |
|
Definition at line 71 of file Volytope.h. Referenced by Volytope::genTcoords(), and Volytope::getTcoords(). |
|
Vertex type.
Definition at line 50 of file Volytope.h. Referenced by Volytope::genTcoords(), and Volytope::Volytope(). |
|
Texture Coordinate type.
Definition at line 51 of file Volytope.h. |
|
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(). |
|
Definition at line 70 of file Volytope.h. Referenced by Volytope::genVerts(), Volytope::operator=(), and Volytope::setData(). |
|
Definition at line 69 of file Volytope.h. Referenced by Volytope::genVerts(), and Volytope::getVerts(). |
|
Definition at line 34 of file VolytopeStd.cpp. References _origin, _size, Volytope::genEdges(), Volytope::genTcoords(), Volytope::genVerts(), setDims(), setTcoords(), size, and string. |
|
Create a VolyCube from a nrro, you have to add the texture yourself.
Definition at line 47 of file VolytopeStd.cpp. References _origin, _size, SimBase::derr(), Volytope::genEdges(), Volytope::genTcoords(), Volytope::genVerts(), setDims(), setNrroDims(), setNrroTcoords(), setTcoords(), string, gutz::vec3f_neg_half, gutz::vec3f_one, and gutz::vec3f_zero. |
|
Creat a VolyCube from a VolField, adds the texture for you.
Definition at line 73 of file VolytopeStd.cpp. References _origin, _size, Volytope::addTexture(), SimBase::derr(), Volytope::genEdges(), Volytope::genTcoords(), Volytope::genVerts(), gutz::SmartPtr< VolField >::isNull(), setDims(), setNrroDims(), setNrroTcoords(), setTcoords(), gutz::vec3f_one, and gutz::vec3f_zero. |
|
Definition at line 45 of file VolytopeStd.h. |
|
Definition at line 48 of file VolytopeStd.h. |
|
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(). |
|
add Texture
Definition at line 193 of file Volytope.cpp. References Volytope::_textures. Referenced by loadField(), and VolyCube(). |
|
check texture coordinates
Definition at line 232 of file VolytopeStd.cpp. References Volytope::getTcoords(). Referenced by setNrroTcoords(). |
|
|
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
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(). |
|
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(). |
|
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(). |
|
Definition at line 121 of file Volytope.h. References Volytope::_max. |
|
Definition at line 122 of file Volytope.h. References Volytope::_min. |
|
Definition at line 123 of file Volytope.h. References Volytope::_center. Referenced by Volytope::setPointDist(). |
|
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 101 of file Volytope.h. References Volytope::_edges, and Volytope::EA_RTYPE. |
|
get edges
Definition at line 100 of file Volytope.h. References Volytope::_edges, and Volytope::EA_RTYPE. Referenced by setDims(). |
|
get the volume matrix
Definition at line 114 of file Volytope.h. References Volytope::_xform. |
|
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 53 of file VolytopeStd.h. References _origin. |
|
Definition at line 136 of file Volytope.h. References Volytope::_dist. |
|
Definition at line 56 of file VolytopeStd.h. References _size. |
|
Definition at line 146 of file Volytope.cpp. References Volytope::_tcoords, and Volytope::TA_RTYPE. |
|
get tcoords
Definition at line 139 of file Volytope.cpp. References Volytope::_tcoords, and Volytope::TA_RTYPE. Referenced by checkTcoords(), and setTcoords(). |
|
Definition at line 107 of file Volytope.h. References Volytope::_textures. |
|
Definition at line 106 of file Volytope.h. References Volytope::_textures. |
|
Definition at line 86 of file Volytope.h. References Volytope::_verts, and Volytope::VA_RTYPE. |
|
get verts
Definition at line 85 of file Volytope.h. References Volytope::_verts, and Volytope::VA_RTYPE. Referenced by setDims(). |
|
Load Field.
Implements Volytope. Definition at line 150 of file VolytopeStd.cpp. References Volytope::addTexture(), and loadNrro(). |
|
Load Nrro.
Definition at line 159 of file VolytopeStd.cpp. References SimBase::derr(), n, and setNrroTcoords(). Referenced by loadField(). |
|
texture info
Definition at line 105 of file Volytope.h. References Volytope::_textures. |
|
Definition at line 50 of file VolytopeStd.h. References Volytope::operator=(), and v. |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
read state didn't find saved info did find it read vec3 from string, check if good not good couldn't read it can't get here! Reimplemented from Volytope. Definition at line 257 of file VolytopeStd.cpp. References _size, SimBase::derr(), n, VC_SIZE_KEY_STR(), and gutz::vec3f_neg_one. Referenced by setNrroDims(). |
|
|
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Transformations.
Definition at line 201 of file Volytope.cpp. References Volytope::_verts, scale, Volytope::setSizes(), and gutz::arrayBase< V_TYPE >::size(). |
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update(). |
|
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. |
|
set dims
Definition at line 98 of file VolytopeStd.cpp. References Volytope::getEdges(), Volytope::getVerts(), Volytope::setSizes(), size, v, gutz::vec2i, gutz::vec3f_x, gutz::vec3f_xy, gutz::vec3f_xyz, gutz::vec3f_xz, gutz::vec3f_y, gutz::vec3f_yz, and gutz::vec3f_z. Referenced by setNrroDims(), setOrigin(), setSize(), and VolyCube(). |
|
Definition at line 115 of file Volytope.h. References Volytope::_xform. |
|
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 Nrro Dims see if the nrro has a better idea about it's size Definition at line 174 of file VolytopeStd.cpp. References _origin, _size, n, readState(), setDims(), and gutz::vec3f_neg_one. Referenced by VolyCube(). |
|
if texNum == -1, it checks to make sure the texture coordinates are the same, if not, it adds another texture coodinate set texture coordinates lower-left & upper right get the ranges of valid data values from the nrrd for each axis figure out what where the valid ranges are in terms of texture coordnates Always offset texture coordinates by a half!!!! because that's the way opengl stores them? Definition at line 192 of file VolytopeStd.cpp. References checkTcoords(), n, setTcoords(), gutz::vec2ui, gutz::vec3f, gutz::vec3f_one, and gutz::vec3f_zero. Referenced by loadNrro(), and VolyCube(). |
|
Definition at line 52 of file VolytopeStd.h. |
|
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(). |
|
Definition at line 55 of file VolytopeStd.h. |
|
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(), setDims(), Volytope::translate(), and Volytope::Volytope(). |
|
set tcoords
Definition at line 133 of file VolytopeStd.cpp. References Volytope::getTcoords(), t, and gutz::vec3f. Referenced by setNrroTcoords(), and VolyCube(). |
|
Translate.
Definition at line 214 of file Volytope.cpp. References Volytope::_verts, Volytope::setSizes(), and gutz::arrayBase< V_TYPE >::size(). |
|
save volytope information into a nrro object
Reimplemented from Volytope. Definition at line 243 of file VolytopeStd.cpp. References _size, n, and VC_SIZE_KEY_STR(). |
|
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 152 of file Volytope.h. Referenced by Volytope::getCenter(), and Volytope::setSizes(). |
|
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(). |
|
Definition at line 155 of file Volytope.h. Referenced by Volytope::getPointDist(), and Volytope::setPointDist(). |
|
Definition at line 145 of file Volytope.h. Referenced by Volytope::genEdges(), Volytope::getEdges(), Volytope::operator=(), Volytope::setData(), Volytope::Volytope(), and Volytope::~Volytope(). |
|
Definition at line 154 of file Volytope.h. Referenced by Volytope::getBoxMax(), and Volytope::setSizes(). |
|
Definition at line 153 of file Volytope.h. Referenced by Volytope::getBoxMin(), and Volytope::setSizes(). |
|
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 80 of file VolytopeStd.h. Referenced by getOrigin(), setNrroDims(), setOrigin(), setSize(), and VolyCube(). |
|
Definition at line 81 of file VolytopeStd.h. Referenced by getSize(), readState(), setNrroDims(), setOrigin(), setSize(), VolyCube(), and writeState(). |
|
Definition at line 147 of file Volytope.h. Referenced by Volytope::genTcoords(), Volytope::getTcoords(), Volytope::operator=(), Volytope::setData(), Volytope::Volytope(), and Volytope::~Volytope(). |
|
Definition at line 149 of file Volytope.h. Referenced by Volytope::addTexture(), Volytope::getTexture(), Volytope::getTextures(), Volytope::numTextures(), and Volytope::operator=(). |
|
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(). |
|
Definition at line 151 of file Volytope.h. Referenced by Volytope::getMatrix(), and Volytope::setMatrix(). |