Results 1 to 4 of 4

Thread: Mouse Click Pointers

  1. #1
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Singapore
    Posts
    2

    Mouse Click Pointers

    Hi,
    Anyone can help me in this?
    How do I get my program to display a marking, e.g. a red dot, when my mouse clicks on a certain polygon in my program?

    Do I have to work with pixel drawing? Is there any other way?

    Thanks.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Poland
    Posts
    196

    Re: Mouse Click Pointers

    Do You mean 2D drawing or drawing on 3D polygons?

  3. #3
    Junior Member Newbie
    Join Date
    May 2003
    Location
    Singapore
    Posts
    2

    Re: Mouse Click Pointers

    i have a cube with the 6 faces formed using flat 3D square polygons. I need to draw a point on the surface of the cube when the mouse clicks on it.

    Thanks.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Nov 2002
    Location
    Sofia,None,Bulgaria
    Posts
    107

    Re: Mouse Click Pointers

    The solution to your problem is not so simple i'm afraid.First you'll have to check if the click is on the cube and on which face.Then using to transform mouse position you find the click place in world coords.Using interpolation you must find the texcoord that's lying on that point and finally you must load a new texture over the old one(called decal) by using a small quad which center is the texcoord you've found.
    The pain is coming...THIS SUMMER!

Similar Threads

  1. Mouse Click to 3d
    By uniQQQ in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-28-2016, 06:23 AM
  2. Mouse click to 3d co ordinate
    By CoolBeanJ in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-26-2011, 09:03 PM
  3. Need help find 3D pos. from mouse click.
    By MrUNOwen in forum OpenGL: General
    Replies: 1
    Last Post: 04-09-2011, 09:15 PM
  4. rotate on mouse click and drag in the direction of the mouse cursor
    By vamsee kanth in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-02-2005, 09:54 PM
  5. Mouse click position?
    By ProfEich in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 03-11-2003, 07:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean