#include <Volytope.h>
Inheritance diagram for Volytope:
Definition at line 41 of file Volytope.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 | |
Volytope (unsigned int nElements=5000, unsigned int nTcoords=1, unsigned int nPrims=1000) | |
Edge type//////////////////////////////////////. | |
virtual | ~Volytope () |
Destruction. | |
Volytope (const Volytope &v) | |
void | operator= (const Volytope &v) |
Assignment. | |
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_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 | |
Volytope (std::string name) | |
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 | |
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 genEdges(). |
|
Definition at line 74 of file Volytope.h. Referenced by genEdges(), operator=(), and setData(). |
|
Definition at line 73 of file Volytope.h. Referenced by genEdges(), and getEdges(). |
|
Definition at line 72 of file Volytope.h. Referenced by genTcoords(), operator=(), setData(), and Volytope(). |
|
Definition at line 71 of file Volytope.h. Referenced by genTcoords(), and getTcoords(). |
|
Vertex type.
Definition at line 50 of file Volytope.h. Referenced by genTcoords(), and 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 genVerts(). |
|
Definition at line 70 of file Volytope.h. Referenced by genVerts(), operator=(), and setData(). |
|
Definition at line 69 of file Volytope.h. Referenced by genVerts(), and getVerts(). |
|
Edge type//////////////////////////////////////.
Definition at line 31 of file Volytope.cpp. References _tcoords, setSizes(), TA_ITYPE, and TC_TYPE. |
|
Destruction.
Definition at line 47 of file Volytope.cpp. |
|
Definition at line 61 of file Volytope.h. References operator=(), and v. |
|
Definition at line 139 of file Volytope.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 _textures. Referenced by VolyCube::loadField(), and VolyCube::VolyCube(). |
|
|
|
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 _edges, E_TYPE, EA_ITYPE, and EA_RTYPE. Referenced by VolyCube::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 _tcoords, _verts, gutz::arrayBase< V_TYPE >::size(), TA_ITYPE, TA_RTYPE, and TC_TYPE. Referenced by VolyCube::VolyCube(). |
|
Generate Verts.
Definition at line 104 of file Volytope.cpp. References _verts, V_TYPE, VA_ITYPE, and VA_RTYPE. Referenced by VolyCube::VolyCube(). |
|
Definition at line 121 of file Volytope.h. References _max. |
|
Definition at line 122 of file Volytope.h. References _min. |
|
Definition at line 123 of file Volytope.h. References _center. Referenced by 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. |
|
get edges
Definition at line 100 of file Volytope.h. References _edges, and EA_RTYPE. Referenced by VolyCube::setDims(). |
|
get the volume matrix
Definition at line 114 of file Volytope.h. References _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 136 of file Volytope.h. References _dist. |
|
Definition at line 146 of file Volytope.cpp. |
|
get tcoords
Definition at line 139 of file Volytope.cpp. References _tcoords, and TA_RTYPE. Referenced by VolyCube::checkTcoords(), and VolyCube::setTcoords(). |
|
Definition at line 107 of file Volytope.h. References _textures. |
|
Definition at line 106 of file Volytope.h. References _textures. |
|
Definition at line 86 of file Volytope.h. |
|
get verts
Definition at line 85 of file Volytope.h. References _verts, and VA_RTYPE. Referenced by VolyCube::setDims(). |
|
set some data, load a field into the volytope
Implemented in VolyCube. |
|
texture info
Definition at line 105 of file Volytope.h. References _textures. |
|
Assignment.
Definition at line 62 of file Volytope.cpp. References _edges, _tcoords, _textures, _verts, EA_ITYPE, setSizes(), TA_ITYPE, v, and VA_ITYPE. Referenced by VolyCube::operator=(), and Volytope(). |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
Reimplemented in VolyCube. Definition at line 143 of file Volytope.h. References SimBase::derr(). |
|
|
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Transformations.
Definition at line 201 of file Volytope.cpp. References _verts, scale, 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 _edges, _tcoords, _verts, EA_ITYPE, setSizes(), TA_ITYPE, and VA_ITYPE. |
|
Definition at line 115 of file Volytope.h. References _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(). |
|
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 _dist, and getCenter(). |
|
bounding box update bounding box and center
Definition at line 157 of file Volytope.cpp. References _center, _max, _min, _verts, gutz::g_max(), gutz::g_min(), and gutz::arrayBase< V_TYPE >::size(). Referenced by operator=(), scale(), setData(), VolyCube::setDims(), translate(), and Volytope(). |
|
Translate.
Definition at line 214 of file Volytope.cpp. References _verts, setSizes(), and gutz::arrayBase< V_TYPE >::size(). |
|
save volytope information into a nrro object
Reimplemented in VolyCube. Definition at line 142 of file Volytope.h. References SimBase::derr(). |
|
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 getCenter(), and 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 getPointDist(), and setPointDist(). |
|
Definition at line 145 of file Volytope.h. Referenced by genEdges(), getEdges(), operator=(), setData(), Volytope(), and ~Volytope(). |
|
Definition at line 154 of file Volytope.h. Referenced by getBoxMax(), and setSizes(). |
|
Definition at line 153 of file Volytope.h. Referenced by getBoxMin(), and 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 147 of file Volytope.h. Referenced by genTcoords(), getTcoords(), operator=(), setData(), Volytope(), and ~Volytope(). |
|
Definition at line 149 of file Volytope.h. Referenced by addTexture(), getTexture(), getTextures(), numTextures(), and operator=(). |
|
Definition at line 146 of file Volytope.h. Referenced by genTcoords(), genVerts(), getVerts(), operator=(), scale(), setData(), setSizes(), translate(), Volytope(), and ~Volytope(). |
|
Definition at line 151 of file Volytope.h. Referenced by getMatrix(), and setMatrix(). |