VTK
|
A 2D graphics item for rendering a graph. More...
#include <vtkGraphItem.h>
Public Types | |
typedef vtkContextItem | Superclass |
Public Types inherited from vtkContextItem | |
typedef vtkAbstractContextItem | Superclass |
Public Types inherited from vtkAbstractContextItem | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkGraphItem * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual vtkIncrementalForceLayout * | GetLayout () |
virtual void | UpdateLayout () |
virtual void | SetGraph (vtkGraph *graph) |
virtual vtkGraph * | GetGraph () |
virtual void | StartLayoutAnimation (vtkRenderWindowInteractor *interactor) |
virtual void | StopLayoutAnimation () |
Public Member Functions inherited from vtkContextItem | |
vtkContextItem * | NewInstance () const |
virtual double | GetOpacity () |
virtual void | SetOpacity (double) |
Public Member Functions inherited from vtkAbstractContextItem | |
vtkAbstractContextItem * | NewInstance () const |
virtual void | Update () |
virtual bool | PaintChildren (vtkContext2D *painter) |
virtual void | ReleaseGraphicsResources () |
unsigned int | AddItem (vtkAbstractContextItem *item) |
bool | RemoveItem (vtkAbstractContextItem *item) |
bool | RemoveItem (unsigned int index) |
vtkAbstractContextItem * | GetItem (unsigned int index) |
unsigned int | GetItemIndex (vtkAbstractContextItem *item) |
unsigned int | GetNumberOfItems () |
void | ClearItems () |
unsigned int | Raise (unsigned int index) |
unsigned int | Lower (unsigned int index) |
virtual vtkAbstractContextItem * | GetPickedItem (const vtkContextMouseEvent &mouse) |
virtual bool | MouseDoubleClickEvent (const vtkContextMouseEvent &mouse) |
virtual bool | KeyPressEvent (const vtkContextKeyEvent &key) |
virtual void | SetScene (vtkContextScene *scene) |
virtual void | SetParent (vtkAbstractContextItem *parent) |
virtual vtkVector2f | MapToParent (const vtkVector2f &point) |
virtual vtkVector2f | MapFromParent (const vtkVector2f &point) |
virtual vtkVector2f | MapToScene (const vtkVector2f &point) |
virtual vtkVector2f | MapFromScene (const vtkVector2f &point) |
virtual unsigned int | StackAbove (unsigned int index, unsigned int under) |
virtual unsigned int | StackUnder (unsigned int child, unsigned int above) |
virtual bool | KeyReleaseEvent (const vtkContextKeyEvent &key) |
vtkContextScene * | GetScene () |
vtkAbstractContextItem * | GetParent () |
virtual bool | GetVisible () |
virtual void | SetVisible (bool) |
virtual bool | GetInteractive () |
virtual void | SetInteractive (bool) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkGraphItem * | New () |
static int | IsTypeOf (const char *type) |
static vtkGraphItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkContextItem | |
static int | IsTypeOf (const char *type) |
static vtkContextItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkAbstractContextItem | |
static int | IsTypeOf (const char *type) |
static vtkAbstractContextItem * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
Static Public Member Functions inherited from vtkObjectBase | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Static Protected Member Functions | |
static void | ProcessEvents (vtkObject *caller, unsigned long event, void *clientData, void *callerData) |
Additional Inherited Members | |
Protected Attributes inherited from vtkContextItem | |
double | Opacity |
Protected Attributes inherited from vtkAbstractContextItem | |
vtkContextScene * | Scene |
vtkAbstractContextItem * | Parent |
vtkContextScenePrivate * | Children |
bool | Visible |
bool | Interactive |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
A 2D graphics item for rendering a graph.
This item draws a graph as a part of a vtkContextScene. This simple class has minimal state and delegates the determination of visual vertex and edge properties like color, size, width, etc. to a set of virtual functions. To influence the rendering of the graph, subclass this item and override the property functions you wish to customize.
Definition at line 49 of file vtkGraphItem.h.
Definition at line 53 of file vtkGraphItem.h.
|
protected |
|
protected |
|
static |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkContextItem.
|
static |
|
protectedvirtual |
Reimplemented from vtkContextItem.
vtkGraphItem* vtkGraphItem::NewInstance | ( | ) | const |
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkContextItem.
|
virtual |
The graph that this item draws.
|
virtual |
The graph that this item draws.
|
virtual |
Exposes the incremental graph layout for updating parameters.
|
virtual |
Begins or ends the layout animation.
|
virtual |
Begins or ends the layout animation.
|
virtual |
Incrementally updates the graph layout.
|
protectedvirtual |
Paints the graph. This method will call RebuildBuffers() if the graph is dirty, then call PaintBuffers().
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Builds a cache of data from the graph by calling the virtual functions such as VertexColor(), EdgeColor(), etc. This will only get called when the item is dirty (i.e. IsDirty() returns true).
|
protectedvirtual |
Efficiently draws the contents of the buffers built in RebuildBuffers. This occurs once per frame.
|
protectedvirtual |
Returns true if the underlying vtkGraph has been modified since the last RebuildBuffers, signalling a new RebuildBuffers is needed. When the graph was modified, it assumes the buffers will be rebuilt, so it updates the modified time of the last build. Override this function if you have a subclass that uses any information in addition to the vtkGraph to determine visual propeties that may be dynamic.
|
protectedvirtual |
Returns the number of vertices in the graph. Generally you do not need to override this method as it simply queries the underlying vtkGraph.
|
protectedvirtual |
Returns the number of edges in the graph. Generally you do not need to override this method as it simply queries the underlying vtkGraph.
Returns the number of edge control points for a particular edge. The implementation returns GetNumberOfEdgePoints(edge) + 2 for the specified edge to incorporate the source and target vertex positions as intial and final edge points.
Returns the edge width. Override in a subclass to change the edge width. Note: The item currently supports one width per edge, queried on the first point.
|
protectedvirtual |
Returns the edge color. Override in a subclass to change the edge color. Each edge control point may be rendered with a separate color with interpolation on line segments between points.
|
protectedvirtual |
Returns the edge control point positions. You generally do not need to override this method, instead change the edge control points on the underlying vtkGraph with SetEdgePoint(), AddEdgePoint(), etc., then call Modified() on the vtkGraph and re-render the scene.
Returns the vertex size in pixels, which is remains the same at any zoom level. Override in a subclass to change the graph vertex size. Note: The item currently supports one size per graph, queried on the first vertex.
|
protectedvirtual |
Returns the color of each vertex. Override in a subclass to change the graph vertex colors.
Returns the marker type for each vertex, as defined in vtkMarkerUtilities. Override in a subclass to change the graph marker type. Note: The item currently supports one marker type for all vertices, queried on the first vertex.
|
protectedvirtual |
Returns the position of each vertex. You generally do not need to override this method. Instead, change the vertex positions with vtkGraph's SetPoint(), then call Modified() on the graph and re-render the scene.
|
protectedvirtual |
Returns the tooltip for each vertex. Override in a subclass to change the tooltip text.
|
staticprotected |
Process events and dispatch to the appropriate member functions.
|
protectedvirtual |
Return index of hit vertex, or -1 if no hit.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Handle mouse events.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Whether this graph item is hit.
Reimplemented from vtkAbstractContextItem.
|
protectedvirtual |
Change the position of the tooltip based on the vertex hovered.