eradiate.scenes.measure.Target#
- class eradiate.scenes.measure.Target[source]#
Bases:
object
Interface for target selection objects used by distant measure classes.
- static convert(value)[source]#
Object converter method.
If
value
is a dictionary, this method usesnew()
to instantiate aTarget
child class based on the"type"
entry it contains.If
value
is a 3-vector, this method returns aTargetPoint
instance.Otherwise, it returns
value
.
- static new(target_type, *args, **kwargs)[source]#
Instantiate one of the supported child classes. This factory requires manual class registration. All position and keyword arguments are forwarded to the constructed type.
Currently supported classes:
point
:TargetPoint
rectangle
:TargetRectangle
- Parameters:
target_type (
{"point", "rectangle"}
) – Identifier of one of the supported child classes.- Returns: