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

TFViewWidget Class Reference

#include <TFViewWidget.h>

Inheritance diagram for TFViewWidget:

FrameWidget PolygonWidget WidgetItem Renderable gutz::Counted List of all members.

Detailed Description

TFViewWidget, a class for handling interaction in 2D projections of transfer function domain.

Definition at line 31 of file TFViewWidget.h.

Event & constraint mapper.

All widgets have the default event of: gutz::GUTZ_LEFT_MOUSE -> MOVE you may want to nuke this event if it isn't applicable: delEvent(gutz::GUTZ_LEFT_MOUSE); event keys are defined in: gutzKeyMouse.h

enum  WIGET_BEHAVIORS { NO_EVENT = 0, MOVE, ROTATE, WB_LAST }
void addEvent (const unsigned int key, const unsigned int event, const ConstraintSP cnst=new Constraint())
 addEvent. constraint defaults to "Free Move" constraint

unsigned int getEvent (const gutz::MouseEvent &me) const
 getEvent, returns the event if one is defined, returns NO_EVENT if the mouse is up works for both: gutz::MouseEvent and gutz::MouseMoveEvent This function is usefull in implementation, externally use getEvent(unsigned int).

unsigned int getEvent (unsigned int key) const
 what is the event assigned to a key

void delEvent (const unsigned int key)
 delete an event from the event map

void nukeEvents ()
 delete all events from the event map

gutz::EventKeyMap getEvents () const
void setEvents (const gutz::EventKeyMap &eventMap)
ConstraintMap getConstraints () const
void setConstraints (const ConstraintMap &cnstMap)

Axes

May not always be meaningfull, but it is very convenient for this widget to store this information, even though that exposes (some of) the "symantics" of this widget, it is called TFViewWidget after all :).


Mostly done to save time and effort spent in keeping around a map from TFViewWidgets -> axies and visa-versa.
By Default axes == (0,1)

gutz::vec2i getAxes () const
gutz::vec2i setAxes (const gutz::vec2i &axes)

TFSurface set/get/del

The tf surface should be the same object as the SurfaceWidget contained in the FrameWidget level of the hierarchy

void setTFSurface (TFSurfaceWidget *sw)
TFSurfaceWidgetSP getTFSurface () const
void delTFSurface ()

Behaviors

virtual void drawDef (const gutz::RenderEvent &r)
 draw just forwards event to children, this widget is a composite so we don't draw anything ourselves.

virtual bool mouseChild (WidgetItem *child, const gutz::MouseEvent &me)
 child mousing, right now the Frame doesn't do anything with the mouse event, only the move event.

virtual bool moveChild (WidgetItem *child, const gutz::MouseMoveEvent &mme)
 override of FrameWidget::moveChild


Clones

WidgetItemclone () const
virtual FrameWidgetcloneFrame () const
 notice that this ISN'T pure virtual, rather it is virtual since we only need to clone our sub-widgets, however if you sub-class from this, you REALLY need to override this clone.


Modify the dimensions

With some higher-level symantics, none of these are well tested yet!

virtual void setDims (float width, float height)
 dimensions: width & height

float getWidth () const
 Width.

virtual void setWidth (float width)
float getHeight () const
 Height.

virtual void setHeight (float height)
gutz::vec3f getCenter () const
 Center.

virtual void setCenter (const gutz::vec3f &center)

Behaviors from PolygonWidget

Notice that we dont define our own move() and mouse(), since we don't render any geometry of our own, all events will come through our children.

virtual void delChild (WidgetItem *child)
 override of delChild from WidgetItem


Plane get

get the gutz::plane defined by the frame

gutz::planef getPlane () const

Surface set/get/del

void setSurface (SurfaceWidget *sw)
SurfaceWidgetSP getSurface () const
virtual void delSurface ()

Transform Widget

virtual void scale (const gutz::vec3f scale)
virtual void translate (const gutz::vec3f trans)
virtual void applyXform (gutz::mat4f xf)
 apply a 4x4 transformation matrix, must be defined by a sub-class.


Node/Edge set/get

carefull, the set may have no "meaning", may not be appropriate for subclass behaviors.

The gets are very usefull though.

int getNodeSize () const
NodeWidgetSP getNode (int idx) const
virtual void setNode (int idx, NodeWidgetSP n)
virtual void addNode (NodeWidgetSP n)
int getEdgeSize () const
EdgeWidgetSP getEdge (int idx) const
virtual void setEdge (int idx, EdgeWidgetSP e)
virtual void addEdge (EdgeWidgetSP e)

Events duplicated from <Renderable>.

These are duplicated to insure/ease framework issues, notice that mouse and move handle the "check with parent" and mouseDef(), moveDef() are what actually implement the behavior.

void draw (const gutz::RenderEvent &r)
 main draw event...

bool mouse (const gutz::MouseEvent &me)
 a mouse event...

virtual bool mouseDef (const gutz::MouseEvent &me)
 override this one to implement mouse behavior

bool move (const gutz::MouseMoveEvent &mme)
 a move event, checks with parent, then calls moveDef().

virtual bool moveDef (const gutz::MouseMoveEvent &mme)
 override this one to implement move behavior


Parent/Child management

virtual void addChild (WidgetItem *child)
 a child was added

virtual void setParent (WidgetItem *parent)
 a (new?) parent now owns you :)


Some appearance management

ColorWStateSP getColor () const
void setColor (ColorWState *const color)

Draw on/off.

bool isOn () const
void setOn (bool yes)

Delete.

Does this object need to be removed from a render list? This means that the object is finished and anyone with a smart pointer to it needs to delete the smart pointer and stop using the renderable.

bool needsDelete () const
void setDelete (bool yes)

Interaction Functions

Return true if the event was for you.

By default interaction is forwarded to your protected manipulator (_manip). To use it just apply it in your draw function. However, if you don't add any events or call setManipEventsDefault(), you won't have any interaction. Override these functions in your base class to implement custom behaviors.

virtual bool key (unsigned char k, int x, int y)

Selected

Is this object currently selected?

virtual void setSelected (bool yes)
bool isSelected () const

Manipulator Interface

gutz::ManipgetManip () const
void setManip (gutz::Manip *const m)
void setManipEventsDefault ()
 you have to call this to enable default interaction, OR customize the manipulators events yourself.


Signals

gutz::Signal< const gutz::vec2i &,
const gutz::vec2f & > 
insertElementEvent
 insertElementEvent(const gutz::vec2i axes, const vec2f& pos) signal.


Signals

see gutz::Signal for API details

gutz::Signal< gutz::planefplaneChanged
 signal: planeChanged(gutz::planef p);


Public Types

enum  FRAME_NODES {
  LL, LR, UL, UR,
  NODE_LAST
}
 index enums for accessing the _nodes vector More...

enum  FRAME_EDGES {
  LEFT, RIGHT, TOP, BOTTOM,
  EDGE_LAST
}
 index enums for accessing the _edges vector More...

typedef gutz::SmartPtr< WidgetItemWidgetItemSP
typedef gutz::vec2f Point2
 2D point

typedef gutz::arrayOwn1< Point2Point2Array
 2D point array

typedef gutz::vec3f Point3
 3D point

typedef gutz::arrayOwn1< Point3Point3Array
 3D point array


Public Member Functions

 TFViewWidget (TFSurfaceWidget *const surfProto, const WidgetFactory &wf, WidgetItem *parent=0, const gutz::vec3f &ll=gutz::vec3f(-1,-1, 0), const gutz::vec3f &lr=gutz::vec3f(1,-1, 0), const gutz::vec3f &ul=gutz::vec3f(-1, 1, 0), const gutz::vec3f &ur=gutz::vec3f(1, 1, 0))
 must be constructed with a valid TFSurface proto and a factory! see TFSurfaceWidget and GLTFSurfaceWidget

TFViewWidgetoperator= (const TFViewWidget &tfv)
virtual void setChanged ()
 object changed

void nodeMoved (int idx, const gutz::vec3f &oldW, const gutz::vec3f &oldH)
 THE Frame Constraint a node widget moved, not rotation! This will make sure the widget stays a frame.

virtual void setPoints (const Point3Array &pts, const NodeWidget *const nodeProto, const EdgeWidget *const edgeProto)
 set/reset all points in polygon

virtual Point2Array getValidArea () const
 get the "tightest 2D bounding polygon" in screen space


Public Attributes

 HAS_SLOTS
 supports gutz signals & slots


Protected Member Functions

 TFViewWidget ()
 not used

 TFViewWidget (const TFViewWidget &tfv)
 copy

void updateManip ()
void configureFrame (const NodeWidget *const nodeProto, const EdgeWidget *const edgeProto, const gutz::vec3f &ll, const gutz::vec3f &lr, const gutz::vec3f &ul, const gutz::vec3f &ur)
 creates/recreates the frame

virtual void moveNode (int idx, const gutz::MouseMoveEvent &mme)
virtual void moveEdge (int idx, const gutz::MouseMoveEvent &mme)
int getNodeIdx (const WidgetItem *ptr) const
 returns -1 if not found

int getEdgeIdx (const WidgetItem *ptr) const
virtual void _invalidate ()
 called before widget changes, see also _update() some window systems need these calls before and after something changes, respectively, you'll have to specify them in your concrete class, if you need them.

virtual void _update ()
 called after widget is changed

virtual void appearanceChanged ()
 called if something about how it looks changes, does not include changes to the transform, just things like radius and color.

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

TFSurfaceWidgetSP _tfsurf
 the tf surface widget

gutz::vec2i _axes
 the axies we represent

gutz::ManipEventSP _planeConst
SurfaceWidgetSP _surface
float _rad
 for rotation, set when mouse goes down.

NodeWidgetVec _nodes
EdgeWidgetVec _edges
bool _on
 is this renderable currently "render-able"?

bool _selected
 is this renderable selected?

bool _deleteMe
 does this object need to be deleted?

gutz::ManipSP _manip
 You get a manipulator free, no charge.


Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef gutz::vec2f WidgetItem::Point2 [inherited]
 

2D point

