Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. What design to use?

What design to use?

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsdesigngame-devregex
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gourishsio
    wrote on last edited by
    #1

    Hello, I am developing an application which can be used for digitize a geographical map through GUI and mouse interaction. I am using C++ with wxWidgets and OpenGL Well, here are the list of objects that need to be created using mouse clicks. 1) Points 2) Polyline 3) Polygon 4) Rectangle/Square 5) Ellipse/Circle 6) Text Can any one guide me what will be the best design which can be used to store the data(objects) more efficiently? So that both accessing objects and rendering them will be easier and faster? I have started with Composite Design pattern to store the objects and Visitor Design pattern to render these objects. http://en.wikipedia.org/wiki/Composite_pattern http://en.wikipedia.org/wiki/Visitor_pattern But everytime rendering is done sequentially. Will not this take more time if the number of objects increases? Can anyone suggest me any other technique better and more efficient technique? Thanks in advance Regards

    M _ 2 Replies Last reply
    0
    • G gourishsio

      Hello, I am developing an application which can be used for digitize a geographical map through GUI and mouse interaction. I am using C++ with wxWidgets and OpenGL Well, here are the list of objects that need to be created using mouse clicks. 1) Points 2) Polyline 3) Polygon 4) Rectangle/Square 5) Ellipse/Circle 6) Text Can any one guide me what will be the best design which can be used to store the data(objects) more efficiently? So that both accessing objects and rendering them will be easier and faster? I have started with Composite Design pattern to store the objects and Visitor Design pattern to render these objects. http://en.wikipedia.org/wiki/Composite_pattern http://en.wikipedia.org/wiki/Visitor_pattern But everytime rendering is done sequentially. Will not this take more time if the number of objects increases? Can anyone suggest me any other technique better and more efficient technique? Thanks in advance Regards

      M Offline
      M Offline
      Madhan Mohan Reddy P
      wrote on last edited by
      #2

      I think it would be useful to adopt a behavior pattern

      G 1 Reply Last reply
      0
      • G gourishsio

        Hello, I am developing an application which can be used for digitize a geographical map through GUI and mouse interaction. I am using C++ with wxWidgets and OpenGL Well, here are the list of objects that need to be created using mouse clicks. 1) Points 2) Polyline 3) Polygon 4) Rectangle/Square 5) Ellipse/Circle 6) Text Can any one guide me what will be the best design which can be used to store the data(objects) more efficiently? So that both accessing objects and rendering them will be easier and faster? I have started with Composite Design pattern to store the objects and Visitor Design pattern to render these objects. http://en.wikipedia.org/wiki/Composite_pattern http://en.wikipedia.org/wiki/Visitor_pattern But everytime rendering is done sequentially. Will not this take more time if the number of objects increases? Can anyone suggest me any other technique better and more efficient technique? Thanks in advance Regards

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        Here[^] is a good sample ...

        G 2 Replies Last reply
        0
        • M Madhan Mohan Reddy P

          I think it would be useful to adopt a behavior pattern

          G Offline
          G Offline
          gourishsio
          wrote on last edited by
          #4

          You mean behavioral design patterns? If yes, then Visitor is a behavioral design pattern only. :)

          1 Reply Last reply
          0
          • _ _Flaviu

            Here[^] is a good sample ...

            G Offline
            G Offline
            gourishsio
            wrote on last edited by
            #5

            Thanks for that link. Definitely it will be of some use for me. :)

            1 Reply Last reply
            0
            • _ _Flaviu

              Here[^] is a good sample ...

              G Offline
              G Offline
              gourishsio
              wrote on last edited by
              #6

              That example uses GUI's own graphics context. And I am using OpenGL. So, it won't work with OpenGL. Thanks anyways :)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups