Results 1 to 3 of 3

Thread: Please Help Me!

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    New York City
    Posts
    2

    Please Help Me!

    I am taking a scripting class and we are working on OpenGL right now and since I missed the first session due to being out of town on business...I'm kind of lost. I am trying to write a program where the user can click down in a window and drag the mouse in order to create a circle. When the user unclicks/lets go of their mouse, the circle is completed and then visible on the screen. When the user clicks in another location, a new circle is created while the first dissapears.

    So far i have only been able to create shapes in a window using OpenGL. I have been given some code involving the trigonometry to help me but as my name suggests, I am crap at coding. can anyone help me out?


  2. #2
    Member Contributor
    Join Date
    Jan 2005
    Location
    Karachi, Pakistan
    Posts
    85

    Re: Please Help Me!

    Hello there,
    The task that you currently have is a simple one. Assuming that you are using glut, you have to set up a mouse function. In it you will store the click coordinates and on drag the radius for the circle. on mousup you set the circle to the radius just before the mouse button is released. I think this discusison would not make much sense to you . If you like i can help you out with the implementation. Thanx

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2005
    Location
    New York City
    Posts
    2

    Re: Please Help Me!

    Hi and thanks for your reply! I understand what you are talking about as that was what my teacher told me to do in order to complete the assignment. I have some code he gave me but I'm just not sure what to do with it...

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