Definition at line 124 of file WidgetBase.h.

Referenced by WidgetItem::getValidArea(), NodeWidget::getValidArea(), and EdgeWidget::getValidArea().

typedef gutz::arrayOwn1<Point2> WidgetItem::Point2Array [inherited]
 

2D point array

Definition at line 125 of file WidgetBase.h.

Referenced by WidgetItem::getValidArea(), NodeWidget::getValidArea(), and EdgeWidget::getValidArea().

typedef gutz::vec3f WidgetItem::Point3 [inherited]
 

3D point

Definition at line 127 of file WidgetBase.h.

Referenced by FrameWidget::setDims(), FrameWidget::setHeight(), and FrameWidget::setWidth().

typedef gutz::arrayOwn1<Point3> WidgetItem::Point3Array [inherited]
 

3D point array

Definition at line 128 of file WidgetBase.h.

typedef gutz::SmartPtr<WidgetItem> WidgetItem::WidgetItemSP [inherited]
 

Definition at line 122 of file WidgetBase.h.


Member Enumeration Documentation

enum FrameWidget::FRAME_EDGES [inherited]
 

index enums for accessing the _edges vector

Enumeration values:
LEFT 
RIGHT 
TOP 
BOTTOM 
EDGE_LAST 

Definition at line 108 of file FrameWidget.h.

enum FrameWidget::FRAME_NODES [inherited]
 

index enums for accessing the _nodes vector

Enumeration values:
LL  Lower Left.
LR  Lower Right.
UL  Upper Left.
UR  Upper Right.
NODE_LAST 

Definition at line 100 of file FrameWidget.h.

enum WidgetItem::WIGET_BEHAVIORS [inherited]
 

Enumeration values:
NO_EVENT  widget does nothing (by itself, but maybe parent does)
MOVE  move according to world space deltas (default left mouse)
ROTATE  rotate around center of widget
WB_LAST  sub classes add events starting here (not an event)

Definition at line 313 of file WidgetBase.h.


Constructor & Destructor Documentation

TFViewWidget::TFViewWidget TFSurfaceWidget *const  surfProto,
const WidgetFactory wf,
WidgetItem parent = 0,
const gutz::vec3f ll = gutz::vec3f(-1,-1, 0),
const gutz::vec3f lr = gutz::vec3f(1,-1, 0),
const gutz::vec3f ul = gutz::vec3f(-1, 1, 0),
const gutz::vec3f ur = gutz::vec3f(1, 1, 0)
 

must be constructed with a valid TFSurface proto and a factory! see TFSurfaceWidget and GLTFSurfaceWidget

Definition at line 29 of file TFViewWidget.cpp.

References TFSurfaceWidget::cloneTFSurface(), and setTFSurface().

TFViewWidget::TFViewWidget  )  [protected]
 

not used

TFViewWidget::TFViewWidget const TFViewWidget tfv  )  [inline, protected]
 

copy

Definition at line 107 of file TFViewWidget.h.

References _tfsurf, and setTFSurface().


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

virtual void WidgetItem::_invalidate  )  [inline, protected, virtual, inherited]
 

called before widget changes, see also _update() some window systems need these calls before and after something changes, respectively, you'll have to specify them in your concrete class, if you need them.

They are quite usefull, if you need to update when a widget changes, but you don't (nescessarily) care what changed

Definition at line 380 of file WidgetBase.h.

Referenced by FrameWidget::setCenter(), FrameWidget::setDims(), EdgeWidget::setEndPoint(), FrameWidget::setHeight(), SurfaceWidget::setPoint(), NodeWidget::setPointLocal(), EdgeWidget::setStartPoint(), and FrameWidget::setWidth().

virtual void WidgetItem::_update  )  [inline, protected, virtual, inherited]
 

called after widget is changed

Definition at line 383 of file WidgetBase.h.

Referenced by FrameWidget::setCenter(), FrameWidget::setDims(), EdgeWidget::setEndPoint(), FrameWidget::setHeight(), SurfaceWidget::setPoint(), NodeWidget::setPointLocal(), EdgeWidget::setStartPoint(), and FrameWidget::setWidth().

virtual void WidgetItem::addChild WidgetItem child  )  [inline, virtual, inherited]
 

a child was added

Definition at line 278 of file WidgetBase.h.

virtual void PolygonWidget::addEdge EdgeWidgetSP  e  )  [inline, virtual, inherited]
 

Definition at line 120 of file PolygonWidget.h.

References PolygonWidget::_edges.

void WidgetItem::addEvent const unsigned int  key,
const unsigned int  event,
const ConstraintSP  cnst = new Constraint()
[inline, inherited]
 

addEvent. constraint defaults to "Free Move" constraint

Definition at line 321 of file WidgetBase.h.

References _constraintMap, and _eventMap.

Referenced by SurfaceWidget::SurfaceWidget(), and WidgetItem::WidgetItem().

virtual void PolygonWidget::addNode NodeWidgetSP  n  )  [inline, virtual, inherited]
 

Definition at line 115 of file PolygonWidget.h.

References PolygonWidget::_nodes, and n.

