From: Bruce S. <Bru...@nc...> - 2008-03-18 02:17:39
|
As you know, none of these kinds of checks are currently built into Visual. One of the problems is that what you're asking for is not very well defined. My guess is that many of the things you're asking for are highly context-specific and not easily incorporated into a general scheme. See further comments below: Hans-Joachim Gurt wrote: > Hello, > > I would like to > * check if objects in a scene overlap, Overlap in the 2D projection on the screen, or overlap in 3D? > * check if an area in space is empty, Presumably you mean volume? Or do you in fact mean an area in the 2D projection on the screen? > * get a list of objects that occupy a given point or area in space, Area on the 2D screen? Or volume in the 3D space? > * get the distance between objects "Distance between objects" is an ill-defined term. Do you mean center-to-center? Shortest distance between any two points in the two objects? > > E.g. in the demo "bouncing ball", I would like to check > if the ball touches/overlaps the floor-object, as opposed > to checking a fixed y-value for reversing the motion. Note that in "stars.py" there is such a check, a check to see whether the center-to-center distance of two stars is less than the sum of the two radii of the two stars. > > The empty-check would be useful for automatic placing of labels > (e.g. by varying the offsets if an area is occupied), > so that they don't overlap curves/objects/other labels. This sounds like maybe you're most interested in area on the 2D projection. > > > There was an example for collision-check in this mailinglist > in 2006-04, but that did its own housekeeping of objects. > > > > Regards, > HaJo Gurt |