intersectors module

class gensei.intersectors.EllipsoidIntersector(mtx=None, mtx_hc=None, centre=None)

The intersector corresponding to a bounding ellipsoid.

Methods

copy
fd_close
fd_open
get_aligned_bounding_box
get_dict
get_origin_bounding_box
init_trait
intersects
intersects_fast
iter_segments
objects_from_dict
report
set_centre
set_data
set_default_traits
get_aligned_bounding_box()

Get the ellipsoid’s axes-aligned bounding box.

Return:
bbox : 3 x 2 array
The bounding box.
get_origin_bounding_box()

Get the ellipsoid’s axes-aligned bounding box as if centered at the origin.

Return:
bbox : 3 x 2 array
The bounding box.
intersects(other)

Test if two ellipsoids self and other intersect.

Returns:

flag : int

  • 0 -> the ellipsoids are disjoint
  • 1 -> touch in a single surface point
  • 2 -> have common inner points
set_data(mtx=None, mtx_hc=None, centre=None)
class gensei.intersectors.Intersector(**kwargs)

Base class defining the intersector interface.

An intersector is a generalization of the concept of bounding box. Its purpose is to quickly decide that two objects do not intersect. False positives are, on the other hand possible. The possible results of an intersector test are thus:

  • objects do not intersect (no common inner or surface point)
  • objects might intersect

Methods

copy
fd_close
fd_open
get_dict
init_trait
intersects_fast
iter_segments
objects_from_dict
report
set_centre
set_default_traits
intersects_fast(other)
Test intersection of axes-aligned bounding boxes.
iter_segments()
set_centre(centre)
Set the intersector’s centre.

Previous topic

getch module

This Page