Re: Highlighting objects

New Message Reply Date view Thread view Subject view Author view

Randy Stiles (stiles++at++aic.lockheed.com)
Mon, 12 Aug 1996 09:21:32 -0700


Kenneth Gordon wrote:
>
> I am trying to use a laser pointer to highlight certain certain objects, and am
> trying to find a simple way to do it. The objects are fairly small, so I am
> trying to highlight the bounding box (or sphere, if the box won't work) around
> the object. I have come up with a couple of different ways, but none of them
> seems to work very well, and I was wondering if anyone has any other ideas:
>
> 1. Using a pfHighlight for each geoset. This looks great when an object is
> made up of only one geoset, however my objects are often made up of many
> geosets. Is there a way to use a pfHighlight with a group node? I tried
> highlighting each geoset individually, but it looks pretty bad that way (for
> one thing, parts of the object disappear when the different highlighted boxes
> intersect). If I could put ONE pfHighlight around the entire object, that
> would be ideal.

You have to set up a traverser function that traverses the graph, and
calls its callback whenever it encounters geosets. I went through this.

> 2. Calculating the bounding sphere. Several problems with this method, the
> worst being that for some reason, the radius of the bounding sphere is MUCH
> larger than the object itself (the object is a plane (an F15) which is around
> 20 meters in length, but the bounding sphere I am getting has a radius of 501
> meters). Something isn't working here!

My experience is that if you ask Performer to calculate the bounding
sphere, it is pretty accurate. I think thats what they use in culling
tests for the frustum, so they would make that accurate/bug-free first
in order to get correct culling.

> Does anyone know of any other ways to do what I have in mind? Ideally, I'd
> like one bounding box around the entire plane, but if that isn't possible, a
> bounding sphere of the correct size would be fine.

-- 
// Randy Stiles mailto:stiles++at++aic.lockheed.com Orgn H142 Bldg 255
// Lockheed Martin Advanced Technology Center  3251 Hanover Street 
// office: 415.354.5256  fax: 415.354.5235     Palo Alto, CA 94304-1192
// http://vet.parl.com/~vet/people/stiles/
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:20 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.