pyrot.eye_modelling.datamodels.validators#

Classes#

Functions#

rayocular_field(→ Value)

Creates a validated field with the given validator.

dataclass(→ Callable[Ellipsis, Value])

positive_float(→ float)

vector3(→ Callable[[Any], Vector3[Item]])

Module Contents#

pyrot.eye_modelling.datamodels.validators.rayocular_field(validator: Callable[[Any], Value], name: str | None = None) Value#

Creates a validated field with the given validator.

Parameters#

namestr

The RayOcular name of the field.

validatorCallable[[Any], Value]

A callable object that takes any value as input and returns a validated value.

Returns#

ValidatedField[Instance, Value]

The validated field.

pyrot.eye_modelling.datamodels.validators.dataclass(cls: type[Value]) Callable[Ellipsis, Value]#
pyrot.eye_modelling.datamodels.validators.positive_float(value: Any) float#
class pyrot.eye_modelling.datamodels.validators.Vector3#

Bases: Generic[Value]

x: Value#
y: Value#
z: Value#
pyrot.eye_modelling.datamodels.validators.vector3(item_validator: Callable[Ellipsis, Item]) Callable[[Any], Vector3[Item]]#