Re: interactive question

New Message Reply Date view Thread view Subject view Author view

Ran Yakir (rany++at++bvr.co.il)
Mon, 29 Jan 1996 08:12:20 +0000


> I'm a beginner and I want to do programming on interactive
> graphics.
>
> Say, I've a simple model of a house and I want to open the door
> (interact by some means/ using mouse?) and walk through the
> internal part of the house (I've built two models, external and
> internal portion of the house).
>
> Task: I would like to 'enter' the house only through the front door
> and nowhere else.
>
> What is the effective way to perform this kind of interactive
> problem?

Are you using Performer ?

If you want to limit yourself to a house and a walking person, then this could
be regarded as a 2D problem. You can test the position of the person against a
2D polygon that represents the walls layout.

If you need something more general - use the pfNodeIsectSegs function of
Performer. It intersect a group of line segments against a node (your walls).
You can construct a line segment that begins at the position of the person, and
goes to the direction he/she is moving to. When teh person is at the door - a
sort segment will return no intersection.

Ran

-- 
 __                                  | Ran Yakir
 /_)  _  __   \  / _   / o __        | Graphics App. Chief Engineer
/ )_ (_(_) )   \/ (_(_/<_(_)(        | BVR Technologies Ltd.
              _/                     |   
-------------------------------------+--------------------------------
Phone :                              | E-mail : rany++at++bvr.co.il
  Work : 972-3-5715671               |
  Res. : 972-9-989974                |
Fax    : 972-3-5715668               |

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:18 PDT

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