Click here to Skip to main content
15,891,473 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I saw the end of a rainbow the other day Pin
Mark_Wallace9-Mar-17 1:57
Mark_Wallace9-Mar-17 1:57 
GeneralRe: I saw the end of a rainbow the other day Pin
Marc Clifton9-Mar-17 2:03
mvaMarc Clifton9-Mar-17 2:03 
GeneralRe: I saw the end of a rainbow the other day Pin
Johnny J.9-Mar-17 3:05
professionalJohnny J.9-Mar-17 3:05 
GeneralNow you are going to get it Pin
CDP18028-Mar-17 23:19
CDP18028-Mar-17 23:19 
GeneralRe: Now you are going to get it Pin
den2k888-Mar-17 23:31
professionalden2k888-Mar-17 23:31 
GeneralRe: Now you are going to get it Pin
CDP18029-Mar-17 0:19
CDP18029-Mar-17 0:19 
GeneralRe: Now you are going to get it Pin
Richard Deeming9-Mar-17 1:26
mveRichard Deeming9-Mar-17 1:26 
GeneralRe: Now you are going to get it Pin
Marc Clifton9-Mar-17 2:12
mvaMarc Clifton9-Mar-17 2:12 
What if you reversed the problem. Instead of a tree of controls that know where they live, what about a tree of space that knows what controls are in it? Meaning:
  1. root - the entire surface
  2. 4 children, each representing 1/4 quadrant of the surface
  3. Each of those has 4 children, representing their 1/4 of the parent's 1/4 quadrant.
  4. etc, down to something reasonable.
Now, a hit test traverses the spatial tree very efficiently to identify controls within a quadrant and then you just iterate through the controls in the lowest containing spatial quadrant.

The "con" of that approach is that you need to manage controls in their quadrant as they are placed, moved, and removed, and handle a control spanning up to four quadrants. However, the overhead for that is much lower because you are probably working with just a single control at that point. To make the management easier, you can also have the control know what quadrant it currently belongs to.

Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

Artificial intelligence is the only remedy for natural stupidity. - CDP1802

GeneralRe: Now you are going to get it Pin
CDP18029-Mar-17 3:04
CDP18029-Mar-17 3:04 
GeneralRe: Now you are going to get it Pin
Marc Clifton9-Mar-17 3:57
mvaMarc Clifton9-Mar-17 3:57 
GeneralRe: Now you are going to get it Pin
CDP18029-Mar-17 4:42
CDP18029-Mar-17 4:42 
GeneralWSO CCC OTD 09-03-17 Pin
LabVIEWstuff8-Mar-17 22:49
LabVIEWstuff8-Mar-17 22:49 
GeneralRe: WSO CCC OTD 09-03-17 Pin
PeejayAdams8-Mar-17 23:10
PeejayAdams8-Mar-17 23:10 
GeneralRe: WSO CCC OTD 09-03-17 - WINNER!!! Pin
LabVIEWstuff8-Mar-17 23:13
LabVIEWstuff8-Mar-17 23:13 
GeneralRe: WSO CCC OTD 09-03-17 - WINNER!!! Pin
OriginalGriff8-Mar-17 23:23
mveOriginalGriff8-Mar-17 23:23 
GeneralRe: WSO CCC OTD 09-03-17 - WINNER!!! Pin
PeejayAdams8-Mar-17 23:50
PeejayAdams8-Mar-17 23:50 
GeneralRe: WSO CCC OTD 09-03-17 Pin
Duncan Edwards Jones9-Mar-17 0:37
professionalDuncan Edwards Jones9-Mar-17 0:37 
GeneralRe: WSO CCC OTD 09-03-17 Pin
PeejayAdams9-Mar-17 0:52
PeejayAdams9-Mar-17 0:52 
GeneralRe: WSO CCC OTD 09-03-17 Pin
Duncan Edwards Jones9-Mar-17 2:43
professionalDuncan Edwards Jones9-Mar-17 2:43 
GeneralRe: WSO CCC OTD 09-03-17 Pin
PeejayAdams9-Mar-17 4:07
PeejayAdams9-Mar-17 4:07 
QuestionDo Mac Users Never Use Mechanical Keyboards? Pin
Robert Vandenberg Huang8-Mar-17 21:32
professionalRobert Vandenberg Huang8-Mar-17 21:32 
AnswerRe: Do Mac Users Never Use Mechanical Keyboards? Pin
Richard MacCutchan8-Mar-17 21:38
mveRichard MacCutchan8-Mar-17 21:38 
GeneralRe: Do Mac Users Never Use Mechanical Keyboards? PinPopular
CDP18028-Mar-17 22:15
CDP18028-Mar-17 22:15 
GeneralRe: Do Mac Users Never Use Mechanical Keyboards? Pin
den2k888-Mar-17 22:28
professionalden2k888-Mar-17 22:28 
AnswerRe: Do Mac Users Never Use Mechanical Keyboards? Pin
KarstenK8-Mar-17 22:53
mveKarstenK8-Mar-17 22:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.