Results 1 to 2 of 2

Thread: How to do Snap to object?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Dec 2002

    How to do Snap to object?

    i am doing a CAD program and i would like to add a Snap to object function like autocad do. I try to use autocad even a big model(which consist of many 3D points) it can perform a "snap to" very fast. My algorithm is to search every 3D point in my list( which i use to store objects) and compare to the mouse positions, when the number of object is big, the mouse pointer looks delay when moving.
    i have another idea to perform a "snap to" which is select the object that at the top most means that the object which overlapped by other objects are ignored but the problem is i don't know which objects is at the top and which is at behind.
    one more question what is color picking. Can anyone tell me or give me the web page to get the tutorial thanks.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Cardiff University

    Re: How to do Snap to object?

    You could do some sort of recursive subdivision, so at the top level points are grouped into the two halves of the screen, lower down the tree the points are grouped to smaller parts. Even at the top level this can reduce your search

Similar Threads

  1. Replies: 0
    Last Post: 10-28-2014, 08:51 PM
  2. Scene Snap Back effect
    By Quarks in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-11-2012, 08:13 PM
  3. snap objects in OpenGL ?
    By rhizome in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 12-10-2002, 06:14 PM
  4. Snap to vertex
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-28-2002, 05:36 AM
  5. Snap-to grid???
    By mcsellski in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-07-2002, 11:13 PM

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