Types#
Aliases#
- type pyenki.Vector = Annotated[numpy.typing.NDArray[numpy.float64], '[2, 1]']#
A two dimensional vector in cm.
- type pyenki.VectorLike = Annotated[numpy.typing.ArrayLike, numpy.float64, '[2, 1]']#
Anything that can be converted to a
Vector.
- type pyenki.Array1D = Annotated[numpy.typing.NDArray[numpy.float64], '[n]']#
A one-dimensional array of floats
- type pyenki.IntArray1D = Annotated[numpy.typing.NDArray[numpy.int64], '[n]']#
A one-dimensional array of integers.
- type pyenki.Array2D = Annotated[numpy.typing.NDArray[numpy.float64], '[n]']#
A two-dimensional array of floats
- type pyenki.Image = Annotated[numpy.typing.NDArray[numpy.uint8], '[n, m, 3]']#
An RGB image with 8 bits per color.
- type pyenki.ARGBImage = Annotated[numpy.typing.NDArray[numpy.uint8], '[n, m, 4]']#
An ARGB image with 8 bits per color.
- type pyenki.ARGBImageLike = Annotated[numpy.typing.ArrayLike, numpy.uint8, '[n, m, 4]']#
Anything that can be converted to a
ARGBImage.
- type pyenki.Controller = collections.abc.Callable[[pyenki.PhysicalObject, SupportsFloat], None]#
The type of callbacks that can be assigned to
pyenki.PhysicalObject.control_step_callbackdef callback(PhysicalObject: obj, time_step: float) -> None: ...
The first argument is the object to control, the second the time step (in seconds).
- type pyenki.viewer.Vector3 = Annotated[numpy.typing.NDArray[numpy.float64], '[3, 1]']#
A three dimensional vector in cm.
- type pyenki.viewer.Vector3Like = Annotated[numpy.typing.ArrayLike, numpy.float64, '[3, 1]']#
Anything that can be converted to a
Vector3.
Color#
- class pyenki.Color#
- Parameters:
An RGBA color with values between 0.0 and 1.0.
- threshold(limits: pyenki.Color) None#
Threshold the color using limit. For each component, if value is below limit, set it to 0
- Parameters:
limit (Color) – the threshold