Re: Retrieving geode isected with.

New Message Reply Date view Thread view Subject view Author view

Kowsik Guruswamy (kowsik++at++coryphaeus.com)
Mon, 22 Apr 1996 11:19:24 -0700


On Apr 22, 1:20pm, Scott McMillan wrote:
> Subject: Retrieving geode isected with.
> I am trying to get a _pointer_ to the pfGeode in my scene graph that I have
> detected an intersection with. This would be used to limit the isect() on
> the next pass through the APP to checking against this geode first rather
> than on the entire scene graph. I am using IRIX5.3/Performer2.0...

[snip]

> pfGeode node;
> :
> :
> hits[0][0]->query(PFQHIT_NODE, &node);
>
> This does not crash but subsequent node.isect() calls yield no intersections
> when in fact there should be. I don't think I would want this anyway
> because, at best, part of the scene graph would be copied into my node anyway
> which is unwanted overhead....and what about the underlying pfGeoSets?

How about

  pfGeode *node;

  hits[0][0]->query (PFQHIT_NODE, &node);

That should get a pointer to the pfGeode...

> The next try was to use the pfPath:
>
> pfPath *prev_geometry_path = new pfPath(); // done once in the constructor
> :
> :
> hits[0][0]->query(PFQHIT_PATH, prev_geometry_path);
>
> But this returns a path with zero length....what happened to the path the
> isect took to get a valid intersection???

First of all, you have to tell performer to build the pfPath while it's doing
the intersection. You need to OR PFTRAV_IS_PATH with the 'mode' field in the
pfSegSet, before calling node->isect(...);

To get the path...

  pfPath *prev_geometry_path;
  ...
  hits[0][0]->query (PFQHIT_PATH, &prev_geometry_path);

The path returned by Performer [If I remember correctly] is reused in the next
call to node->isect(). Make sure you copy that into your own path. Also read
the man pages for pfNode. It's got tons of info, thanks to Performer 'tired of
typing' team. *smile*

K.

-- 
kowsik++at++coryphaeus.com     | pirts suiboM a hguorht neeb sah txet sihT
http://www.coryphaeus.com |
                          | You are not you, you are me! - arnie
work: (408)-395-4537 e201 |

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:52:45 PDT

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