#include <vtkDataRepresentation.h>
vtkDataRepresentation the superclass for representations of data objects. This class itself may be instantiated and used as a representation that simply holds a connection to a pipeline.
If there are multiple representations present in a view, you should use a subclass of vtkDataRepresentation. The representation is responsible for taking the input pipeline connection and converting it to an object usable by a view. In the most common case, the representation will contain the pipeline necessary to convert a data object into an actor or set of actors.
The representation has a concept of a selection. If the user performs a selection operation on the view, the view forwards this on to its representations. The representation is responsible for displaying that selection in an appropriate way.
Representation selections may also be linked. The representation shares the selection by converting it into a view-independent format, then setting the selection on its vtkSelectionLink. Other representations sharing the same selection link instance will get the same selection from the selection link when the view is updated. The application is responsible for linking representations as appropriate by setting the same vtkSelectionLink on each linked representation.
Definition at line 66 of file vtkDataRepresentation.h.
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetInput (vtkDataObject *input) |
void | Select (vtkView *view, vtkSelection *selection) |
void | UpdateSelection (vtkSelection *selection) |
virtual void | SetInputConnection (vtkAlgorithmOutput *conn) |
virtual vtkAlgorithmOutput * | GetInputConnection () |
virtual vtkSelectionLink * | GetSelectionLink () |
virtual void | SetSelectionLink (vtkSelectionLink *link) |
Static Public Member Functions | |
static vtkDataRepresentation * | New () |
static int | IsTypeOf (const char *type) |
static vtkDataRepresentation * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkDataRepresentation () | |
~vtkDataRepresentation () | |
virtual bool | AddToView (vtkView *vtkNotUsed(view)) |
virtual bool | RemoveFromView (vtkView *vtkNotUsed(view)) |
virtual vtkSelection * | ConvertSelection (vtkView *view, vtkSelection *selection) |
Protected Attributes | |
vtkAlgorithmOutput * | InputConnection |
vtkSelectionLink * | SelectionLink |
Friends | |
class | vtkView |
Reimplemented from vtkObject.
Reimplemented in vtkSurfaceRepresentation.
Definition at line 70 of file vtkDataRepresentation.h.
vtkDataRepresentation::vtkDataRepresentation | ( | ) | [protected] |
vtkDataRepresentation::~vtkDataRepresentation | ( | ) | [protected] |
static vtkDataRepresentation* vtkDataRepresentation::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
Reimplemented in vtkSurfaceRepresentation.
virtual const char* vtkDataRepresentation::GetClassName | ( | ) | [virtual] |
static int vtkDataRepresentation::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkSurfaceRepresentation.
virtual int vtkDataRepresentation::IsA | ( | const char * | name | ) | [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 vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkSurfaceRepresentation.
static vtkDataRepresentation* vtkDataRepresentation::SafeDownCast | ( | vtkObject * | o | ) | [static] |
void vtkDataRepresentation::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [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 vtkObject.
Reimplemented in vtkSurfaceRepresentation.
void vtkDataRepresentation::SetInput | ( | vtkDataObject * | input | ) |
A convenience method that calls SetInputConnection on the producer's connection.
virtual void vtkDataRepresentation::SetInputConnection | ( | vtkAlgorithmOutput * | conn | ) | [virtual] |
Sets the input pipeline connection to this representation. This method should be overridden by subclasses to connect to the internal pipeline.
Reimplemented in vtkSurfaceRepresentation.
virtual vtkAlgorithmOutput* vtkDataRepresentation::GetInputConnection | ( | ) | [virtual] |
Sets the input pipeline connection to this representation. This method should be overridden by subclasses to connect to the internal pipeline.
void vtkDataRepresentation::Select | ( | vtkView * | view, | |
vtkSelection * | selection | |||
) |
Handle a selection a view. Subclasses should not generally override this. This function calls ConvertSelection() to (possibly) convert the selection into something appropriate for linked representations. This function then calls UpdateSelection() with the result of the conversion.
void vtkDataRepresentation::UpdateSelection | ( | vtkSelection * | selection | ) |
Copies the selection into the representation's linked selection and triggers a SelectionChanged event.
virtual vtkSelectionLink* vtkDataRepresentation::GetSelectionLink | ( | ) | [virtual] |
The selection linking object. Set the same selection link on multiple representations to link views. Subclasses should override SetSelectionLink to additionally connect the selection link into the internal selection pipeline.
virtual void vtkDataRepresentation::SetSelectionLink | ( | vtkSelectionLink * | link | ) | [virtual] |
The selection linking object. Set the same selection link on multiple representations to link views. Subclasses should override SetSelectionLink to additionally connect the selection link into the internal selection pipeline.
Reimplemented in vtkSurfaceRepresentation.
virtual bool vtkDataRepresentation::AddToView | ( | vtkView * | vtkNotUsedview | ) | [inline, protected, virtual] |
Adds the representation to the view. This is called from vtkView::AddRepresentation(). Subclasses should override this method.
Definition at line 112 of file vtkDataRepresentation.h.
virtual bool vtkDataRepresentation::RemoveFromView | ( | vtkView * | vtkNotUsedview | ) | [inline, protected, virtual] |
Removes the representation to the view. This is called from vtkView::RemoveRepresentation(). Subclasses should override this method.
Definition at line 117 of file vtkDataRepresentation.h.
virtual vtkSelection* vtkDataRepresentation::ConvertSelection | ( | vtkView * | view, | |
vtkSelection * | selection | |||
) | [protected, virtual] |
Convert the selection to a type appropriate for sharing with other representations through vtkSelectionLink, possibly using the view. For the superclass, we just return the same selection. Subclasses may do something more fancy, like convert the selection from a frustrum to a list of pedigree ids. If the selection cannot be applied to this representation, return NULL.
Reimplemented in vtkSurfaceRepresentation.
friend class vtkView [friend] |
Definition at line 134 of file vtkDataRepresentation.h.
vtkAlgorithmOutput* vtkDataRepresentation::InputConnection [protected] |
Definition at line 128 of file vtkDataRepresentation.h.
vtkSelectionLink* vtkDataRepresentation::SelectionLink [protected] |
Definition at line 131 of file vtkDataRepresentation.h.