VTK  9.7.20261004
vtkScivisView Class Reference

#include <vtkScivisView.h>

Detailed Description

A ready-made rendering assembly for scientific visualization.

Every VTK rendering program builds the same thing by hand: a renderer, a render window, an interactor, an interactor style, a light, an orientation marker, and the wiring between them. vtkScivisView is that assembly, already built. A view you have just created draws something reasonable before you configure anything, and it stays consistent when you replace a piece of it: hand it a render window of your own and the renderers move across, while an interactor style you had installed survives the change.

Getting started:
Create representations, configure them, and add them to the view. Start() enters the interactive event loop.
rep->SetInputConnection(source->GetOutputPort());
rep->SetColor(0.8, 0.2, 0.2);
view->AddRepresentation(rep);
view->ResetCamera();
view->Start();
Allocate and hold a VTK object.
Definition vtkNew.h:168
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
What the view itself owns:
Whatever is true of the scene as a whole.
  • the background, and the render window and its title
  • how the scene is lit: a single headlight, or a five light kit
  • how the user interacts with it, and the orientation axes marker
  • what is selected in it
  • framing the camera, bringing every representation up to date, and drawing
Whatever is true of one thing being drawn – its data, its geometry, its color – belongs to that representation instead. That line is worth remembering, because it is what says where any given piece of API lives.
Reaching further in:
The view is deliberately not a mirror of the objects underneath it. Where you need more than the scene-wide API above, ask it for the object that owns what you are after.
A family of its own:
This is not a vtkView, and it shows only vtkScivisRepresentations. The information visualization views and representations are a separate family sharing no base class with this one: they drive their own render passes and labelling, and carry annotation links and themes that mean nothing here. Neither family can stand in for the other, and the type system says so rather than a downcast at run time.
See also
vtkScivisRepresentation vtkScivisDataRepresentation vtkScivisSelector vtkSurfaceRepresentation vtkVolumeRepresentation
Examples:
vtkScivisView (Examples)
Tests:
vtkScivisView (Tests)

Definition at line 98 of file vtkScivisView.h.

Inheritance diagram for vtkScivisView:
[legend]
Collaboration diagram for vtkScivisView:
[legend]

Public Types

enum  { BoundsChangedEvent = vtkCommand::UserEvent + 1 }
 Events this view fires. More...
typedef vtkObject Superclass

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class.
vtkScivisView * NewInstance () const
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses.
vtkMTimeType GetMTime () override
 The view stores its configuration on the renderer, render window, light kit and orientation marker widget rather than in its own ivars, so the modified time reported here is the latest of this object's own and theirs.
vtkOrientationMarkerWidget * GetOrientationMarkerWidget ()
 The orientation marker widget itself, for its viewport, its marker, and whether the user can move and resize it.
vtkLightKit * GetLightKit ()
 The light kit itself, for its intensity, warmth, angle and ratio parameters.
vtkScivisScalarBars * GetScalarBars ()
 The scalar bars kept for what the representations are drawing: whether they are maintained at all, whether the user can move them, and the bars themselves.
vtkScivisSelector * GetSelector ()
 Selection: how a screen region becomes a selection, whether points or cells come back, and what was picked last.
vtkScivisExporter * GetExporter ()
 Getting the scene out: a picture of it, or the geometry in it.
vtkCamera * GetCamera ()
 The camera the scene is viewed with, for anything finer than the framing and the standard directions below – a parallel projection, a view angle, or a position worked out by the application.
void SetViewDirection (double look[3], double up[3])
 Look along look with up pointing up, and frame the scene.
void SetViewDirection (double lookX, double lookY, double lookZ, double upX, double upY, double upZ)
bool GetSceneBounds (double bounds[6])
 The extent of what the visible representations are drawing, which is not the same as what the renderer would report: this is the data, and takes no account of annotations drawn around it.
void Start ()
virtual void Render ()
 Bring every representation up to date and draw.
virtual void ResetCamera ()
 Frame the camera on everything the representations are drawing.
virtual void Update ()
 Bring every representation up to date without drawing.
void AddRepresentation (vtkScivisRepresentation *rep)
 The representations this view shows.
void SetRepresentation (vtkScivisRepresentation *rep)
 The representations this view shows.
void RemoveRepresentation (vtkScivisRepresentation *rep)
 The representations this view shows.
void RemoveAllRepresentations ()
 The representations this view shows.
int GetNumberOfRepresentations ()
 The representations this view shows.
vtkScivisRepresentation * GetRepresentation (int index=0)
 The representations this view shows.
bool IsRepresentationPresent (vtkScivisRepresentation *rep)
 The representations this view shows.
vtkRenderer * GetRenderer ()
 The renderer, render window and interactor this view draws with.
void SetRenderer (vtkRenderer *renderer)
 The renderer, render window and interactor this view draws with.
vtkRenderWindow * GetRenderWindow ()
 The renderer, render window and interactor this view draws with.
void SetRenderWindow (vtkRenderWindow *window)
 The renderer, render window and interactor this view draws with.
vtkRenderWindowInteractor * GetInteractor ()
 The renderer, render window and interactor this view draws with.
void SetInteractor (vtkRenderWindowInteractor *interactor)
 The renderer, render window and interactor this view draws with.
void SetBackground (double r, double g, double b)
 Set/Get the background color of the renderer.
double * GetBackground ()
 Set/Get the background color of the renderer.
void SetBackground2 (double r, double g, double b)
 Set/Get the background color of the renderer.
double * GetBackground2 ()
 Set/Get the background color of the renderer.
void SetGradientBackground (bool val)
 Set/Get the background color of the renderer.
bool GetGradientBackground ()
 Set/Get the background color of the renderer.
void SetWindowSize (int w, int h)
 Set/Get the render window size and title.
int * GetWindowSize ()
 Set/Get the render window size and title.
void SetWindowTitle (const char *title)
 Set/Get the render window size and title.
const char * GetWindowTitle ()
 Set/Get the render window size and title.
void SetOrientationAxesVisibility (bool val)
 Show or hide the orientation axes marker in the lower-left corner of the render window.
bool GetOrientationAxesVisibility ()
 Show or hide the orientation axes marker in the lower-left corner of the render window.
void SetUseLightKit (bool val)
 Enable or disable the light kit: a five light rig – key, fill, headlight and two back lights – managed by vtkLightKit.
bool GetUseLightKit ()
 Enable or disable the light kit: a five light rig – key, fill, headlight and two back lights – managed by vtkLightKit.
void SetInteractorStyle (vtkInteractorObserver *style)
 Install an interactor style of your own, for interaction the built-in modes do not cover – a 2D or terrain camera, or a vtkInteractorStyleManipulator configured with your own button bindings.
vtkInteractorObserver * GetInteractorStyle ()
 Install an interactor style of your own, for interaction the built-in modes do not cover – a 2D or terrain camera, or a vtkInteractorStyleManipulator configured with your own button bindings.
void SetLookupTableManager (vtkLookupTableManager *manager)
 The lookup tables the view colors through, keyed by array name.
vtkLookupTableManager * GetLookupTableManager ()
 The lookup tables the view colors through, keyed by array name.
void ViewPositiveX ()
 Look at the scene from a standard direction and frame it.
void ViewNegativeX ()
 Look at the scene from a standard direction and frame it.
void ViewPositiveY ()
 Look at the scene from a standard direction and frame it.
void ViewNegativeY ()
 Look at the scene from a standard direction and frame it.
void ViewPositiveZ ()
 Look at the scene from a standard direction and frame it.
void ViewNegativeZ ()
 Look at the scene from a standard direction and frame it.
void ViewIsometric ()
 Look at the scene from a standard direction and frame it.
Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
virtual void DebugOn ()
 Turn debugging output on.
virtual void DebugOff ()
 Turn debugging output off.
bool GetDebug ()
 Get the value of the debug flag.
void SetDebug (bool debugFlag)
 Set the value of the debug flag.
virtual void Modified ()
 Update the modification time for this object.
void RemoveObserver (unsigned long tag)
void RemoveObservers (unsigned long event)
void RemoveObservers (const char *event)
void RemoveAllObservers ()
vtkTypeBool HasObserver (unsigned long event)
vtkTypeBool HasObserver (const char *event)
vtkTypeBool InvokeEvent (unsigned long event)
vtkTypeBool InvokeEvent (const char *event)
std::string GetObjectDescription () const override
 The object description printed in messages and PrintSelf output.
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
vtkCommand * GetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object.
template<class U, class T>
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
template<class U, class T>
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events.
template<class U, class T>
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method.
vtkTypeBool InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
vtkTypeBool InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not.
virtual void SetObjectName (const std::string &objectName)
 Set/get the name of this object for reporting purposes.
virtual std::string GetObjectName () const
 Set/get the name of this object for reporting purposes.
Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string.
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
virtual void Delete ()
 Delete a VTK object.
virtual void FastDelete ()
 Delete a reference to this object.
void InitializeObjectBase ()
void Print (ostream &os)
 Print an object to an ostream.
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object).
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object).
int GetReferenceCount ()
 Return the current reference count of this object.
void SetReferenceCount (int)
 Sets the reference count.
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space.
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses.
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not.

Static Public Member Functions

static vtkScivisView * New ()
static vtkTypeBool IsTypeOf (const char *type)
static vtkScivisView * SafeDownCast (vtkObjectBase *o)
Static Public Member Functions inherited from vtkObject
static vtkObject * New ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
static void BreakOnError ()
 This method is called when vtkErrorMacro executes.
static void SetGlobalWarningDisplay (vtkTypeBool val)
 This is a global flag that controls whether any debug, warning or error messages are displayed.
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
static vtkTypeBool GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed.
Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class.
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class).
static vtkObjectBase * New ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within.
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space.

Protected Member Functions

virtual vtkObjectBase * NewInstanceInternal () const
 vtkScivisView ()
 ~vtkScivisView () override
virtual void PrepareForRendering ()
 Called before every render, once the representations are up to date.
vtkCommand * GetObserver ()
 The observer this view listens through.
virtual void ProcessEvents (vtkObject *caller, unsigned long eventId, void *callData)
 Called for every event the view is observing.
virtual void AddRepresentationInternal (vtkScivisRepresentation *rep)
 Hooks for subclasses, called after a representation has been accepted or before one is dropped.
virtual void RemoveRepresentationInternal (vtkScivisRepresentation *rep)
 Hooks for subclasses, called after a representation has been accepted or before one is dropped.
Protected Member Functions inherited from vtkObject
 vtkObject ()
 ~vtkObject () override
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events.
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events.
Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void ReportReferences (vtkGarbageCollector *)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Protected Attributes

vtkSmartPointer< vtkRenderer > Renderer
vtkSmartPointer< vtkRenderWindow > RenderWindow
Protected Attributes inherited from vtkObject
bool Debug
vtkTimeStamp MTime
vtkSubjectHelper * SubjectHelper
std::string ObjectName
Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
vtkWeakPointerBase ** WeakPointers

Friends

class Command
enum  { INTERACTION_MODE_3D = 0 , INTERACTION_MODE_SELECTION = 1 , INTERACTION_MODE_CUSTOM = 2 }
 Interaction mode constants. More...
void SetInteractionMode (int mode)
 Interaction mode constants.
int GetInteractionMode ()
 Interaction mode constants.
void SetInteractionModeTo3D ()
 Interaction mode constants.
void SetInteractionModeToSelection ()
 Interaction mode constants.

Additional Inherited Members

Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
static vtkReallocingFunction GetCurrentReallocFunction ()
static vtkFreeingFunction GetCurrentFreeFunction ()
static vtkFreeingFunction GetAlternateFreeFunction ()

Member Typedef Documentation

◆ Superclass

Definition at line 102 of file vtkScivisView.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Interaction mode constants.

INTERACTION_MODE_3D uses vtkInteractorStyleTrackballCamera (default). INTERACTION_MODE_SELECTION uses vtkInteractorStyleRubberBand3D for rubber-band selection. Mode switching is programmatic; applications typically expose it through a toolbar or keyboard shortcut. INTERACTION_MODE_CUSTOM reports that a style supplied through SetInteractorStyle() is installed; it cannot be selected directly.

The view owns one instance of each built-in style and switches between them, so any configuration applied to a style survives a mode change.

Enumerator
INTERACTION_MODE_3D 
INTERACTION_MODE_SELECTION 
INTERACTION_MODE_CUSTOM 

Definition at line 223 of file vtkScivisView.h.

◆ anonymous enum

anonymous enum

Events this view fires.

BoundsChangedEvent is fired when the extent of what the representations are drawing changes, before anything is drawn, with the new bounds as call data. It is how something that has to fit the scene – axes around it, a scale bar measuring it – is told to resize without polling for it. Bounds come from the representations rather than from the renderer's props, so whatever is listening does not feed its own size back in.

Enumerator
BoundsChangedEvent 

Definition at line 369 of file vtkScivisView.h.

Constructor & Destructor Documentation

◆ vtkScivisView()

vtkScivisView::vtkScivisView ( )
protected

◆ ~vtkScivisView()

vtkScivisView::~vtkScivisView ( )
overrideprotected

Member Function Documentation

◆ New()

vtkScivisView * vtkScivisView::New ( )
static

◆ IsTypeOf()

vtkTypeBool vtkScivisView::IsTypeOf ( const char * type)
static

◆ IsA()

virtual vtkTypeBool vtkScivisView::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

vtkScivisView * vtkScivisView::SafeDownCast ( vtkObjectBase * o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkScivisView::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkScivisView * vtkScivisView::NewInstance ( ) const

◆ PrintSelf()

void vtkScivisView::PrintSelf ( ostream & os,
vtkIndent indent )
overridevirtual

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.

◆ GetMTime()

vtkMTimeType vtkScivisView::GetMTime ( )
overridevirtual

The view stores its configuration on the renderer, render window, light kit and orientation marker widget rather than in its own ivars, so the modified time reported here is the latest of this object's own and theirs.

Note that this makes the view report scene changes too, since adding or removing a representation modifies the renderer.

Reimplemented from vtkObject.

◆ AddRepresentation()

void vtkScivisView::AddRepresentation ( vtkScivisRepresentation * rep)

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ SetRepresentation()

void vtkScivisView::SetRepresentation ( vtkScivisRepresentation * rep)

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ RemoveRepresentation()

void vtkScivisView::RemoveRepresentation ( vtkScivisRepresentation * rep)

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ RemoveAllRepresentations()

void vtkScivisView::RemoveAllRepresentations ( )

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ GetNumberOfRepresentations()

int vtkScivisView::GetNumberOfRepresentations ( )

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ GetRepresentation()

vtkScivisRepresentation * vtkScivisView::GetRepresentation ( int index = 0)

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ IsRepresentationPresent()

bool vtkScivisView::IsRepresentationPresent ( vtkScivisRepresentation * rep)

The representations this view shows.

AddRepresentation() offers the view to the representation and drops it again if the representation refuses, which is how a representation declines a view it cannot work in. SetRepresentation() is the same after removing whatever is already there.

◆ GetRenderer()

vtkRenderer * vtkScivisView::GetRenderer ( )

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ SetRenderer()

void vtkScivisView::SetRenderer ( vtkRenderer * renderer)

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ GetRenderWindow()

vtkRenderWindow * vtkScivisView::GetRenderWindow ( )

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ SetRenderWindow()

void vtkScivisView::SetRenderWindow ( vtkRenderWindow * window)

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ GetInteractor()

vtkRenderWindowInteractor * vtkScivisView::GetInteractor ( )

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ SetInteractor()

void vtkScivisView::SetInteractor ( vtkRenderWindowInteractor * interactor)

The renderer, render window and interactor this view draws with.

All three are created with the view; setting one replaces it, and the others are rewired to match – the renderers move to a window given here, and an interactor style already in use survives the change. This is what an application does to draw the view into a window of its own.

◆ SetBackground()

void vtkScivisView::SetBackground ( double r,
double g,
double b )

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ GetBackground()

double * vtkScivisView::GetBackground ( )

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ SetBackground2()

void vtkScivisView::SetBackground2 ( double r,
double g,
double b )

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ GetBackground2()

double * vtkScivisView::GetBackground2 ( )

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ SetGradientBackground()

void vtkScivisView::SetGradientBackground ( bool val)

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ GetGradientBackground()

bool vtkScivisView::GetGradientBackground ( )

Set/Get the background color of the renderer.

SetBackground sets the bottom color of the gradient, SetBackground2 the top color.

◆ SetWindowSize()

void vtkScivisView::SetWindowSize ( int w,
int h )

Set/Get the render window size and title.

◆ GetWindowSize()

int * vtkScivisView::GetWindowSize ( )

Set/Get the render window size and title.

◆ SetWindowTitle()

void vtkScivisView::SetWindowTitle ( const char * title)

Set/Get the render window size and title.

◆ GetWindowTitle()

const char * vtkScivisView::GetWindowTitle ( )

Set/Get the render window size and title.

◆ SetOrientationAxesVisibility()

void vtkScivisView::SetOrientationAxesVisibility ( bool val)

Show or hide the orientation axes marker in the lower-left corner of the render window.

The marker shows the current camera orientation as an interactive XYZ axes triad. Default is on.

◆ GetOrientationAxesVisibility()

bool vtkScivisView::GetOrientationAxesVisibility ( )

Show or hide the orientation axes marker in the lower-left corner of the render window.

The marker shows the current camera orientation as an interactive XYZ axes triad. Default is on.

◆ GetOrientationMarkerWidget()

vtkOrientationMarkerWidget * vtkScivisView::GetOrientationMarkerWidget ( )

The orientation marker widget itself, for its viewport, its marker, and whether the user can move and resize it.

◆ SetUseLightKit()

void vtkScivisView::SetUseLightKit ( bool val)

Enable or disable the light kit: a five light rig – key, fill, headlight and two back lights – managed by vtkLightKit.

Default is off, which leaves the scene lit by a single headlight the view owns.

Only that headlight gives way to the kit. Lights added to the renderer, which GetRenderer() returns, keep lighting the scene whether the kit is on or off, and survive it being switched either way.

◆ GetUseLightKit()

bool vtkScivisView::GetUseLightKit ( )

Enable or disable the light kit: a five light rig – key, fill, headlight and two back lights – managed by vtkLightKit.

Default is off, which leaves the scene lit by a single headlight the view owns.

Only that headlight gives way to the kit. Lights added to the renderer, which GetRenderer() returns, keep lighting the scene whether the kit is on or off, and survive it being switched either way.

◆ GetLightKit()

vtkLightKit * vtkScivisView::GetLightKit ( )

The light kit itself, for its intensity, warmth, angle and ratio parameters.

Only has an effect while the light kit is enabled.

Lights of your own are not part of the kit: add them to the renderer, which GetRenderer() returns, with vtkRenderer::AddLight().

◆ SetInteractionMode()

void vtkScivisView::SetInteractionMode ( int mode)

Interaction mode constants.

INTERACTION_MODE_3D uses vtkInteractorStyleTrackballCamera (default). INTERACTION_MODE_SELECTION uses vtkInteractorStyleRubberBand3D for rubber-band selection. Mode switching is programmatic; applications typically expose it through a toolbar or keyboard shortcut. INTERACTION_MODE_CUSTOM reports that a style supplied through SetInteractorStyle() is installed; it cannot be selected directly.

The view owns one instance of each built-in style and switches between them, so any configuration applied to a style survives a mode change.

◆ GetInteractionMode()

int vtkScivisView::GetInteractionMode ( )

Interaction mode constants.

INTERACTION_MODE_3D uses vtkInteractorStyleTrackballCamera (default). INTERACTION_MODE_SELECTION uses vtkInteractorStyleRubberBand3D for rubber-band selection. Mode switching is programmatic; applications typically expose it through a toolbar or keyboard shortcut. INTERACTION_MODE_CUSTOM reports that a style supplied through SetInteractorStyle() is installed; it cannot be selected directly.

The view owns one instance of each built-in style and switches between them, so any configuration applied to a style survives a mode change.

◆ SetInteractionModeTo3D()

void vtkScivisView::SetInteractionModeTo3D ( )
inline

Interaction mode constants.

INTERACTION_MODE_3D uses vtkInteractorStyleTrackballCamera (default). INTERACTION_MODE_SELECTION uses vtkInteractorStyleRubberBand3D for rubber-band selection. Mode switching is programmatic; applications typically expose it through a toolbar or keyboard shortcut. INTERACTION_MODE_CUSTOM reports that a style supplied through SetInteractorStyle() is installed; it cannot be selected directly.

The view owns one instance of each built-in style and switches between them, so any configuration applied to a style survives a mode change.

Definition at line 231 of file vtkScivisView.h.

◆ SetInteractionModeToSelection()

void vtkScivisView::SetInteractionModeToSelection ( )
inline

Interaction mode constants.

INTERACTION_MODE_3D uses vtkInteractorStyleTrackballCamera (default). INTERACTION_MODE_SELECTION uses vtkInteractorStyleRubberBand3D for rubber-band selection. Mode switching is programmatic; applications typically expose it through a toolbar or keyboard shortcut. INTERACTION_MODE_CUSTOM reports that a style supplied through SetInteractorStyle() is installed; it cannot be selected directly.

The view owns one instance of each built-in style and switches between them, so any configuration applied to a style survives a mode change.

Definition at line 232 of file vtkScivisView.h.

◆ SetInteractorStyle()

void vtkScivisView::SetInteractorStyle ( vtkInteractorObserver * style)

Install an interactor style of your own, for interaction the built-in modes do not cover – a 2D or terrain camera, or a vtkInteractorStyleManipulator configured with your own button bindings.

The view holds a reference to the style and reports INTERACTION_MODE_CUSTOM until a built-in mode is selected again, at which point the custom style is remembered and can be restored by setting it once more. Passing nullptr returns to INTERACTION_MODE_3D.

To drive selection from a custom style, call SelectRegion() from its event handling. The view does not interpret events from a style it does not know.

GetInteractorStyle() returns the style currently installed on the interactor, built-in or custom.

◆ GetInteractorStyle()

vtkInteractorObserver * vtkScivisView::GetInteractorStyle ( )

Install an interactor style of your own, for interaction the built-in modes do not cover – a 2D or terrain camera, or a vtkInteractorStyleManipulator configured with your own button bindings.

The view holds a reference to the style and reports INTERACTION_MODE_CUSTOM until a built-in mode is selected again, at which point the custom style is remembered and can be restored by setting it once more. Passing nullptr returns to INTERACTION_MODE_3D.

To drive selection from a custom style, call SelectRegion() from its event handling. The view does not interpret events from a style it does not know.

GetInteractorStyle() returns the style currently installed on the interactor, built-in or custom.

◆ SetLookupTableManager()

void vtkScivisView::SetLookupTableManager ( vtkLookupTableManager * manager)

The lookup tables the view colors through, keyed by array name.

Every representation drawing a given array is offered the same table, so that representations of one array come out the same color and span one range. Share a manager between views to keep their colors in step; a view that is not given one has its own. Setting null installs a fresh one rather than leaving the view without.

◆ GetLookupTableManager()

vtkLookupTableManager * vtkScivisView::GetLookupTableManager ( )

The lookup tables the view colors through, keyed by array name.

Every representation drawing a given array is offered the same table, so that representations of one array come out the same color and span one range. Share a manager between views to keep their colors in step; a view that is not given one has its own. Setting null installs a fresh one rather than leaving the view without.

◆ GetScalarBars()

vtkScivisScalarBars * vtkScivisView::GetScalarBars ( )

The scalar bars kept for what the representations are drawing: whether they are maintained at all, whether the user can move them, and the bars themselves.

view->GetScalarBars()->DraggableOn();
view->GetScalarBars()->GetActor("Temperature", assoc)->SetTitle("T (K)");

◆ GetSelector()

vtkScivisSelector * vtkScivisView::GetSelector ( )

Selection: how a screen region becomes a selection, whether points or cells come back, and what was picked last.

The view keeps only the interaction side of selection – which interactor style is installed, and so whether a drag draws a rubber band at all. What a rubber band then does is the selector's, and application code drives it the same way:

view->GetSelector()->SetModeToFrustum();
view->GetSelector()->SelectRegion(10, 10, 200, 200);

◆ GetExporter()

vtkScivisExporter * vtkScivisView::GetExporter ( )

Getting the scene out: a picture of it, or the geometry in it.

How a capture comes out – how large, and whether its background is transparent – is the exporter's, and application code drives it the same way:

view->GetExporter()->SetMagnification(2);
view->GetExporter()->SaveScreenshot("frame.png");
view->GetExporter()->ExportScene("scene.gltf");

◆ GetCamera()

vtkCamera * vtkScivisView::GetCamera ( )

The camera the scene is viewed with, for anything finer than the framing and the standard directions below – a parallel projection, a view angle, or a position worked out by the application.

◆ ViewPositiveX()

void vtkScivisView::ViewPositiveX ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewNegativeX()

void vtkScivisView::ViewNegativeX ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewPositiveY()

void vtkScivisView::ViewPositiveY ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewNegativeY()

void vtkScivisView::ViewNegativeY ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewPositiveZ()

void vtkScivisView::ViewPositiveZ ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewNegativeZ()

void vtkScivisView::ViewNegativeZ ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ ViewIsometric()

void vtkScivisView::ViewIsometric ( )

Look at the scene from a standard direction and frame it.

The camera is left looking along the named axis with a sensible up vector, and then framed on everything the representations are drawing, as ResetCamera() does. These follow the conventions ParaView uses:

Like any other camera move – one made through GetCamera(), or one the user makes by dragging – these show up in the view's modified time, because the camera belongs to the renderer and the renderer's modified time is part of the view's.

◆ SetViewDirection() [1/2]

void vtkScivisView::SetViewDirection ( double look[3],
double up[3] )

Look along look with up pointing up, and frame the scene.

The direction runs from the camera towards what it is looking at, so the standard directions above are this with one axis picked out.

◆ SetViewDirection() [2/2]

void vtkScivisView::SetViewDirection ( double lookX,
double lookY,
double lookZ,
double upX,
double upY,
double upZ )

◆ GetSceneBounds()

bool vtkScivisView::GetSceneBounds ( double bounds[6])

The extent of what the visible representations are drawing, which is not the same as what the renderer would report: this is the data, and takes no account of annotations drawn around it.

Returns false and leaves bounds untouched when nothing with data is being drawn.

◆ Start()

void vtkScivisView::Start ( )

◆ Render()

virtual void vtkScivisView::Render ( )
virtual

Bring every representation up to date and draw.

The camera is framed on the scene the first time, and left alone after that.

◆ ResetCamera()

virtual void vtkScivisView::ResetCamera ( )
virtual

Frame the camera on everything the representations are drawing.

◆ Update()

virtual void vtkScivisView::Update ( )
virtual

Bring every representation up to date without drawing.

◆ PrepareForRendering()

virtual void vtkScivisView::PrepareForRendering ( )
protectedvirtual

Called before every render, once the representations are up to date.

◆ GetObserver()

vtkCommand * vtkScivisView::GetObserver ( )
protected

The observer this view listens through.

Representations are given it when they are added, and anything else the view wants to hear from can be too.

◆ ProcessEvents()

virtual void vtkScivisView::ProcessEvents ( vtkObject * caller,
unsigned long eventId,
void * callData )
protectedvirtual

Called for every event the view is observing.

◆ AddRepresentationInternal()

virtual void vtkScivisView::AddRepresentationInternal ( vtkScivisRepresentation * rep)
inlineprotectedvirtual

Hooks for subclasses, called after a representation has been accepted or before one is dropped.

Definition at line 427 of file vtkScivisView.h.

◆ RemoveRepresentationInternal()

virtual void vtkScivisView::RemoveRepresentationInternal ( vtkScivisRepresentation * rep)
inlineprotectedvirtual

Hooks for subclasses, called after a representation has been accepted or before one is dropped.

Definition at line 428 of file vtkScivisView.h.

◆ Command

friend class Command
friend

Definition at line 439 of file vtkScivisView.h.

Member Data Documentation

◆ Renderer

vtkSmartPointer<vtkRenderer> vtkScivisView::Renderer
protected

Definition at line 431 of file vtkScivisView.h.

◆ RenderWindow

vtkSmartPointer<vtkRenderWindow> vtkScivisView::RenderWindow
protected

Definition at line 432 of file vtkScivisView.h.


The documentation for this class was generated from the following file: