Commit ecd7d2fe authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

allow selection of targets by 3D distance to event origin

parent a3dc87ad
......@@ -921,6 +921,8 @@ class TargetConfig(Object):
group = gf.StringID.T(optional=True)
distance_min = Float.T(optional=True)
distance_max = Float.T(optional=True)
distance_3d_min = Float.T(optional=True)
distance_3d_max = Float.T(optional=True)
depth_min = Float.T(optional=True)
depth_max = Float.T(optional=True)
limit = Int.T(optional=True)
......@@ -961,6 +963,14 @@ class TargetConfig(Object):
target.distance_to(origin) > self.distance_max:
continue
if self.distance_3d_min is not None and \
target.distance_3d_to(origin) < self.distance_3d_min:
continue
if self.distance_3d_max is not None and \
target.distance_3d_to(origin) > self.distance_3d_max:
continue
if self.depth_min is not None and \
target.depth < self.depth_min:
continue
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment