Skip to content

VTK ViewPortObject

Michael Keilman edited this page Aug 8, 2022 · 1 revision

ViewPortObject(source, renderer)

A 2-dimensional representation of a 3-dimensional vtk object

Constructor

new ViewPortObject(source, renderer)

Parameters:
Name Type Description
source * a vtk source, reader, etc.
renderer vtk.Rendering.Core.vtkRenderer a vtk renderer

Source:

Members

source :*

vtk source

Type:
  • *

Source:

worldCoord :vtk.Rendering.Core.vtkCoordinate

vtk coordinate system

Type:
  • vtk.Rendering.Core.vtkCoordinate

Source:

Methods

boundingRect() → {Rect}

Calculates the rectangle surrounding the vtk object, projected into the viewport

Source:

Returns:

Type
Rect

externalViewportEdgesForDimension(dim) → {Array.<LineSegment>}

An external edge has all other corners on the same side of the line it defines

Parameters:
Name Type Description
dim string dimension (x|y|z)

Source:

Returns:

Type
Array.<LineSegment>

extrema() → {Object}

points on the screen that have the largest and smallest values in each dimension

Source:

Returns:

- mapping of dimension to the extrema, e.g. {x: [p1, p2, ...], ...}

Type
Object

viewPortCorners() → {Array.<Point>}

Translates corners from vtk world to viewport

Source:

Returns:

Type
Array.<Point>

viewportEdges() → {Object}

Translates edges from vtk world to viewport

Source:

Returns:

- mapping of dimension to the edges, e.g. {x: [LineSegment1, LineSegment2], ...}

Type
Object

viewPortPoint(worldPoint) → {Point}

Translates a 3-dimensional Point in the vttk world corresponding to the given 2-dimensional point in the viewport

Parameters:
Name Type Description
worldPoint Point

Source:

Returns:

Type
Point

viewPortPoints(coords) → {Array.<Point>}

Translates the given Points from vtk world to viewport

Parameters:
Name Type Description
coords Array.<Point> 3d points

Source:

Returns:

- 2d points

Type
Array.<Point>

worldCenter() → {Point}

Gets the center of the vtk object

Source:

Returns:

Type
Point

worldCorners() → {Array.<Point>}

Gets the corners of the vtk object. Subclasses should override

Source:

Returns:

Type
Array.<Point>

worldEdges() → {Object}

Gets the edges - that is, the lines connecting corners. Subclasses should override

Source:

Returns:

Type
Object

Clone this wiki locally