virtual void WidgetItem::appearanceChanged  )  [inline, protected, virtual, inherited]
 

called if something about how it looks changes, does not include changes to the transform, just things like radius and color.

Reimplemented in GLUNodeWidget, and GLUEdgeWidget.

Definition at line 387 of file WidgetBase.h.

Referenced by EdgeWidget::setEndPoint(), NodeWidget::setRad(), EdgeWidget::setRad(), and EdgeWidget::setStartPoint().

virtual void PolygonWidget::applyXform gutz::mat4f  xf  )  [inline, virtual, inherited]
 

apply a 4x4 transformation matrix, must be defined by a sub-class.

Implements WidgetItem.

Definition at line 100 of file PolygonWidget.h.

References PolygonWidget::_nodes.

WidgetItem* FrameWidget::clone void   )  const [inline, virtual, inherited]
 

Implements WidgetItem.

Definition at line 77 of file FrameWidget.h.

References FrameWidget::cloneFrame().

virtual FrameWidget* FrameWidget::cloneFrame  )  const [inline, virtual, inherited]
 

notice that this ISN'T pure virtual, rather it is virtual since we only need to clone our sub-widgets, however if you sub-class from this, you REALLY need to override this clone.

Definition at line 84 of file FrameWidget.h.

References FrameWidget::FrameWidget().

Referenced by FrameWidget::clone().

void FrameWidget::configureFrame const NodeWidget *const  nodeProto,
const EdgeWidget *const  edgeProto,
const gutz::vec3f ll,
const gutz::vec3f lr,
const gutz::vec3f ul,
const gutz::vec3f ur
[protected, inherited]
 

creates/recreates the frame

Definition at line 74 of file FrameWidget.cpp.

References PolygonWidget::_edges, Renderable::_manip, PolygonWidget::_nodes, FrameWidget::_planeConst, FrameWidget::BOTTOM, EdgeWidget::cloneEdge(), NodeWidget::cloneNode(), gutz::connect(), EdgeWidgetSP, gutz::GUTZ_LEFT_MOUSE, gutz::GUTZ_MIDDLE_MOUSE, gutz::GUTZ_RIGHT_MOUSE, FrameWidget::LEFT, FrameWidget::LL, FrameWidget::LR, NodeWidgetSP, FrameWidget::planeChanged, FrameWidget::RIGHT, FrameWidget::TOP, FrameWidget::UL, FrameWidget::updateManip(), and FrameWidget::UR.

Referenced by FrameWidget::FrameWidget().

void FrameWidget::delChild WidgetItem child  )  [virtual, inherited]
 

override of delChild from WidgetItem

Reimplemented from WidgetItem.

Definition at line 316 of file FrameWidget.cpp.

References FrameWidget::_surface, and FrameWidget::delSurface().

void WidgetItem::delEvent const unsigned int  key  )  [inline, inherited]
 

delete an event from the event map

Definition at line 344 of file WidgetBase.h.

References _constraintMap, and _eventMap.

void FrameWidget::delSurface  )  [virtual, inherited]
 

Definition at line 304 of file FrameWidget.cpp.

References PolygonWidget::_nodes, FrameWidget::_surface, gutz::disconnect(), gutz::SmartPtr< SurfaceWidget >::getPtr(), FrameWidget::LL, FrameWidget::LR, SurfaceWidget::setLL(), SurfaceWidget::setLR(), SurfaceWidget::setUL(), SurfaceWidget::setUR(), FrameWidget::UL, and FrameWidget::UR.

Referenced by FrameWidget::delChild(), delTFSurface(), FrameWidget::setSurface(), and FrameWidget::~FrameWidget().

void TFViewWidget::delTFSurface  ) 
 

we let the FrameWidget disconnect the surface

Definition at line 55 of file TFViewWidget.cpp.

References _tfsurf, and FrameWidget::delSurface().

void WidgetItem::draw const gutz::RenderEvent r  )  [inline, virtual, inherited]
 

main draw event...

Framework only, do not override, Might need to add functionality here later.

Implements Renderable.

Definition at line 209 of file WidgetBase.h.

References WidgetItem::drawDef(), and r.

virtual void TFViewWidget::drawDef const gutz::RenderEvent r  )  [inline, virtual]
 

draw just forwards event to children, this widget is a composite so we don't draw anything ourselves.

Reimplemented from FrameWidget.

Definition at line 91 of file TFViewWidget.h.

References FrameWidget::drawDef(), and r.

gutz::vec2i TFViewWidget::getAxes  )  const [inline]
 

Definition at line 58 of file TFViewWidget.h.

References _axes.

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

Center.

Definition at line 141 of file FrameWidget.h.

References PolygonWidget::_nodes, FrameWidget::LL, and FrameWidget::UR.

Referenced by FrameWidget::setCenter(), FrameWidget::setDims(), FrameWidget::setHeight(), and FrameWidget::setWidth().

ColorWStateSP WidgetItem::getColor  )  const [inline, inherited]
 

Definition at line 366 of file WidgetBase.h.

References _color.

ConstraintMap WidgetItem::getConstraints  )  const [inline, inherited]
 

Definition at line 357 of file WidgetBase.h.

References _constraintMap, and ConstraintMap.

EdgeWidgetSP PolygonWidget::getEdge int  idx  )  const [inline, inherited]
 

Definition at line 118 of file PolygonWidget.h.

References PolygonWidget::_edges.

int PolygonWidget::getEdgeIdx const WidgetItem ptr  )  const [inline, protected, inherited]
 

Definition at line 136 of file PolygonWidget.h.

References PolygonWidget::_edges.

int PolygonWidget::getEdgeSize  )  const [inline, inherited]
 

Definition at line 117 of file PolygonWidget.h.

References PolygonWidget::_edges.

unsigned int WidgetItem::getEvent unsigned int  key  )  const [inline, inherited]
 

what is the event assigned to a key

Definition at line 338 of file WidgetBase.h.

References _eventMap.

unsigned int WidgetItem::getEvent const gutz::MouseEvent me  )  const [inline, inherited]
 

getEvent, returns the event if one is defined, returns NO_EVENT if the mouse is up works for both: gutz::MouseEvent and gutz::MouseMoveEvent This function is usefull in implementation, externally use getEvent(unsigned int).

Definition at line 331 of file WidgetBase.h.

References _eventMap, gutz::MouseEvent::getButton(), gutz::MouseEvent::isButtonDown(), and WidgetItem::NO_EVENT.

Referenced by WidgetItem::mouseDef(), SurfaceWidget::mouseDef(), and SurfaceWidget::moveDef().

gutz::EventKeyMap WidgetItem::getEvents  )  const [inline, inherited]
 

Definition at line 353 of file WidgetBase.h.

References _eventMap.

float FrameWidget::getHeight  )  const [inline, inherited]
 

Height.

Definition at line 134 of file FrameWidget.h.

References PolygonWidget::_nodes, FrameWidget::LL, and FrameWidget::UL.

Referenced by FrameWidget::setDims(), and FrameWidget::setHeight().

gutz::Manip* Renderable::getManip  )  const [inline, inherited]
 

Definition at line 184 of file Renderable.h.

References Renderable::_manip.

NodeWidgetSP PolygonWidget::getNode int  idx  )  const [inline, inherited]
 

Definition at line 113 of file PolygonWidget.h.

References PolygonWidget::_nodes.

int PolygonWidget::getNodeIdx const WidgetItem ptr  )  const [inline, protected, inherited]
 

returns -1 if not found

Definition at line 130 of file PolygonWidget.h.

References PolygonWidget::_nodes.

Referenced by FrameWidget::moveChild().

int PolygonWidget::getNodeSize  )  const [inline, inherited]
 

Definition at line 112 of file PolygonWidget.h.

References PolygonWidget::_nodes.

gutz::planef FrameWidget::getPlane  )  const [inline, inherited]
 

Definition at line 185 of file FrameWidget.h.

References PolygonWidget::_nodes, FrameWidget::LL, FrameWidget::LR, gutz::planef, and FrameWidget::UL.

Referenced by GLClipPlane::GLClipPlane(), FrameWidget::moveChild(), and FrameWidget::setChanged().

SurfaceWidgetSP FrameWidget::getSurface  )  const [inline, inherited]
 

Definition at line 205 of file FrameWidget.h.

References FrameWidget::_surface.

TFSurfaceWidgetSP TFViewWidget::getTFSurface  )  const [inline]
 

Definition at line 82 of file TFViewWidget.h.

References _tfsurf.

virtual Point2Array WidgetItem::getValidArea  )  const [inline, virtual, inherited]
 

get the "tightest 2D bounding polygon" in screen space

Reimplemented in EdgeWidget, and NodeWidget.

Definition at line 302 of file WidgetBase.h.

References WidgetItem::Point2, and WidgetItem::Point2Array.

float FrameWidget::getWidth  )  const [inline, inherited]
 

Width.

Definition at line 127 of file FrameWidget.h.

References PolygonWidget::_nodes, FrameWidget::LL, and FrameWidget::LR.

Referenced by FrameWidget::setDims(), and FrameWidget::setWidth().

bool Renderable::isOn  )  const [inline, inherited]
 

Definition at line 141 of file Renderable.h.

References Renderable::_on.

bool Renderable::isSelected  )  const [inline, inherited]
 

Definition at line 177 of file Renderable.h.

References Renderable::_selected.

virtual bool Renderable::key unsigned char  k,
int  x,
int  y
[inline, virtual, inherited]
 

Definition at line 166 of file Renderable.h.

bool WidgetItem::mouse const gutz::MouseEvent me  )  [inline, virtual, inherited]
 

a mouse event...

checks with parent, then calls mouseDef()
Framework only, do not override.

Reimplemented from Renderable.

Definition at line 220 of file WidgetBase.h.

References WidgetItem::mouseDef().

bool TFViewWidget::mouseChild WidgetItem child,
const gutz::MouseEvent me
[virtual]
 

child mousing, right now the Frame doesn't do anything with the mouse event, only the move event.

Reimplemented from FrameWidget.

Definition at line 65 of file TFViewWidget.cpp.

References _tfsurf, gutz::SmartPtr< TFSurfaceWidget >::getPtr(), and FrameWidget::mouseChild().

virtual bool WidgetItem::mouseDef const gutz::MouseEvent me  )  [inline, virtual, inherited]
 

override this one to implement mouse behavior

Reimplemented in SurfaceWidget.

Definition at line 227 of file WidgetBase.h.

References Renderable::_manip, WidgetItem::getEvent(), and WidgetItem::NO_EVENT.

Referenced by WidgetItem::mouse(), and FrameWidget::mouseChild().

bool WidgetItem::move const gutz::MouseMoveEvent mme  )  [inline, virtual, inherited]
 

a move event, checks with parent, then calls moveDef().

Framework only, do not override.

Reimplemented from Renderable.

Definition at line 245 of file WidgetBase.h.

References WidgetItem::moveDef().

bool TFViewWidget::moveChild WidgetItem child,
const gutz::MouseMoveEvent mme
[virtual]
 

override of FrameWidget::moveChild

Reimplemented from FrameWidget.

Definition at line 84 of file TFViewWidget.cpp.

References FrameWidget::moveChild().

virtual bool WidgetItem::moveDef const gutz::MouseMoveEvent mme  )  [inline, virtual, inherited]
 

override this one to implement move behavior

Reimplemented in SurfaceWidget.

Definition at line 253 of file WidgetBase.h.

References Renderable::_manip, and WidgetItem::setChanged().

Referenced by WidgetItem::move(), and FrameWidget::moveChild().

virtual void PolygonWidget::moveEdge int  idx,
const gutz::MouseMoveEvent mme
[inline, protected, virtual, inherited]
 

Definition at line 127 of file PolygonWidget.h.

virtual void PolygonWidget::moveNode int  idx,
const gutz::MouseMoveEvent mme
[inline, protected, virtual, inherited]
 

Definition at line 126 of file PolygonWidget.h.

bool Renderable::needsDelete  )  const [inline, inherited]
 

Definition at line 152 of file Renderable.h.

References Renderable::_deleteMe.

void FrameWidget::nodeMoved int  idx,
const gutz::vec3f oldW,
const gutz::vec3f oldH
[inherited]
 

THE Frame Constraint a node widget moved, not rotation! This will make sure the widget stays a frame.

This is "what" a frame is, i.e. THE frame constraint.
TODO: this function could be implemented as a Constraint.

Definition at line 244 of file FrameWidget.cpp.

References PolygonWidget::_nodes, FrameWidget::LL, FrameWidget::LR, FrameWidget::UL, FrameWidget::UR, and gutz::vec3f.

Referenced by FrameWidget::moveChild().

void WidgetItem::nukeEvents  )  [inline, inherited]
 

delete all events from the event map

Definition at line 347 of file WidgetBase.h.

References _constraintMap, _eventMap, and ConstraintMap.

TFViewWidget& TFViewWidget::operator= const TFViewWidget tfv  )  [inline]
 

Definition at line 44 of file TFViewWidget.h.

References FrameWidget::operator=().

virtual void PolygonWidget::scale const gutz::vec3f  scale  )  [inline, virtual, inherited]
 

Definition at line 88 of file PolygonWidget.h.

References PolygonWidget::_nodes, and scale.

Referenced by FrameWidget::setDims(), FrameWidget::setHeight(), and FrameWidget::setWidth().

gutz::vec2i TFViewWidget::setAxes const gutz::vec2i axes  )  [inline]
 

Definition at line 59 of file TFViewWidget.h.

References _axes.

void FrameWidget::setCenter const gutz::vec3f center  )  [virtual, inherited]
 

Definition at line 189 of file FrameWidget.cpp.

References WidgetItem::_invalidate(), WidgetItem::_update(), FrameWidget::getCenter(), and PolygonWidget::translate().

virtual void FrameWidget::setChanged  )  [inline, virtual, inherited]
 

object changed

Reimplemented from PolygonWidget.

Definition at line 90 of file FrameWidget.h.

References PolygonWidget::_nodes, FrameWidget::getPlane(), FrameWidget::planeChanged, and FrameWidget::updateManip().

Referenced by FrameWidget::moveChild().

void WidgetItem::setColor ColorWState *const  color  )  [inline, inherited]
 

Definition at line 367 of file WidgetBase.h.

References _color.

Referenced by GLUEdgeWidget::GLUEdgeWidget(), and GLUNodeWidget::GLUNodeWidget().

void WidgetItem::setConstraints const ConstraintMap cnstMap  )  [inline, inherited]
 

Definition at line 358 of file WidgetBase.h.

References _constraintMap.

void Renderable::setDelete bool  yes  )  [inline, inherited]
 

Definition at line 153 of file Renderable.h.

References Renderable::_deleteMe, and Renderable::setOn().

void FrameWidget::setDims float  width,
float  height
[virtual, inherited]
 

dimensions: width & height

Definition at line 147 of file FrameWidget.cpp.

References WidgetItem::_invalidate(), WidgetItem::_update(), FrameWidget::getCenter(), FrameWidget::getHeight(), FrameWidget::getWidth(), height, WidgetItem::Point3, PolygonWidget::scale(), PolygonWidget::translate(), and width.

virtual void PolygonWidget::setEdge int  idx,
EdgeWidgetSP  e
[inline, virtual, inherited]
 

Definition at line 119 of file PolygonWidget.h.

References PolygonWidget::_edges.

void WidgetItem::setEvents const gutz::EventKeyMap eventMap  )  [inline, inherited]
 

Definition at line 354 of file WidgetBase.h.

References _eventMap.

void FrameWidget::setHeight float  height  )  [virtual, inherited]
 

Definition at line 175 of file FrameWidget.cpp.

References WidgetItem::_invalidate(), WidgetItem::_update(), FrameWidget::getCenter(), FrameWidget::getHeight(), height, WidgetItem::Point3, PolygonWidget::scale(), and PolygonWidget::translate().

void Renderable::setManip gutz::Manip *const  m  )  [inline, inherited]
 

Definition at line 185 of file Renderable.h.

References Renderable::_manip.

void Renderable::setManipEventsDefault  )  [inline, inherited]
 

you have to call this to enable default interaction, OR customize the manipulators events yourself.

Definition at line 188 of file Renderable.h.

References Renderable::_manip.

virtual void PolygonWidget::setNode int  idx,
NodeWidgetSP  n
[inline, virtual, inherited]
 

Definition at line 114 of file PolygonWidget.h.

References PolygonWidget::_nodes, and n.

void Renderable::setOn bool  yes  )  [inline, inherited]
 

Definition at line 142 of file Renderable.h.

References Renderable::_on.

Referenced by Renderable::setDelete().

virtual void WidgetItem::setParent WidgetItem parent  )  [inline, virtual, inherited]
 

a (new?) parent now owns you :)

Definition at line 283 of file WidgetBase.h.

References Renderable::_manip.

Referenced by SurfaceContentWidget::addContent(), SurfaceContentWidget::delContent(), and PolygonWidget::setPoints().

virtual void PolygonWidget::setPoints const Point3Array pts,
const NodeWidget *const  nodeProto,
const EdgeWidget *const  edgeProto
[inline, virtual, inherited]
 

set/reset all points in polygon

Definition at line 63 of file PolygonWidget.h.

References PolygonWidget::_edges, PolygonWidget::_nodes, EdgeWidget::cloneEdge(), NodeWidget::cloneNode(), n, EdgeWidget::setEndNode(), WidgetItem::setParent(), and EdgeWidget::setStartNode().

virtual void Renderable::setSelected bool  yes  )  [inline, virtual, inherited]
 

Definition at line 176 of file Renderable.h.

References Renderable::_selected.

void FrameWidget::setSurface SurfaceWidget sw  )  [inherited]
 

Definition at line 284 of file FrameWidget.cpp.

References PolygonWidget::_nodes, FrameWidget::_surface, gutz::connect(), FrameWidget::delSurface(), gutz::SmartPtr< SurfaceWidget >::getPtr(), FrameWidget::LL, FrameWidget::LR, SurfaceWidget::setLL(), SurfaceWidget::setLR(), SurfaceWidget::setUL(), SurfaceWidget::setUR(), FrameWidget::UL, and FrameWidget::UR.

Referenced by FrameWidget::FrameWidget(), and setTFSurface().

void TFViewWidget::setTFSurface TFSurfaceWidget sw  ) 
 

we let the FrameWidget connect the surface to the nodes

Definition at line 45 of file TFViewWidget.cpp.

References _tfsurf, and FrameWidget::setSurface().

Referenced by TFViewWidget().

void FrameWidget::setWidth float  width  )  [virtual, inherited]
 

Definition at line 161 of file FrameWidget.cpp.

References WidgetItem::_invalidate(), WidgetItem::_update(), FrameWidget::getCenter(), FrameWidget::getWidth(), WidgetItem::Point3, PolygonWidget::scale(), PolygonWidget::translate(), and width.

virtual void PolygonWidget::translate const gutz::vec3f  trans  )  [inline, virtual, inherited]
 

Definition at line 94 of file PolygonWidget.h.

References PolygonWidget::_nodes.

Referenced by FrameWidget::setCenter(), FrameWidget::setDims(), FrameWidget::setHeight(), and FrameWidget::setWidth().

void FrameWidget::updateManip  )  [inline, protected, inherited]
 

Definition at line 223 of file FrameWidget.h.

References Renderable::_manip, PolygonWidget::_nodes, FrameWidget::LL, and FrameWidget::UR.

Referenced by FrameWidget::configureFrame(), and FrameWidget::setChanged().


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::vec2i TFViewWidget::_axes [protected]
 

the axies we represent

Definition at line 118 of file TFViewWidget.h.

Referenced by getAxes(), and setAxes().

bool Renderable::_deleteMe [protected, inherited]
 

does this object need to be deleted?

Definition at line 237 of file Renderable.h.

Referenced by Renderable::needsDelete(), Renderable::Renderable(), and Renderable::setDelete().

