eradiate.scenes.measure.TargetRectangle#
- class eradiate.scenes.measure.TargetRectangle(xmin, xmax, ymin, ymax, z=0.0)[source]#
Bases:
TargetRectangle target origin specification.
This class defines an axis-aligned rectangular zone where ray targets will be sampled or ray origins will be projected.
- Parameters:
xmin (
quantityorfloat) – Lower bound on the X axis.Unit-enabled field (default: ucc[‘length’]).
xmax (
quantityorfloat) – Upper bound on the X axis.Unit-enabled field (default: ucc[‘length’]).
ymin (
quantityorfloat) – Lower bound on the Y axis.Unit-enabled field (default: ucc[‘length’]).
ymax (
quantityorfloat) – Upper bound on the Y axis.Unit-enabled field (default: ucc[‘length’]).
z (
quantityorfloat, default:0.0) – Altitude of the plane enclosing the rectangle.Unit-enabled field (default: ucc[‘length’]).
- Fields:
- static convert(value)#
Object converter method.
If
valueis a dictionary, this method usesnew()to instantiate aTargetchild class based on the"type"entry it contains.If
valueis a 3-vector, this method returns aTargetPointinstance.Otherwise, it returns
value.
- static new(target_type, *args, **kwargs)#
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:TargetPointrectangle:TargetRectangle
- Parameters:
target_type (
{"point", "rectangle"}) – Identifier of one of the supported child classes.- Returns: