map algorithm question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lou Lipnickey

    #1

    map algorithm question

    I am working on an application which draws maps on a screen. This is
    done with using sets of x,y coordinates which are made into polygons and
    then drawn in a paintComponent. The user now wants to add elevation (a
    "z" component). The question at hand is how to quickly index into a data
    structure to find an elevation point based on the mouse location (x,y)
    of the screen. Currently, polygon.contain s(x,y) is used. I was hoping
    that someone might either relate how they might have done something
    similar or a pointer to reference. Thanks - Lou
  • Oliver Wong

    #2
    Re: map algorithm question


    "Lou Lipnickey" <lou.lipnickey@ pobox.com> wrote in message
    news:FcOOf.7503 $S25.3571@newsr ead1.news.atl.e arthlink.net...[color=blue]
    >I am working on an application which draws maps on a screen. This is done
    >with using sets of x,y coordinates which are made into polygons and then
    >drawn in a paintComponent. The user now wants to add elevation (a "z"
    >component). The question at hand is how to quickly index into a data
    >structure to find an elevation point based on the mouse location (x,y) of
    >the screen. Currently, polygon.contain s(x,y) is used. I was hoping that
    >someone might either relate how they might have done something similar or a
    >pointer to reference. Thanks - Lou[/color]

    The z component is associated with every polygon, or with every vertex
    or what?

    - Oliver

    Comment

    Working...