mitk.Vector2D#

class mitk.Vector2D#

Bases: pybind11_object

2D vector in world coordinates.

A pair of double-precision scalars representing a direction or offset. Distinct from Point2D: a vector encodes a displacement and is unaffected by translations of the coordinate system.

__init__(*args, **kwargs)#

Overloaded function.

  1. __init__(self: mitk.Vector2D) -> None

Construct a zero vector (0, 0).

  1. __init__(self: mitk.Vector2D, x: typing.SupportsFloat, y: typing.SupportsFloat) -> None

Construct a vector with the given components.

Parameters:
  • x – X component.

  • y – Y component.

Methods

__init__(*args, **kwargs)

Overloaded function.

Attributes

x

X component.

y

Y component.

__getitem__(self: mitk.Vector2D, arg0: SupportsInt) float#

Return the i-th component (0 = x, 1 = y).

__setitem__(self: mitk.Vector2D, arg0: SupportsInt, arg1: SupportsFloat) None#

Set the i-th component.

property x#

X component.

property y#

Y component.