EdgeWidgetVec PolygonWidget::_edges [protected, inherited]
 

Definition at line 144 of file PolygonWidget.h.

Referenced by PolygonWidget::addEdge(), FrameWidget::configureFrame(), PolygonWidget::drawDef(), PolygonWidget::getEdge(), PolygonWidget::getEdgeIdx(), PolygonWidget::getEdgeSize(), PolygonWidget::setEdge(), PolygonWidget::setPoints(), and PolygonWidget::~PolygonWidget().

gutz::ManipSP Renderable::_manip [protected, inherited]
 

You get a manipulator free, no charge.

Definition at line 240 of file Renderable.h.

Referenced by FrameWidget::configureFrame(), GLUEdgeWidget::drawDef(), GLUNodeWidget::drawDef(), GLSurfaceWidget::drawQuad(), EdgeWidget::getEndPoint(), Renderable::getManip(), SurfaceWidget::getPoint(), NodeWidget::getPoint(), NodeWidget::getPointLocal(), EdgeWidget::getStartPoint(), SurfaceWidget::intersectPlane(), Renderable::mouse(), FrameWidget::mouseChild(), WidgetItem::mouseDef(), Renderable::move(), FrameWidget::moveChild(), WidgetItem::moveDef(), NodeWidget::NodeWidget(), Renderable::operator=(), Renderable::Renderable(), EdgeWidget::setEndPoint(), Renderable::setManip(), Renderable::setManipEventsDefault(), WidgetItem::setParent(), SurfaceWidget::setPoint(), NodeWidget::setPoint(), NodeWidget::setPointLocal(), EdgeWidget::setStartPoint(), and FrameWidget::updateManip().

NodeWidgetVec PolygonWidget::_nodes [protected, inherited]
 

Definition at line 143 of file PolygonWidget.h.

Referenced by PolygonWidget::addNode(), PolygonWidget::applyXform(), FrameWidget::configureFrame(), FrameWidget::delSurface(), PolygonWidget::drawDef(), FrameWidget::getCenter(), FrameWidget::getHeight(), PolygonWidget::getNode(), PolygonWidget::getNodeIdx(), PolygonWidget::getNodeSize(), FrameWidget::getPlane(), FrameWidget::getWidth(), FrameWidget::moveChild(), FrameWidget::nodeMoved(), FrameWidget::operator=(), PolygonWidget::scale(), PolygonWidget::setChanged(), FrameWidget::setChanged(), PolygonWidget::setNode(), PolygonWidget::setPoints(), FrameWidget::setSurface(), PolygonWidget::translate(), FrameWidget::updateManip(), and PolygonWidget::~PolygonWidget().

bool Renderable::_on [protected, inherited]
 

is this renderable currently "render-able"?

Definition at line 235 of file Renderable.h.

Referenced by Renderable::isOn(), Renderable::operator=(), Renderable::Renderable(), and Renderable::setOn().

gutz::ManipEventSP FrameWidget::_planeConst [protected, inherited]
 

Definition at line 237 of file FrameWidget.h.

Referenced by FrameWidget::configureFrame(), FrameWidget::FrameWidget(), and FrameWidget::~FrameWidget().

float FrameWidget::_rad [protected, inherited]
 

for rotation, set when mouse goes down.

Definition at line 241 of file FrameWidget.h.

bool Renderable::_selected [protected, inherited]
 

is this renderable selected?

Definition at line 236 of file Renderable.h.

Referenced by Renderable::isSelected(), Renderable::Renderable(), and Renderable::setSelected().

SurfaceWidgetSP FrameWidget::_surface [protected, inherited]
 

Definition at line 239 of file FrameWidget.h.

Referenced by FrameWidget::delChild(), FrameWidget::delSurface(), FrameWidget::drawDef(), FrameWidget::getSurface(), and FrameWidget::setSurface().

TFSurfaceWidgetSP TFViewWidget::_tfsurf [protected]
 

the tf surface widget

Definition at line 115 of file TFViewWidget.h.

Referenced by delTFSurface(), getTFSurface(), mouseChild(), setTFSurface(), and TFViewWidget().

TFViewWidget::HAS_SLOTS
 

supports gutz signals & slots

Reimplemented from FrameWidget.

Definition at line 62 of file TFViewWidget.h.

gutz::Signal<const gutz::vec2i&, const gutz::vec2f&> TFViewWidget::insertElementEvent
 

insertElementEvent(const gutz::vec2i axes, const vec2f& pos) signal.

The surface of the transfer function was clicked, and that event maps to the insert event. The first parameter is the axes idicies of the view that emmited the event, and the last one is the (0,1) range position of that click within the TFViewWidgets frame.

Definition at line 73 of file TFViewWidget.h.

gutz::Signal<gutz::planef> FrameWidget::planeChanged [inherited]
 

signal: planeChanged(gutz::planef p);

Definition at line 216 of file FrameWidget.h.

Referenced by FrameWidget::configureFrame(), GLClipPlane::GLClipPlane(), FrameWidget::moveChild(), and FrameWidget::setChanged().


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