#include <TFItemSTD.h>
Inheritance diagram for TFBoxItem:
Definition at line 27 of file TFItemSTD.h.
Public Types | |
enum | BOX_ITEM_VERT_IDS { LL, LR, TL, TR, VERT_LAST } |
enum | BOX_ITEM_EDGE_IDS { L, R, T, B, EDGE_LAST } |
Public Member Functions | |
TFBoxItem (QCanvas *canvas, TFElementBox *belt) | |
construct | |
virtual | ~TFBoxItem () |
virtual void | setBoxDims (gutz::vec2f ll, gutz::vec2f ur) |
set box dims | |
virtual void | childUpdate (CanvasItemBase *child) |
child update | |
virtual void | childMovedBy (CanvasItemBase *child, gutz::vec3d dv) |
child moded by | |
virtual void | childMoved (CanvasItemBase *child, gutz::vec3d last, gutz::vec3d point) |
child moved | |
STF::tfSType | getTFLeft () const |
elements in tf element based on current axies left | |
void | setTFLeft (STF::tfSType left) |
STF::tfSType | getTFRight () const |
right | |
void | setTFRight (STF::tfSType right) |
STF::tfSType | getTFTop () const |
top | |
void | setTFTop (STF::tfSType top) |
STF::tfSType | getTFBottom () const |
bottom | |
void | setTFBottom (STF::tfSType bottom) |
TFEltSP | getElt () const |
transfer function element that we own | |
void | setElt (TFEltSP elt) |
void | setAxisX (int elm) |
which TF axies are we visualizing??? could be exteded to 3D... | |
int | getAxisX () const |
void | setAxisY (int elm) |
int | getAxisY () const |
tfVec2 | getTFPosCA (int i) |
get/set Pos in TF element for the Current Axies | |
void | setTFPosCA (int i, tfVec2 pos) |
setTFPosCA | |
void | update () |
checks if anything in the TFElement changed if it has, calls updateDef() | |
bool | deleteMe () const |
indicate to parents or pointers that we need to be removed | |
virtual tfMat3 | getXform () const |
get the transformation | |
virtual tfMat3 | getInvXform () const |
virtual tfVec2 | xform (tfVec2 pt) const |
transform a point (tf -> canvas) | |
virtual STF::tfSType | xformX (STF::tfSType x) const |
virtual STF::tfSType | xformY (STF::tfSType y) const |
virtual tfVec2 | invXform (tfVec2 pt) const |
inverse transform (canvas -> tf) | |
virtual STF::tfSType | invXformX (STF::tfSType x) const |
virtual STF::tfSType | invXformY (STF::tfSType y) const |
tfVec2 | getBorder () const |
set the border space around tf, in pixels (canvas space) | |
void | setBorder (tfVec2 b) |
tfVec2 | getScale () const |
set the scale factor to go from [0-1] tf space to "canvas space" and the inverse of that, ie. | |
tfVec2 | getInvScale () const |
void | setScale (tfVec2 scales) |
setScale | |
virtual void | setPoints (QPointArray p) |
Set Points. | |
QPointArray | areaPoints () const |
Area points. | |
virtual void | moveBy (double dx, double dy) |
virtual void | moveBy (gutz::vec3d dv) |
this (incrmentaly) translates each node by differential vec "dv" | |
virtual void | setSelected (bool yes) |
is it selected? (currently being modified) bool isSelected() declared in QCanvasItem | |
virtual void | setActive (bool yes) |
has it been selected and modifiable as a group? bool isActive() declared in QCanvasItem | |
bool | getUpdateLinks () const |
do you want this object to update other objects that are linked to it? | |
void | setUpdateLinks (bool yes) |
Protected Member Functions | |
virtual void | updateDef () |
update def | |
virtual void | initBox () |
init box | |
virtual void | setDims () |
virtual void | moveNode (int nodeIdx, gutz::vec3d dv) |
these take delta vectors, not absolute, the absolute position is contained in the object | |
virtual void | moveEdge (int edgeIdx, gutz::vec3d dv) |
move edge | |
void | setTransform () |
set Transform | |
virtual void | drawShape (QPainter &p) |
Draw Shape. | |
void | nukePoints () |
Nuke Points. | |
void | nukeEdges () |
Nuke Edges. | |
int | getEdgeIndex (CanvasItemBase *ptr) |
returns -1 if not an edge/node respectively | |
int | getNodeIndex (CanvasItemBase *ptr) |
node index | |
void | updatePen () |
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 | |
TFElementBoxSP | _belt |
bool | _moving |
TFEltSP | _elt |
tfVec2 | _scale |
tfVec2 | _invScale |
tfVec2 | _border |
tfMat3 | _xform |
tfMat3 | _invXform |
int | _axisX |
int | _axisY |
int | _lastEltMod |
int | _lastElmMod |
id for last elt mod | |
bool | _done |
id for last element mod | |
NodeItemVec | _points |
EdgeItemVec | _edges |
CompositeItem * | _comp |
bool | _updateLinks |
Friends | |
class | SmartPtr |
class | SmartPtrRef |
|
Definition at line 33 of file TFItemSTD.h. |
|
Definition at line 32 of file TFItemSTD.h. |
|
construct
Definition at line 34 of file TFItemSTD.cpp. References _belt, initBox(), and gutz::SmartPtr< TFElementBox >::isNull(). |
|
Definition at line 30 of file TFItemSTD.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(). |
|
Area points.
Implements CanvasItemIF. Definition at line 360 of file CanvasItems.cpp. References PolygonEdit::_points, x, and y. |
|
child moved prevent loops Reimplemented from PolygonEdit. Definition at line 144 of file TFItemSTD.cpp. References _moving, PolygonEdit::getEdgeIndex(), PolygonEdit::getNodeIndex(), moveEdge(), moveNode(), and setDims(). |
|
child moded by prevent loops Reimplemented from PolygonEdit. Definition at line 121 of file TFItemSTD.cpp. References _moving, PolygonEdit::getEdgeIndex(), PolygonEdit::getNodeIndex(), moveEdge(), moveNode(), and setDims(). |
|
child update
Reimplemented from PolygonEdit. Definition at line 114 of file TFItemSTD.cpp. |
|
indicate to parents or pointers that we need to be removed
Definition at line 81 of file TFItem.h. References TFItem::_done. |
|
Draw Shape.
Implements CanvasItemIF. Definition at line 417 of file CanvasItems.cpp. |
|
Definition at line 67 of file TFItem.h. References TFItem::_axisX. |
|
Definition at line 69 of file TFItem.h. References TFItem::_axisY. |
|
set the border space around tf, in pixels (canvas space)
Definition at line 98 of file TFItem.h. References TFItem::_border, and tfVec2. |
|
returns -1 if not an edge/node respectively
Definition at line 424 of file CanvasItems.cpp. References PolygonEdit::_edges. Referenced by childMoved(), and childMovedBy(). |
|
transfer function element that we own
Definition at line 61 of file TFItem.h. References TFItem::_elt. |
|
Definition at line 105 of file TFItem.h. References TFItem::_invScale, and tfVec2. |
|
Definition at line 85 of file TFItem.h. References TFItem::_invXform, and tfMat3. |
|
node index
Definition at line 435 of file CanvasItems.cpp. References PolygonEdit::_points. Referenced by childMoved(), and childMovedBy(). |
|
set the scale factor to go from [0-1] tf space to "canvas space" and the inverse of that, ie. scale should probably just be the canvas width and height. Definition at line 104 of file TFItem.h. References TFItem::_scale, and tfVec2. |
|
bottom
Definition at line 55 of file TFItemSTD.h. References TFItem::_axisY, _belt, and TFItem::xformY(). Referenced by initBox(), moveEdge(), moveNode(), and setDims(). |
|
elements in tf element based on current axies left
Definition at line 43 of file TFItemSTD.h. References TFItem::_axisX, _belt, and TFItem::xformX(). Referenced by initBox(), moveEdge(), moveNode(), and setDims(). |
|
get/set Pos in TF element for the Current Axies get tf element make sure we are good get position get elements that correspond to current axes Definition at line 70 of file TFItem.cpp. References TFItem::_axisX, TFItem::_axisY, TFItem::_elt, TFElement::getPos(), TFElement::getPosVec(), gutz::SmartPtrRef< TFElement >::getPtr(), tfVec2, and tfVec2_bad. |
|
right
Definition at line 47 of file TFItemSTD.h. References TFItem::_axisX, _belt, and TFItem::xformX(). Referenced by initBox(), moveEdge(), moveNode(), and setDims(). |
|
top
Definition at line 51 of file TFItemSTD.h. References TFItem::_axisY, _belt, and TFItem::xformY(). Referenced by initBox(), moveEdge(), moveNode(), and setDims(). |
|
do you want this object to update other objects that are linked to it?
Definition at line 117 of file commonQt/canvas/CanvasItems.h. References CanvasItemIF::_updateLinks. |
|
get the transformation
Definition at line 84 of file TFItem.h. References TFItem::_xform, and tfMat3. |
|
init box edges have global manipulation, so we turn off auto node update so we can do that ourselves Definition at line 48 of file TFItemSTD.cpp. References PolygonEdit::_edges, PolygonEdit::_points, B, EdgeItemSP, EdgeItemVec, getTFBottom(), getTFLeft(), getTFRight(), getTFTop(), L, LL, LR, NodeItemSP, NodeItemVec, R, T, TL, and TR. Referenced by TFBoxItem(). |
|
inverse transform (canvas -> tf)
Definition at line 93 of file TFItem.h. References TFItem::_invXform, tfVec2, and gutz::mat3< STF::tfSType >::tpoint(). |
|
Definition at line 94 of file TFItem.h. References TFItem::_invXform, and x. Referenced by setTFLeft(), and setTFRight(). |
|
Definition at line 95 of file TFItem.h. References TFItem::_invXform, and y. Referenced by setTFBottom(), and setTFTop(). |
|
this (incrmentaly) translates each node by differential vec "dv"
Definition at line 446 of file CanvasItems.cpp. References PolygonEdit::_points. |
|
Definition at line 262 of file commonQt/canvas/CanvasItems.h. |
|
move edge
Definition at line 195 of file TFItemSTD.cpp. References getTFBottom(), getTFLeft(), getTFRight(), getTFTop(), setTFBottom(), setTFLeft(), setTFRight(), and setTFTop(). Referenced by childMoved(), and childMovedBy(). |
|
these take delta vectors, not absolute, the absolute position is contained in the object
Definition at line 167 of file TFItemSTD.cpp. References getTFBottom(), getTFLeft(), getTFRight(), getTFTop(), LL, LR, setTFBottom(), setTFLeft(), setTFRight(), setTFTop(), TL, TR, and gutz::vec3d_zero. Referenced by childMoved(), and childMovedBy(). |
|
Nuke Edges.
Definition at line 406 of file CanvasItems.cpp. References PolygonEdit::_edges, and EdgeItemVec. Referenced by PolygonEdit::setPoints(), and PolygonEdit::~PolygonEdit(). |
|
Nuke Points.
Definition at line 395 of file CanvasItems.cpp. References PolygonEdit::_points, and NodeItemVec. Referenced by PolygonEdit::setPoints(), and PolygonEdit::~PolygonEdit(). |
|
has it been selected and modifiable as a group? bool isActive() declared in QCanvasItem
Definition at line 68 of file CanvasItems.cpp. |
|
which TF axies are we visualizing??? could be exteded to 3D... later Definition at line 66 of file TFItem.h. References TFItem::_axisX. |
|
Definition at line 68 of file TFItem.h. References TFItem::_axisY. |
|
Definition at line 99 of file TFItem.h. References TFItem::_border, and TFItem::setTransform(). |
|
set box dims
Definition at line 87 of file TFItemSTD.cpp. References PolygonEdit::_points, LL, LR, TL, and TR. Referenced by setDims(). |
|
Definition at line 98 of file TFItemSTD.cpp. References getTFBottom(), getTFLeft(), getTFRight(), getTFTop(), setBoxDims(), and gutz::vec2f. Referenced by childMoved(), childMovedBy(), and updateDef(). |
|
Definition at line 62 of file TFItem.h. References TFItem::_elt. |
|
Set Points. create nodes create points Definition at line 374 of file CanvasItems.cpp. References PolygonEdit::_edges, PolygonEdit::_points, EdgeItemSP, NodeItemSP, PolygonEdit::nukeEdges(), and PolygonEdit::nukePoints(). Referenced by TFView::TFView(). |
|
setScale
Definition at line 102 of file TFItem.cpp. References TFItem::_invScale, TFItem::_scale, TFItem::setTransform(), gutz::vec2< tfSType >::x, and gutz::vec2< tfSType >::y. |
|
is it selected? (currently being modified) bool isSelected() declared in QCanvasItem
Definition at line 61 of file CanvasItems.cpp. |
|
Definition at line 56 of file TFItemSTD.h. References TFItem::_axisY, _belt, TFItem::invXformY(), and TFElementBox::LL. Referenced by moveEdge(), and moveNode(). |
|
Definition at line 44 of file TFItemSTD.h. References TFItem::_axisX, _belt, TFItem::invXformX(), and TFElementBox::LL. Referenced by moveEdge(), and moveNode(). |
|
setTFPosCA get tf element make sure we are good Definition at line 86 of file TFItem.cpp. References TFItem::_axisX, TFItem::_axisY, TFItem::_elt, TFElement::getPos(), TFElement::getPosVec(), gutz::SmartPtrRef< TFElement >::getPtr(), TFElement::setPos(), gutz::vec2< tfSType >::x, and gutz::vec2< tfSType >::y. |
|
Definition at line 48 of file TFItemSTD.h. References TFItem::_axisX, _belt, TFItem::invXformX(), and TFElementBox::UR. Referenced by moveEdge(), and moveNode(). |
|
Definition at line 52 of file TFItemSTD.h. References TFItem::_axisY, _belt, TFItem::invXformY(), and TFElementBox::UR. Referenced by moveEdge(), and moveNode(). |
|
set Transform set to identity TODO: looks like the mat3 inverse is fucked up, shouldn't need a transpose, need to fix this! Definition at line 112 of file TFItem.cpp. References TFItem::_border, TFItem::_invXform, TFItem::_scale, TFItem::_xform, gutz::mat3< STF::tfSType >::eye(), gutz::mat3< STF::tfSType >::inv(), scale, gutz::vec2< tfSType >::x, and gutz::vec2< tfSType >::y. Referenced by TFItem::setBorder(), TFItem::setScale(), TFItem::TFItem(), and TFItem::update(). |
|
Definition at line 118 of file commonQt/canvas/CanvasItems.h. References CanvasItemIF::_updateLinks. |
|
checks if anything in the TFElement changed if it has, calls updateDef()
Definition at line 56 of file TFItem.cpp. References TFItem::_elt, TFItem::_lastElmMod, TFItem::_lastEltMod, TFEltSP::getChangeID(), gutz::SmartPtrRef< TFElement >::isNull(), TFItem::setTransform(), and TFItem::updateDef(). |
|
update def
Reimplemented from TFItem. Definition at line 107 of file TFItemSTD.cpp. References setDims(). |
|
|
|
transform a point (tf -> canvas)
Definition at line 88 of file TFItem.h. References TFItem::_xform, tfVec2, and gutz::mat3< STF::tfSType >::tpoint(). |
|
Definition at line 89 of file TFItem.h. References TFItem::_xform, and x. Referenced by getTFLeft(), and getTFRight(). |
|
Definition at line 90 of file TFItem.h. References TFItem::_xform, and y. Referenced by getTFBottom(), and getTFTop(). |
|
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 123 of file TFItem.h. Referenced by TFItem::getAxisX(), getTFLeft(), TFItem::getTFPosCA(), getTFRight(), TFItem::setAxisX(), setTFLeft(), TFItem::setTFPosCA(), and setTFRight(). |
|
Definition at line 124 of file TFItem.h. Referenced by TFItem::getAxisY(), getTFBottom(), TFItem::getTFPosCA(), getTFTop(), TFItem::setAxisY(), setTFBottom(), TFItem::setTFPosCA(), and setTFTop(). |
|
Definition at line 69 of file TFItemSTD.h. Referenced by getTFBottom(), getTFLeft(), getTFRight(), getTFTop(), setTFBottom(), setTFLeft(), setTFRight(), setTFTop(), and TFBoxItem(). |
|
Definition at line 118 of file TFItem.h. Referenced by TFItem::getBorder(), TFItem::setBorder(), and TFItem::setTransform(). |
|
Definition at line 129 of file commonQt/canvas/CanvasItems.h. Referenced by CanvasItemIF::CanvasItemIF(), NodeItem::moveBy(), and EdgeItem::moveBy(). |
|
id for last element mod
Definition at line 129 of file TFItem.h. Referenced by TFItem::deleteMe(). |
|
Definition at line 276 of file commonQt/canvas/CanvasItems.h. Referenced by PolygonEdit::getEdgeIndex(), initBox(), PolygonEdit::nukeEdges(), and PolygonEdit::setPoints(). |
|
Definition at line 112 of file TFItem.h. Referenced by TFItem::getElt(), TFItem::getTFPosCA(), TFItem::setElt(), TFItem::setTFPosCA(), TFItem::TFItem(), TFItem::update(), and TFItem::~TFItem(). |
|
Definition at line 117 of file TFItem.h. Referenced by TFItem::getInvScale(), and TFItem::setScale(). |
|
Definition at line 121 of file TFItem.h. Referenced by TFItem::getInvXform(), TFItem::invXform(), TFItem::invXformX(), TFItem::invXformY(), and TFItem::setTransform(). |
|
id for last elt mod
Definition at line 127 of file TFItem.h. Referenced by TFItem::TFItem(), and TFItem::update(). |
|
Definition at line 126 of file TFItem.h. Referenced by TFItem::TFItem(), and TFItem::update(). |
|
Definition at line 71 of file TFItemSTD.h. Referenced by childMoved(), and childMovedBy(). |
|
Definition at line 275 of file commonQt/canvas/CanvasItems.h. Referenced by PolygonEdit::areaPoints(), PolygonEdit::getNodeIndex(), initBox(), PolygonEdit::moveBy(), PolygonEdit::nukePoints(), setBoxDims(), and PolygonEdit::setPoints(). |
|
Definition at line 116 of file TFItem.h. Referenced by TFItem::getScale(), TFItem::setScale(), and TFItem::setTransform(). |
|
Definition at line 131 of file commonQt/canvas/CanvasItems.h. Referenced by CanvasItemIF::CanvasItemIF(), CanvasItemIF::getUpdateLinks(), NodeItem::moveBy(), EdgeItem::moveBy(), NodeItem::setPoint(), and CanvasItemIF::setUpdateLinks(). |
|
Definition at line 120 of file TFItem.h. Referenced by TFItem::getXform(), TFItem::setTransform(), TFItem::xform(), TFItem::xformX(), and TFItem::xformY(). |