spockbot.vector module

class spockbot.vector.BaseVector(*values)

Bases: object

init(*args)
class spockbot.vector.CartesianVector(*values)

Bases: spockbot.vector.BaseVector

ceil()
dist(other=None)
dist_cubic(other=None)

Manhattan distance

dist_sq(other=None)

For fast length comparison

dot_product(other)
floor()
iadd(other)
iceil()
idiv(other)
ifloor()
imul(other)
isub(other)
itruediv(other)
norm()
trunc()
zero()
class spockbot.vector.Vector3(*xyz)

Bases: spockbot.vector.CartesianVector

get_dict()
init(*args)
set_dict(data)
x
y
yaw_pitch

Calculate the yaw and pitch of this vector

z
class spockbot.vector.YawPitch(*args)

Bases: spockbot.vector.BaseVector

Store the yaw and pitch (in degrees)

init(*args)
pitch

Pitch in degrees

rpitch

Pitch in radians

ryaw

Yaw in radians

unit_vector()

Generate a unit vector (norm = 1)

yaw

Yaw in degrees