www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/25/14:14:00

From: Bob Pendleton <bpendleton AT tri DOT sbc DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Mouse in 3D environment
Date: Wed, 25 Mar 1998 10:15:32 -0600
Organization: Southwestern Bell Technology Resouces, Inc.
Lines: 25
Message-ID: <35192DA4.9B515868@tri.sbc.com>
References: <Pine DOT LNX DOT 3 DOT 95 DOT 980324100843 DOT 278C-100000 AT silvia DOT rec DOT upv DOT es>
NNTP-Posting-Host: claymore.bb.tri.sbc.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


Theuzifan wrote:

> Hi all!
> Did you have any idea on how to implement a mouse in a 3D environment?
> I mean, I have a 3D world, I have a mouse, and I want to know at what
> 3d object I've clicked... what should I do?
>
> Thanks in advance!
>
> Theuzifan Sumachingun
> Tema de refexion de la semana:
> - Por que se me olvidan todos los temas de reflexion que pienso en casa?

  The "easy" way is to define a clipping frustrun centered on a line that
passes from the eye point to the point in the screen plane that the mouse
pointer is currently on. Then, just(just he says :-) clip the scene to the
frustrum, just like you clipped it to the viewing frustrun. The result will
be a list of polygons or what ever that MIGHT be the ones you want. Then
sort them and pick the one nearest to you, or farthest, or what ever rule
you want to use.

                    Bob P.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019