FreeMat

- Main Page
- Related Pages

vtkGeoView

Section: Visualization Toolkit Geo Vis Classes

# Usage

vtkGeoView is a 3D globe view. The globe may contain a multi-resolution geometry source (vtkGeoTerrain), multiple multi-resolution image sources (vtkGeoAlignedImageRepresentation), as well as other representations such as vtkRenderedGraphRepresentation. At a minimum, the view must have a terrain and one image representation. The view uses vtkGeoInteractorStyle to orbit, zoom, and tilt the view, and contains a vtkCompassWidget for manipulating the camera.

Each terrain or image representation contains a vtkGeoSource subclass which generates geometry or imagery at multiple resolutions. As the camera position changes, the terrain and/or image representations may ask its vtkGeoSource to refine the geometry. This refinement is performed on a separate thread, and the data is added to the view when it becomes available.

To create an instance of class vtkGeoView, simply invoke its constructor as follows

      obj = vtkGeoView

# Methods

The class vtkGeoView has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkGeoView class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkGeoView = obj.NewInstance ()`
- `vtkGeoView = obj.SafeDownCast (vtkObject o)`
- `vtkGeoAlignedImageRepresentation = obj.AddDefaultImageRepresentation (vtkImageData image)` - Adds an image representation with a simple terrain model using the image in the specified file as the globe terrain.
- `obj.PrepareForRendering ()`
- `obj.BuildLowResEarth (double origin[3])` - Rebuild low-res earth source; call after (re)setting origin.
- `obj.SetLockHeading (bool lock)` - Whether the view locks the heading when panning. Default is off.
- `bool = obj.GetLockHeading ()` - Whether the view locks the heading when panning. Default is off.
- `obj.LockHeadingOn ()` - Whether the view locks the heading when panning. Default is off.
- `obj.LockHeadingOff ()` - Whether the view locks the heading when panning. Default is off.
- `vtkGeoInteractorStyle = obj.GetGeoInteractorStyle ()` - Convenience method for obtaining the internal interactor style.
- `obj.SetGeoInteractorStyle (vtkGeoInteractorStyle style)` - Method to change the interactor style.
- `obj.SetTerrain (vtkGeoTerrain terrain)` - The terrain (geometry) model for this earth view.
- `vtkGeoTerrain = obj.GetTerrain ()` - The terrain (geometry) model for this earth view.
- `obj.Render ()` - Update and render the view.