| 1 | //////////////////////////////////////////////////////////// |
|---|
| 2 | // Modes utilities |
|---|
| 3 | //////////////////////////////////////////////////////////// |
|---|
| 4 | void rebuildClientsExplorators() |
|---|
| 5 | { |
|---|
| 6 | print("Rebuild All Explorators\n") ; |
|---|
| 7 | try { |
|---|
| 8 | for(int i=0;i<nClients;i++) getClient(i).buildExplorator( explDepthMAX, explDepthMAX ) ; |
|---|
| 9 | } |
|---|
| 10 | catch(Exception e) { |
|---|
| 11 | print("Memory Problem while building Explorators\n") ; |
|---|
| 12 | } |
|---|
| 13 | } |
|---|
| 14 | //////////////////////////////////////////////////////////// |
|---|
| 15 | void randomizeClientAngles() { |
|---|
| 16 | for(int i=0;i<nClients;i++) getClient(i).angle = random(-PI,PI) ; |
|---|
| 17 | } |
|---|
| 18 | //////////////////////////////////////////////////////////// |
|---|
| 19 | void safelyAddNewClient( Client newClient ) { |
|---|
| 20 | myClients.addElement(newClient) ; |
|---|
| 21 | nClients++ ; |
|---|
| 22 | } |
|---|
| 23 | //////////////////////////////////////////////////////////// |
|---|
| 24 | void getOutAutoPilot() { |
|---|
| 25 | if(autoPilot) print("GET OUT AUTOPILOT MODE\n") ; |
|---|
| 26 | autoPilotLastCompt = compt ; |
|---|
| 27 | autoPilot = false ; |
|---|
| 28 | fadeValue = 0 ; |
|---|
| 29 | } |
|---|
| 30 | //////////////////////////////////////////////////////////// |
|---|
| 31 | void deactivateAllFlags() { |
|---|
| 32 | processPhysics = false ; |
|---|
| 33 | setRepulsionToAnother(false) ; |
|---|
| 34 | setSpringsToAnchor(false) ; |
|---|
| 35 | |
|---|
| 36 | hideAllBigPreviews() ; |
|---|
| 37 | |
|---|
| 38 | showLocations = false ; |
|---|
| 39 | showTentacules = false ; |
|---|
| 40 | showLinkHalfCircles = false ; |
|---|
| 41 | showLinkSimple = false ; |
|---|
| 42 | showLinkArcs = false ; |
|---|
| 43 | showLinkCurves = false ; |
|---|
| 44 | showClientBox = false ; |
|---|
| 45 | showLinkTriangles = false ; |
|---|
| 46 | showLinkDirect = false ; |
|---|
| 47 | showEllipses = false ; |
|---|
| 48 | showNormalCircle = false ; |
|---|
| 49 | showStatsBackg = false ; |
|---|
| 50 | showBigPreview = false ; |
|---|
| 51 | onlyRolloverText = false ; |
|---|
| 52 | } |
|---|
| 53 | //////////////////////////////////////////////////////////// |
|---|
| 54 | //////////////////////////////////////////////////////////// |
|---|
| 55 | void hideAllBigPreviews() { |
|---|
| 56 | for(int i=0;i<nClients;i++) { |
|---|
| 57 | getClient(i).showPreview = false ; |
|---|
| 58 | getClient(i).showSmallPreview = false ; |
|---|
| 59 | } |
|---|
| 60 | } |
|---|
| 61 | void setRepulsionToAnother( boolean flag ) { |
|---|
| 62 | repulsionToAnother = flag ; |
|---|
| 63 | for(int i=0;i<nClients;i++) { |
|---|
| 64 | getClient(i).setOtherRepulsions( flag ) ; |
|---|
| 65 | } |
|---|
| 66 | } |
|---|
| 67 | void setSpringsToAnchor( boolean flag ) { |
|---|
| 68 | springsToAnchor = flag ; |
|---|
| 69 | for(int i=0;i<nClients;i++) { |
|---|
| 70 | getClient(i).linkToAnchor(flag) ; |
|---|
| 71 | } |
|---|
| 72 | } |
|---|
| 73 | void setSpringsToClients( boolean flag ) { |
|---|
| 74 | springsToClients = flag ; |
|---|
| 75 | for(int i=0;i<nClients;i++) { |
|---|
| 76 | getClient(i).setClientSprings( flag ) ; |
|---|
| 77 | } |
|---|
| 78 | } |
|---|
| 79 | //////////////////////////////////////////////////////////// |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | |
|---|