organoid_tracker.core.vector module

class organoid_tracker.core.vector.Vector2(x: float, y: float)

Bases: object

ZERO: Vector2
distance(other: Vector3) float

Gets the distance to the other point.

dot(other: Vector2) float

Returns the dot product.

length() float

Length of this vector.

multiply(amount: float) Vector2

Scalar multiplication.

normalized() Vector2

Returns a new vector with the same orientation, but with a length of 1.

to_vector3(*, z: float) Vector3

Returns a Vector3 with the current x and y and the given z.

x: float
y: float
class organoid_tracker.core.vector.Vector3(x: float, y: float, z: float)

Bases: object

ZERO: Vector3 = Vector3(0.0, 0.0, 0.0)
cross(other: Vector3) Vector3

Returns the cross product of this vector with another vector

distance(other: Vector3) float

Gets the distance to the other point.

divide(amount: float) Vector3

Scalar division.

dot(other: Vector3) float

Returns the dot product.

length() float

Length of this vector.

multiply(amount: float) Vector3

Scalar multiplication.

normalized() Vector3

Returns a new vector with the same orientation, but with a length of 1.

static sum(vectors: Iterable[Vector3]) Vector3

Gets the sum of the given vectors. Returns zero if the iterable is empty.

x: float
y: float
z: float