Utilities & Constants

utils

hazy.utils.all_same_type(objects: Iterable) bool[source]

Check if all objects in iterable have the exact same type.

Parameters:

objects – Iterable of objects to check

Returns:

True if all objects have identical type, False otherwise

Raises:

ValueError – If iterable is empty

hazy.utils.check_same_frame(*objects: GeometricPrimitive)[source]

Verify that two geometric primitives are in the same reference frame.

Parameters:
  • object1 – First geometric primitive

  • object2 – Second geometric primitive

Raises:

RuntimeError – If objects are in different frames

constants

hazy.constants.IDENTITY_ROTATION = Rotation.from_matrix(array([[1., 0., 0.],                             [0., 1., 0.],                             [0., 0., 1.]]))

no rotation.

Type:

Identity rotation

hazy.constants.IDENTITY_SCALE = array([1., 1., 1.])

no scaling in any dimension.

Type:

Identity scaling

hazy.constants.IDENTITY_TRANSLATION = array([0., 0., 0.])

no displacement.

Type:

Identity translation