Sets min and max to lower and upper bounds for the square of the
Euclidean distance between the object contained in bb and p. For these
bounds to make any sense the bounding box must be "tight" i.e. each of the
6 faces of the box must at least be touched by one point of the bounded
object.
Builds a new hierarchy of bounding boxes for bboxes. At each
level, the GNode->data field contains a GtsBBox bounding box of
all the children. The tree is binary and is built by repeatedly
cutting in two approximately equal halves the bounding boxes at
each level until a leaf node (i.e. a bounding box given in bboxes)
is reached. In order to minimize the depth of the tree, the cutting
direction is always chosen as perpendicular to the longest
dimension of the bounding box.
Destroys all the bounding boxes created by tree and destroys the
tree itself. If free_leaves is set to TRUE, destroys boxes given
by the user when creating the tree (i.e. leaves of the tree).
tree :
a bounding box tree.
free_leaves :
if TRUE the bounding boxes given by the user are freed.
Given a segment s, points are sampled regularly on its length
using delta as increment. The distance from each of these points
to the closest object of tree is computed using distance and the
gts_bb_tree_point_distance() function. The fields of range are
filled with the number of points sampled, the minimum, average and
maximum value and the standard deviation.
Given a triangle t, points are sampled regularly on its surface
using delta as increment. The distance from each of these points
to the closest object of tree is computed using distance and the
gts_bb_tree_point_distance() function. The fields of range are
filled with the number of points sampled, the minimum, average and
maximum value and the standard deviation.
Calls gts_bb_tree_segment_distance() for each edge boundary of s.
The fields of range are filled with the minimum, maximum and
average distance. The average distance is defined as the sum of the
average distances for each boundary edge weighthed by their length
and divided by the total length of the boundaries. The standard
deviation is defined accordingly. The n field of range is filled
with the number of sampled points used.
Calls gts_bb_tree_triangle_distance() for each face of s. The
fields of range are filled with the minimum, maximum and average
distance. The average distance is defined as the sum of the average
distances for each triangle weighthed by their area and divided by
the total area of the surface. The standard deviation is defined
accordingly. The n field of range is filled with the number of
sampled points used.