Skip to content

VTK CoordMapper

Michael Keilman edited this page Aug 8, 2022 · 2 revisions

CoordMapper

Provides a mapping from "lab" coordinates to vtk's coordinates via a SIREPO.GEOMETRY.Transform. Also wraps the creation of various Bundles so the transform gets applied automatically

Constructor

new CoordMapper(transform)

Parameters:
Name Type Description
transform SIREPO.GEOMETRY.Transform a Transform to translate between "lab" and "local" coordinate systems

Source:

Methods

buildActorBundle(source, transform, actorProperties)

Creates a Bundle from an arbitrary source

Parameters:
Name Type Description
source * a vtk source, reader, etc.
transform SIREPO.GEOMETRY.Transform a Transform to translate between "lab" and "local" coordinate systems
actorProperties Object a map of actor properties (e.g. 'color') to values

Source:

buildBox(labSize, labCenter, actorProperties) → {BoxBundle}

Builds a box

Parameters:
Name Type Description
labSize Array.<number> array of the x, y, z sides of the box in the lab
labCenter Array.<number> array of the x, y, z coords of the box's center in the lab
actorProperties Object a map of actor properties (e.g. 'color') to values

Source:

Returns:

Type
BoxBundle

buildLine(labP1, labP2, actorProperties) → {LineBundle}

Builds a line

Parameters:
Name Type Description
labP1 Array.<number> 1st point
labP2 Array.<number> 2nd point
actorProperties Object a map of actor properties (e.g. 'color') to values

Source:

Returns:

Type
LineBundle

buildPlane(labOrigin, labP1, labP2, actorProperties) → {PlaneBundle}

Builds a plane

Parameters:
Name Type Description
labOrigin Array.<number> origin
labP1 Array.<number> 1st point
labP2 Array.<number> 2nd point
actorProperties Object a map of actor properties (e.g. 'color') to values

Source:

Returns:

Type
LineBundle

buildSphere(labCenter, radius, actorProperties) → {SphereBundle}

Builds a sphere

Parameters:
Name Type Description
labCenter Array.<number> center in the lab
radius number
actorProperties Object a map of actor properties (e.g. 'color') to values

Source:

Returns:

Type
SphereBundle

Clone this wiki locally