eradiate.scenes.measure.TargetRectangle#
- class eradiate.scenes.measure.TargetRectangle(xmin, xmax, ymin, ymax, z=0.0)[source]#
Bases:
Target
Rectangle 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 (
quantity
orfloat
) – Lower bound on the X axis.Unit-enabled field (default: ucc[‘length’]).
xmax (
quantity
orfloat
) – Upper bound on the X axis.Unit-enabled field (default: ucc[‘length’]).
ymin (
quantity
orfloat
) – Lower bound on the Y axis.Unit-enabled field (default: ucc[‘length’]).
ymax (
quantity
orfloat
) – Upper bound on the Y axis.Unit-enabled field (default: ucc[‘length’]).
z (
quantity
orfloat
, default:0.0
) – Altitude of the plane enclosing the rectangle.Unit-enabled field (default: ucc[‘length’]).
- Fields:
- static convert(value)#
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)#
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: