igarden-commit Mailing List for GardenSketch (Page 80)
Status: Beta
Brought to you by:
jlbedell
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(24) |
Nov
(77) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(103) |
Feb
(278) |
Mar
(130) |
Apr
(66) |
May
(56) |
Jun
(31) |
Jul
(94) |
Aug
(73) |
Sep
(22) |
Oct
(306) |
Nov
(52) |
Dec
|
| 2008 |
Jan
(27) |
Feb
(90) |
Mar
(218) |
Apr
(145) |
May
(114) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jeffrey B. <jlb...@us...> - 2006-11-04 23:05:22
|
Update of /cvsroot/igarden/Garden/Macintosh/Garden.xcodeproj In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6261 Modified Files: Tag: Release_branch_v1 project.pbxproj Log Message: Add stone wall and gazebo Index: project.pbxproj =================================================================== RCS file: /cvsroot/igarden/Garden/Macintosh/Garden.xcodeproj/project.pbxproj,v retrieving revision 1.58.2.1 retrieving revision 1.58.2.2 diff -C2 -d -r1.58.2.1 -r1.58.2.2 *** project.pbxproj 29 Oct 2006 03:32:26 -0000 1.58.2.1 --- project.pbxproj 4 Nov 2006 23:05:19 -0000 1.58.2.2 *************** *** 556,559 **** --- 556,561 ---- 49FD3A6F09658755001543D2 /* GardenDate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49B02637064A57C300C95424 /* GardenDate.cpp */; }; 49FD3AA109658787001543D2 /* RGDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C1C05806E3EC460021D1F5 /* RGDateTime.cpp */; }; + 49FEFED70AFC2B8300DC5501 /* Gazebo.svg in Resources */ = {isa = PBXBuildFile; fileRef = 49FEFED50AFC2B8300DC5501 /* Gazebo.svg */; }; + 49FEFED80AFC2B8300DC5501 /* StoneWall.svg in Resources */ = {isa = PBXBuildFile; fileRef = 49FEFED60AFC2B8300DC5501 /* StoneWall.svg */; }; 8D0C4E8B0486CD37000505A6 /* Garden_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 32DBCF6D0370B57F00C91783 /* Garden_Prefix.pch */; }; 8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; }; *************** *** 1179,1182 **** --- 1181,1186 ---- 49F59D9605FA9F3D00CDC512 /* Constants.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = Constants.cpp; path = ../source/Constants.cpp; sourceTree = SOURCE_ROOT; }; 49F59DAD05FAB0D000CDC512 /* ColumnSets.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = ColumnSets.h; path = Document/ColumnSets.h; sourceTree = "<group>"; }; + 49FEFED50AFC2B8300DC5501 /* Gazebo.svg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = Gazebo.svg; path = ../source/resources/2DSymbols/Gazebo.svg; sourceTree = SOURCE_ROOT; }; + 49FEFED60AFC2B8300DC5501 /* StoneWall.svg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; name = StoneWall.svg; path = ../source/resources/2DSymbols/StoneWall.svg; sourceTree = SOURCE_ROOT; }; 4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; }; 4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; }; *************** *** 1481,1484 **** --- 1485,1490 ---- isa = PBXGroup; children = ( + 49FEFED50AFC2B8300DC5501 /* Gazebo.svg */, + 49FEFED60AFC2B8300DC5501 /* StoneWall.svg */, 49057D810AF438E5009FEF70 /* Bluestone.svg */, 49057B630AF3F3E0009FEF70 /* Bench1.svg */, *************** *** 2447,2450 **** --- 2453,2458 ---- 49057B640AF3F3E0009FEF70 /* Bench1.svg in Resources */, 49057D820AF438E5009FEF70 /* Bluestone.svg in Resources */, + 49FEFED70AFC2B8300DC5501 /* Gazebo.svg in Resources */, + 49FEFED80AFC2B8300DC5501 /* StoneWall.svg in Resources */, ); runOnlyForDeploymentPostprocessing = 0; |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-04 23:05:01
|
Update of /cvsroot/igarden/Garden/source/resources/2DSymbols In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5930 Added Files: Tag: Release_branch_v1 Gazebo.svg StoneWall.svg Log Message: Add stone wall and gazebo --- NEW FILE: Gazebo.svg --- <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" rgminx="10ft" rgminy="10ft" rgmaxx="10ft" rgmaxy="10ft" startxsize="10ft" startysize="10ft `" [...1094 lines suppressed...] id="path4199" d="M 207.93307,311.26741 C 209.26597,327.26226 209.26597,327.26226 209.26597,327.26226" style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#5d5d5d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g id="g4201" transform="matrix(0.707107,0.707107,-0.707107,0.707107,258.9055,-146.8456)" style="stroke:#5d5d5d;stroke-opacity:1"> <path style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#5d5d5d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 183.94079,323.26354 C 217.2634,323.26354 217.2634,323.26354 217.2634,323.26354" id="path4203" /> <path style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#5d5d5d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 207.93307,311.26741 C 209.26597,327.26226 209.26597,327.26226 209.26597,327.26226" id="path4205" /> </g> --> </g> </svg> --- NEW FILE: StoneWall.svg --- <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" rgminx="6ft" rgminy="1ft" rgmaxx="0" rgmaxy="1ft" startxsize="6ft" startysize="1ft" sodipodi:version="0.32" inkscape:version="0.44.1" sodipodi:docbase="/Volumes/Bedell" sodipodi:docname="StoneWall.svg"> <defs id="defs4" /> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.8473111" inkscape:cx="375" inkscape:cy="945.99418" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:window-width="1026" inkscape:window-height="777" inkscape:window-x="20" inkscape:window-y="42" /> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="REPX" inkscape:groupmode="layer" id="layer1"> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.03454173px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 74.55822,54.033475 C 62.788684,48.643856 63.732922,68.765414 60.286559,71.354069 C 49.396882,79.533597 60.822628,84.078374 73.131054,88.674665 C 84.80653,93.034594 66.513867,114.35336 64.568058,117.98644 C 59.135863,128.12906 60.836334,136.74466 73.399001,135.88894 C 88.422049,134.86565 104.94624,135.30703 120.22753,135.30703 C 132.21915,135.30703 131.64487,127.56826 131.64487,117.98644 C 131.64487,108.86604 137.35352,105.1117 137.35352,95.336432 C 137.35352,90.651339 127.02923,82.097515 125.9362,78.015837 C 123.46336,68.781626 120.04578,63.898865 111.66454,58.030534 C 107.00265,54.766406 93.858782,55.714703 87.402715,52.70112 C 84.99634,51.577867 75.420671,53.872443 74.55822,54.033475 z " id="path1876" sodipodi:nodetypes="cssssssssssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.11652792px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 147.98463,81.723979 C 141.6042,77.730539 139.64136,98.523646 138.67349,103.36986 C 137.06571,111.42017 134.03022,118.41707 136.01316,128.34587 C 136.68842,131.72697 151.38919,133.80688 153.3053,135.00614 C 162.48505,140.75165 166.90265,125.75573 174.58792,123.35067 C 193.7635,117.34978 191.88006,111.90423 191.88006,90.049318 C 191.88006,77.225943 184.26994,68.131092 181.23874,56.747964 C 178.21659,45.398819 159.73726,57.021929 155.96563,61.743168 C 151.99038,66.719281 148.99264,75.415014 147.98463,81.723979 z " id="path1878" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.11341703px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 128.0073,54.815456 C 123.88673,59.97225 128.07125,73.23803 130.66054,79.718905 C 134.54085,89.431145 143.73234,77.276167 145.25332,74.738215 C 150.38754,66.171071 153.17312,62.249044 145.25332,54.815456 C 138.84257,48.798274 134.25157,50.908176 128.0073,54.815456 z " id="path1880" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.23876262px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 186.77535,55.244386 C 180.22731,48.760357 193.41205,75.116261 195.39722,85.600316 C 197.07156,94.442854 198.75497,100.12053 196.8342,110.2645 C 193.87234,125.90667 214.01566,123.21512 218.38889,119.75073 C 232.8384,108.30413 234.20147,100.77637 251.43943,95.086545 C 266.51393,90.110824 242.91825,70.5553 238.5066,64.730614 C 231.05612,54.893716 218.95099,56.378541 209.76701,53.347141 C 207.39754,52.565038 204.97709,52.08231 202.58212,51.449895 C 197.00733,49.977815 191.57489,52.07596 186.77535,55.244386 z " id="path1882" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.23162794px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 230.80976,122.17714 C 222.3297,119.7325 238.60263,130.89458 247.08269,133.33921 C 248.92546,133.87046 250.72901,134.65317 252.55216,135.31015 C 261.02762,138.36427 274.05791,135.31015 282.6343,135.31015 C 300.46442,135.31015 308.45914,140.32828 304.51221,117.57178 C 302.52414,106.10935 288.59928,103.95384 282.6343,101.80434 C 272.83486,98.273101 259.48079,98.322139 249.81743,101.80434 C 246.29456,103.07381 233.18874,110.51737 229.81769,112.94689 C 227.40321,114.687 229.05035,120.24595 230.67425,121.51365" id="path1884" sodipodi:nodetypes="csssssssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.22600341px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 249.48904,58.896306 C 240.10261,65.232618 261.70836,78.288582 263.553,79.782844 C 270.72578,85.593231 279.16975,86.952668 286.05533,89.276725 C 297.31012,93.075501 297.38045,95.072913 304.33848,104.46694 C 310.40871,112.66236 323.01427,119.43545 325.43441,106.36572 C 327.17152,96.984596 319.5287,88.898531 314.18324,81.68162 C 309.14272,74.876403 301.57915,74.158695 295.9001,66.491411 C 287.65267,55.356551 279.36615,55.214454 267.77219,51.301201 C 256.9591,47.651513 258.71121,51.425788 249.48904,58.896306 z " id="path1886" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.21002293px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 330.65512,58.851163 C 323.74676,56.31131 327.99516,90.297248 327.99516,96.012625 C 327.99516,105.05538 324.68777,113.71879 326.66518,125.35063 C 328.02569,133.35373 350.59724,135.12996 355.92479,135.12996 C 375.89131,135.12996 402.10857,137.69206 419.76396,127.30648 C 426.52257,123.33082 412.93227,93.789445 411.78406,92.100891 C 406.17886,83.857901 405.44412,76.909814 399.81421,68.630495 C 388.25303,51.628646 366.89256,56.649691 351.93484,52.983563 C 341.62672,50.457049 338.8888,56.429481 330.65512,58.851163 z " id="path1888" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.28758502px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 441.16995,53.532374 C 435.23547,51.884494 432.00477,47.697196 432.00477,66.182639 C 432.00477,84.35107 434.22813,91.349697 435.99364,106.05702 C 438.35051,125.69059 424.06324,137.06038 447.96024,130.42471 C 459.82902,127.129 473.62741,120.09499 487.8489,117.13324 C 498.24252,114.96869 507.80379,124.22553 519.75984,128.20946 C 544.51308,136.4576 556.74634,131.36194 542.36341,99.411296 C 532.95136,78.503092 528.28952,81.689344 513.11173,81.689344 C 502.3741,81.689344 511.78205,89.073372 502.47475,68.397883 C 499.34892,61.45408 483.34722,59.366029 477.21193,57.321665 C 469.70577,54.820511 465.1115,55.604488 458.59722,52.891177 C 457.73727,52.532993 440.82953,52.891177 439.94313,52.891177" id="path1890" sodipodi:nodetypes="cssssssssssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.8674376px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 426.00082,56.265097 C 402.02201,53.000058 404.26405,71.448368 410.56476,85.175265 C 413.06037,90.612246 427.42856,107.59099 427.42856,90.686222 C 427.42856,79.280023 427.42856,71.19622 427.42856,55.783505" id="path1892" sodipodi:nodetypes="cssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.18717301px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 315.06236,50.011245 C 308.7711,46.71445 301.12053,48.96865 301.12053,64.001396 C 301.12053,72.246531 312.61757,74.159425 318.16055,75.316187 C 324.66237,76.673052 322.80783,61.768952 322.80783,55.919402 C 322.80783,52.034063 314.41637,53.223139 313.51328,49.453807" id="path1894" sodipodi:nodetypes="csssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.06298161px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 509.19698,50.049329 C 496.32264,48.934029 497.81197,52.586968 503.16235,62.025041 C 506.40881,67.751781 517.16849,73.162863 521.26623,75.33139 C 539.78409,85.131035 552.94803,95.250712 552.94803,75.33139 C 552.94803,68.077362 554.45669,62.274394 554.45669,55.371868 C 554.45669,52.865695 526.69902,54.041233 521.26623,54.041233 C 518.24125,54.041233 515.83309,50.049329 509.19698,50.049329 z " id="path2785" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.1263051px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 193.09502,119.17699 C 191.96578,119.40931 186.59574,121.07953 184.49334,121.59712 C 180.6789,122.53618 177.56535,123.57917 175.27727,125.83234 C 172.85811,128.21458 172.20525,130.27476 172.20525,134.30276 C 172.20525,137.06959 181.01382,136.72289 182.65012,136.72289 C 191.802,136.72289 200.73704,136.83165 209.68393,137.93295 C 214.78503,138.56086 227.69542,138.94244 229.40446,135.57652 C 231.19493,132.05023 224.63168,127.2688 223.01139,125.67323 C 219.29138,122.00998 205.98104,128.97604 202.92548,126.43736 C 201.30163,125.08821 194.68967,120.43326 193.09502,119.17699 z " id="path2787" sodipodi:nodetypes="cssssssssc" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.26129556px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 312.87617,118.70126 C 306.63525,117.75112 307.62655,122.71081 307.62655,126.1607 C 307.62655,129.87213 308.86733,131.38955 313.75109,133.62013 C 320.61002,136.75283 321.62551,133.75556 321.62551,130.42323 C 321.62551,127.62541 322.50045,125.63733 322.50045,122.43098 C 322.50045,120.85509 315.32769,118.99985 312.87617,118.70126 z " id="path2789" /> <path style="fill:#c9c9c9;fill-opacity:1;fill-rule:evenodd;stroke:black;stroke-width:1.12490427px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="M 55.038494,93.178243 C 52.514371,97.20719 52.288417,104.93704 52.288417,110.97662 C 52.288417,115.93748 54.258952,116.51444 51.600898,120.68482 C 48.920335,124.89051 57.249563,122.78394 58.476088,122.30285 C 64.721808,119.85303 64.711484,110.86429 66.726316,106.12251 C 68.453226,102.05834 70.85143,96.013177 70.85143,91.560209 C 70.85143,86.342761 56.344266,91.47099 55.038494,93.178243 z " id="path2801" /> </g> </svg> |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-04 23:04:17
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv5862 Modified Files: Tag: Release_branch_v1 RGGLSVGDraw.cpp Log Message: Improve transforms (still issues with reflecting and rotating groups) Index: RGGLSVGDraw.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLSVGDraw.cpp,v retrieving revision 1.26.2.2 retrieving revision 1.26.2.3 diff -C2 -d -r1.26.2.2 -r1.26.2.3 *** RGGLSVGDraw.cpp 2 Nov 2006 23:43:15 -0000 1.26.2.2 --- RGGLSVGDraw.cpp 4 Nov 2006 23:04:12 -0000 1.26.2.3 *************** *** 47,50 **** --- 47,59 ---- } titleTag_t; + typedef struct + { + double translateX; + double translateY; + double scaleX; + double scaleY; + double angle; + } transform_t; + class SVGCacheEntry { *************** *** 64,72 **** void GetRepeatCounts(double width, double length, long &widthCount, long &lengthCount); const char *GetArcParameters(const char *val, glPoint_t start, bool doTranslate, glSize_t mySize, glPoint_t &end, glPoint_t ¢er, double &rx, double &ry, bool &sweep, bool &large, bool &isClosed); ! void EnumeratePathVertices(const char *val, double xOffset, double yOffset, double zOffset, double xSize, double ySize, double scaleX, double scaleY, double translateX, double translateY); bool IsStrokeStyleVisible(XGXMLData *data); void SetStrokeStyle(XGXMLData *data, double xScale, double yScale); bool IsFillStyleVisible(XGXMLData *data); void SetFillStyle(XGXMLData *data); XGFileSpecifier _spec; --- 73,85 ---- void GetRepeatCounts(double width, double length, long &widthCount, long &lengthCount); const char *GetArcParameters(const char *val, glPoint_t start, bool doTranslate, glSize_t mySize, glPoint_t &end, glPoint_t ¢er, double &rx, double &ry, bool &sweep, bool &large, bool &isClosed); ! void EnumeratePathVertices(const char *val, double xOffset, double yOffset, double zOffset, double xSize, double ySize, double scaleX, double scaleY); bool IsStrokeStyleVisible(XGXMLData *data); void SetStrokeStyle(XGXMLData *data, double xScale, double yScale); bool IsFillStyleVisible(XGXMLData *data); void SetFillStyle(XGXMLData *data); + void StartTransform(XGXMLData *data, double scaleX, double scaleY); + void StopTransform(); + void FindTransform(XGXMLData *data, transform_t &transform); + void TransformPoint(transform_t &transform, double x, double y, double &resultX, double &resultY); XGFileSpecifier _spec; *************** *** 495,498 **** --- 508,512 ---- } + StartTransform(data, scaleX, scaleY); while(sub2 != NULL) { *************** *** 516,519 **** --- 530,534 ---- sub2 = sub2->GetSibling(); } + StopTransform(); } else if(strcmp(data->GetTag(), "polyline") == 0) *************** *** 619,649 **** else if(strcmp(data->GetTag(), "path") == 0) { ! double translateX = 0.0, translateY = 0.0; ! const char *transform, *dval; ! transform = data->GetArgValue("transform"); ! if(transform != NULL) ! { ! if(strncmp(transform, "translate(",10) == 0) ! { ! (void)ParseOnePoint(transform+10, false, 0.0, 0.0, 0.0, 0.0, translateX, translateY); ! } ! else if(strncmp(transform, "matrix(",7) == 0) ! { ! float a, b, c, d, e, f; ! long numValid; ! ! numValid = sscanf(transform, "matrix(%f,%f,%f,%f,%f,%f", &a, &b, &c, &d, &e, &f); ! if(b == 0.0 && c == 0.0) ! { ! // scaleX *= a; ! // scaleY *= d; ! translateX = (-1*e)*a; ! translateY = (-1*f)*d; ! } ! else ! printf("Transform not implemented\n"); ! } ! } dval = data->GetArgValue("d"); --- 634,640 ---- else if(strcmp(data->GetTag(), "path") == 0) { ! const char *dval; ! StartTransform(data, scaleX, scaleY); dval = data->GetArgValue("d"); *************** *** 664,668 **** SetFillStyle(data); glBegin(GL_POLYGON); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); } --- 655,659 ---- SetFillStyle(data); glBegin(GL_POLYGON); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY); glEnd(); } *************** *** 677,681 **** glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); glBegin(GL_LINE_STRIP); ! EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); glPopAttrib(); --- 668,672 ---- glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); glBegin(GL_LINE_STRIP); ! EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY); glEnd(); glPopAttrib(); *************** *** 684,691 **** glPopAttrib(); } } ! void SVGCacheEntry::EnumeratePathVertices(const char *val, double xOffset, double yOffset, double zOffset, double xSize, double ySize, double scaleX, double scaleY, double translateX, double translateY) { double xPos, yPos, xPosSVG, yPosSVG, startXPos, startYPos, span; --- 675,733 ---- glPopAttrib(); + StopTransform(); } } ! void SVGCacheEntry::StartTransform(XGXMLData *data, double scaleX, double scaleY) ! { ! const char *transform; ! ! glPushMatrix(); ! transform = data->GetArgValue("transform"); ! if(transform != NULL) ! { ! if(strncmp(transform, "translate(",10) == 0) ! { ! float x, y; ! long numValid; ! // (void)ParseOnePoint(transform+10, false, 0.0, 0.0, 0.0, 0.0, translateX, translateY); ! numValid = sscanf(transform, "translate(%f,%f", &x, &y); ! glTranslatef(x*scaleX,-y*scaleY,0); ! } ! else if(strncmp(transform, "matrix(",7) == 0) ! { ! float a, b, c, d, e, f; ! long numValid; ! GLfloat matrix[16]; ! ! // | a c e | | a c e 0 | ! // | b d f | | b d f 0 | ! // | 0 0 1 | | 0 0 1 0 | ! // | 0 0 0 1 | ! ! numValid = sscanf(transform, "matrix(%f,%f,%f,%f,%f,%f", &a, &b, &c, &d, &e, &f); ! if(b == 0 && c == 0) ! { ! glTranslatef(e*scaleX/a,-f*scaleY/d,0); ! glScalef(a, d, 1.0); ! } ! else ! { ! double angle = acos(a)*360/(2*3.14); ! if(b > 0) ! angle -= 180; ! glRotatef(angle, 0, 0, 1); ! glTranslatef(e*scaleX/a,-f*scaleY/d,0); ! } ! } ! } ! } ! ! void SVGCacheEntry::StopTransform() ! { ! glPopMatrix(); ! } ! ! void SVGCacheEntry::EnumeratePathVertices(const char *val, double xOffset, double yOffset, double zOffset, double xSize, double ySize, double scaleX, double scaleY) { double xPos, yPos, xPosSVG, yPosSVG, startXPos, startYPos, span; *************** *** 725,838 **** glEvalCoord1f(((GLfloat)i)/30.0); } - glEnd(); } ! else { ! if(*val == 'M') ! { val++; ! while(*val == ' ' || *val == '\t') ! val++; ! ParseOnePoint(val, false, xSize, ySize, _bounds.top, _bounds.left, xPosSVG, yPosSVG); ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! } ! else if(*val == 'L') ! { val++; ! while(*val == ' ' || *val == '\t') ! val++; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! else { ! if(*val == 'A') { ! glPoint_t start, end, center; ! double rx, ry; ! double startA, endA, delta; ! long count; ! bool sweep, large, isClosed; ! glSize_t mySize; ! ! start.x = xPosSVG; ! start.y = yPosSVG; ! mySize.x = xSize; ! mySize.y = ySize; ! val = GetArcParameters(val, start, false, mySize, end, center, rx, ry, sweep, large, isClosed); ! ! start.x += translateX; ! start.y += translateY; ! end.x += translateX; ! end.y += translateY; ! center.x += translateX; ! center.y += translateY; ! if(start.x != end.x || start.y != end.y) { ! delta = (3.0/360.0)*2*3.14; ! startA = atan2(start.y-center.y,start.x-center.x); //*(360/(2*3.14)); ! endA = atan2(end.y-center.y,end.x-center.x); //*(360/(2*3.14)); ! span = endA-startA; ! if(span < 0) ! span *= -1.0; ! if((span < 3.14) && large) ! span = (2*3.14) - span; ! count = span/delta; ! ! double t, x, y; ! long n; ! ! x = start.x; //- center.x; ! y = start.y; //- center.y; ! if(!sweep) ! delta *= -1.0; ! ! // printf("Count = %ld center = %f,%f, startAnd %f endAng %f\n", count, center.x, center.y, startA, startA+(count*delta)); ! if(startA != NAN && endA != NAN) ! { ! if(!startPosSet) ! { ! startXPos = (cos(startA) * rx*cos(startA) - sin(startA)*ry*sin(startA)); //+ (center.x - (xSize/2)); ! startYPos = (sin(startA) * rx*cos(startA) + cos(startA)*ry*sin(startA)); //+ (center.y - (ySize/2)); ! startPosSet = true; ! } ! ! for(t = startA, n = 0; n < count; n++, t += delta) ! { ! x = (cos(t) * rx*cos(t) - sin(t)*ry*sin(t)); //+ (center.x - (xSize/2)); ! y = (sin(t) * rx*cos(t) + cos(t)*ry*sin(t)); //+ (center.y - (ySize/2)); ! glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! } ! ! x = (cos(endA) * rx*cos(endA) - sin(endA)*ry*sin(endA)); //+ (center.x - (xSize/2)); ! y = (sin(endA) * rx*cos(endA) + cos(endA)*ry*sin(endA)); //+ (center.y - (ySize/2)); ! glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! } ! if(isClosed && startPosSet) ! { ! // glBegin(GL_LINES); ! // glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! // glVertex3f((startXPos * scaleX) + xOffset, (startYPos * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! // glEnd(); ! } ! xPosSVG = end.x; ! yPosSVG = end.y; } } ! else { ! if(*val == 'z') ! val++; ! while(*val == ' ' || *val == '\t') ! val++; ! if(*val != '\0') ! { ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } } } } --- 767,870 ---- glEvalCoord1f(((GLfloat)i)/30.0); } } ! else if(*val == 'M') { ! val++; ! while(*val == ' ' || *val == '\t') val++; ! ParseOnePoint(val, false, xSize, ySize, _bounds.top, _bounds.left, xPosSVG, yPosSVG); ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! else if(*val == 'L') ! { ! val++; ! while(*val == ' ' || *val == '\t') val++; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! else if(*val == 'A') ! { ! glPoint_t start, end, center; ! double rx, ry; ! double startA, endA, delta; ! long count; ! bool sweep, large, isClosed; ! glSize_t mySize; ! ! start.x = xPosSVG; ! start.y = yPosSVG; ! mySize.x = xSize; ! mySize.y = ySize; ! val = GetArcParameters(val, start, false, mySize, end, center, rx, ry, sweep, large, isClosed); ! ! if(start.x != end.x || start.y != end.y) { ! delta = (3.0/360.0)*2*3.14; ! startA = atan2(start.y-center.y,start.x-center.x); //*(360/(2*3.14)); ! endA = atan2(end.y-center.y,end.x-center.x); //*(360/(2*3.14)); ! span = endA-startA; ! if(span < 0) ! span *= -1.0; ! if((span < 3.14) && large) ! span = (2*3.14) - span; ! count = span/delta; ! ! double t, x, y; ! long n; ! ! x = start.x; //- center.x; ! y = start.y; //- center.y; ! if(!sweep) ! delta *= -1.0; ! ! // printf("Count = %ld center = %f,%f, startAnd %f endAng %f\n", count, center.x, center.y, startA, startA+(count*delta)); ! if(startA != NAN && endA != NAN) { ! if(!startPosSet) ! { ! startXPos = (cos(startA) * rx*cos(startA) - sin(startA)*ry*sin(startA)); //+ (center.x - (xSize/2)); ! startYPos = (sin(startA) * rx*cos(startA) + cos(startA)*ry*sin(startA)); //+ (center.y - (ySize/2)); ! startPosSet = true; ! } ! for(t = startA, n = 0; n < count; n++, t += delta) { ! x = (cos(t) * rx*cos(t) - sin(t)*ry*sin(t)); //+ (center.x - (xSize/2)); ! y = (sin(t) * rx*cos(t) + cos(t)*ry*sin(t)); //+ (center.y - (ySize/2)); ! glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate } + + x = (cos(endA) * rx*cos(endA) - sin(endA)*ry*sin(endA)); //+ (center.x - (xSize/2)); + y = (sin(endA) * rx*cos(endA) + cos(endA)*ry*sin(endA)); //+ (center.y - (ySize/2)); + glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate } ! if(isClosed && startPosSet) { ! // glBegin(GL_LINES); ! // glVertex3f((x * scaleX) + xOffset, (y * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! // glVertex3f((startXPos * scaleX) + xOffset, (startYPos * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate ! // glEnd(); } + xPosSVG = end.x; + yPosSVG = end.y; + } + } + else + { + if(*val == 'z') + { + glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate + val++; + } + while(*val == ' ' || *val == '\t') + val++; + if(*val != '\0') + { + glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate + val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); + glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate } } *************** *** 927,931 **** XGXMLData *subData; const char *val, *transform; ! double xPos, yPos, localXSize, localYSize; glRectangle_t localBounds; bool forX, forY; --- 959,963 ---- XGXMLData *subData; const char *val, *transform; ! double xPos, yPos, localXSize, localYSize, translateX, translateY; glRectangle_t localBounds; bool forX, forY; *************** *** 942,945 **** --- 974,978 ---- localBounds.bottom = -1*1.0e100; + while(sub2 != NULL) { *************** *** 950,953 **** --- 983,987 ---- } + if(localBounds.left != 1.0e100 && localBounds.right != -1*1.0e100) localXSize = localBounds.right - localBounds.left; *************** *** 958,961 **** --- 992,1002 ---- else localYSize = 0; + + // FindTransformOffsets(data, translateX, translateY); + // localBounds.left += translateX; + //// localBounds.right += translateX; + // localBounds.top -= translateY; + // localBounds.bottom -= translateY; + val = data->GetArgValue("inkscape:label"); tag = GetTitleTag(val, forX, forY, &nextCh); *************** *** 1115,1144 **** else if(strcmp(data->GetTag(), "path") == 0) { ! double translateX = 0.0, translateY = 0.0; ! double scaleX = 1.0, scaleY = 1.0; val = data->GetArgValue("d"); ! transform = data->GetArgValue("transform"); ! if(transform != NULL) ! { ! if(strncmp(transform, "translate(",10) == 0) ! { ! (void)ParseOnePoint(transform+10, false, 0.0, 0.0, 0.0, 0.0, translateX, translateY); ! } ! else if(strncmp(transform, "matrix(",10) == 0) ! { ! double a, b, c, d, e, f; ! ! (void)ParseOnePoint(transform+10, false, 0.0, 0.0, 0.0, 0.0, translateX, translateY); ! sscanf(transform, "matrix(%lf,%lf,%lf,%lf,%lf,%lf", &a, &b, &c, &d, &e, &f); ! if(b == 0.0 && c == 0.0 && e == 0.0 && f == 0.0) ! { ! scaleX = a; ! scaleY = d; ! } ! else ! printf("Transform not implemented\n"); ! } ! } while(*val != '\0') { --- 1156,1164 ---- else if(strcmp(data->GetTag(), "path") == 0) { ! transform_t transform; val = data->GetArgValue("d"); ! ! FindTransform(data, transform); while(*val != '\0') { *************** *** 1195,1200 **** for(t = startA, n = 0; n < count; n++, t += delta) { ! x = cos(t) * rx*cos(t) - sin(t)*ry*sin(t) + center.x + translateX; ! y = sin(t) * rx*cos(t) + cos(t)*ry*sin(t) + center.y + translateY; if(x < bounds.left) bounds.left = x; --- 1215,1221 ---- for(t = startA, n = 0; n < count; n++, t += delta) { ! x = cos(t) * rx*cos(t) - sin(t)*ry*sin(t) + center.x; ! y = sin(t) * rx*cos(t) + cos(t)*ry*sin(t) + center.y; ! TransformPoint(transform, x, y, x, y); if(x < bounds.left) bounds.left = x; *************** *** 1222,1234 **** if(*val != '\0') { val = ParseOnePoint(val, false, 0.0, 0.0, 0.0, 0.0, xPos, yPos); ! if(xPos+translateX < bounds.left) ! bounds.left = xPos+translateX; ! if(xPos+translateX > bounds.right) ! bounds.right = xPos+translateX; ! if(yPos+translateY < bounds.top) ! bounds.top = yPos+translateY; ! if(yPos+translateY > bounds.bottom) ! bounds.bottom = yPos+translateY; } } --- 1243,1258 ---- if(*val != '\0') { + double tx, ty; + val = ParseOnePoint(val, false, 0.0, 0.0, 0.0, 0.0, xPos, yPos); ! TransformPoint(transform, xPos, yPos, tx, ty); ! if(tx < bounds.left) ! bounds.left = tx; ! if(tx > bounds.right) ! bounds.right = tx; ! if(ty < bounds.top) ! bounds.top = ty; ! if(ty > bounds.bottom) ! bounds.bottom = ty; } } *************** *** 1236,1239 **** --- 1260,1308 ---- } + void SVGCacheEntry::FindTransform(XGXMLData *data, transform_t &transform) + { + const char *transformStr; + + transform.translateX = 0.0; + transform.translateY = 0.0; + transform.scaleX = 1.0; + transform.scaleY = 1.0; + transform.angle = 0.0; + transformStr = data->GetArgValue("transform"); + if(transformStr != NULL) + { + if(strncmp(transformStr, "translate(",10) == 0) + { + float x, y; + long numValid; + //(void)ParseOnePoint(transform+10, false, 0.0, 0.0, 0.0, 0.0, translateX, translateY); + numValid = sscanf(transformStr, "translate(%f,%f", &x, &y); + transform.translateX = x; + transform.translateY = y; + } + else if(strncmp(transformStr, "matrix(",7) == 0) + { + float a, b, c, d, e, f; + uint32 numValid; + + // | a c e | | a c e 0 | + // | b d f | | b d f 0 | + // | 0 0 1 | | 0 0 1 0 | + // | 0 0 0 1 | + + numValid = sscanf(transformStr, "matrix(%f,%f,%f,%f,%f,%f", &a, &b, &c, &d, &e, &f); + transform.translateX = e; + transform.translateY = f; + } + } + } + + void SVGCacheEntry::TransformPoint(transform_t &transform, double x, double y, double &resultX, double &resultY) + { + resultX = x + transform.translateX; + resultY = y + transform.translateY; + } + + // --------------------------------------------------------------------------- /// ParseOnePoint PRIVATE *************** *** 1694,1703 **** { char *temp; widthStr += strlen("stroke-width:"); ! glLineWidth((strtod(widthStr, &temp)* xScale)+0.5); } else ! glLineWidth(1.5 * xScale); fill = strstr(val, "stroke:"); --- 1763,1774 ---- { char *temp; + double width; widthStr += strlen("stroke-width:"); ! width = strtod(widthStr, &temp); ! glLineWidth(width+0.5); } else ! glLineWidth(1.5); fill = strstr(val, "stroke:"); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-04 01:54:37
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv7332 Modified Files: Tag: Release_branch_v1 ActiveMaterial.h ActiveMaterial.cpp Log Message: Add category select menu Index: ActiveMaterial.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.cpp,v retrieving revision 1.45.2.1 retrieving revision 1.45.2.2 diff -C2 -d -r1.45.2.1 -r1.45.2.2 *** ActiveMaterial.cpp 2 Nov 2006 23:47:24 -0000 1.45.2.1 --- ActiveMaterial.cpp 4 Nov 2006 01:54:33 -0000 1.45.2.2 *************** *** 60,75 **** const long kMaterialErrText = 102; const long kPaletteSelectMenu = 106; const long kActiveMenuFont = 139; ! const long kSeparatorItem = 3; ! const long kAccentMenuItem = 4; ! const long kDeckMenuItem = 5; ! const long kNaturalMenuItem = 6; ! const long kOtherMenuItem = 7; ! const long kStairMenuItem = 8; ! const long kStructureMenuItem = 9; ! const long kWalkMenuItem = 10; ! const long kWallMenuItem = 11; ! const long kWaterMenuItem = 12; BEGINDISPATCH(ActiveMaterial,XGView) --- 60,75 ---- const long kMaterialErrText = 102; const long kPaletteSelectMenu = 106; + const long kCategorySelectMenu = 107; const long kActiveMenuFont = 139; ! const long kAccentMenuItem = 0; ! const long kDeckMenuItem = 1; ! const long kNaturalMenuItem = 2; ! const long kOtherMenuItem = 3; ! const long kStairMenuItem = 4; ! const long kStructureMenuItem = 5; ! const long kWalkMenuItem = 6; ! const long kWallMenuItem = 7; ! const long kWaterMenuItem = 8; BEGINDISPATCH(ActiveMaterial,XGView) *************** *** 195,198 **** --- 195,199 ---- UInt32 ActiveMaterial::GetNumMaterials() { + uint32 result; switch(_paletteType) { *************** *** 208,212 **** case kHardscapeItems: MyAssert(_hardscapeIndex < (sizeof(_hardscape)/sizeof(hardscapeElem_t))); ! return _hardscape[_hardscapeIndex].elem.Length() + 1; default: return 0; --- 209,214 ---- case kHardscapeItems: MyAssert(_hardscapeIndex < (sizeof(_hardscape)/sizeof(hardscapeElem_t))); ! result = _hardscape[_hardscapeIndex].elem.Length() + 1; ! return result; default: return 0; *************** *** 285,289 **** { ! XGSViewInitRecord popupInfo, imageInfo; struct XGSTextInitRecord staticInfo, nameInfo; Point myPaneSize; --- 287,291 ---- { ! XGSViewInitRecord popupInfo, imageInfo, catPopInfo; struct XGSTextInitRecord staticInfo, nameInfo; Point myPaneSize; *************** *** 299,302 **** --- 301,305 ---- myPaneSize = GetSize(); + #if 1 popupInfo.fViewID = kPaletteSelectMenu; popupInfo.fVisible = true; *************** *** 311,328 **** popupInfo.fAutoBottom = -BORDER_WIDTH; _palettePopup = new XGPopControl(this, popupInfo, kActiveMenuFont); _palettePopup->Insert(0,"All in document"); _palettePopup->Insert(1,"All in this plot"); _palettePopup->Insert(2,"Backgrounds"); ! _palettePopup->Insert(3,"-"); ! _palettePopup->Insert(kAccentMenuItem,"Accents"); ! _palettePopup->Insert(kDeckMenuItem,"Decks and Patios"); ! _palettePopup->Insert(kNaturalMenuItem,"Natural Items"); ! _palettePopup->Insert(kOtherMenuItem,"Other Hardscape"); ! _palettePopup->Insert(kStairMenuItem,"Stairs"); ! _palettePopup->Insert(kStructureMenuItem,"Structures"); ! _palettePopup->Insert(kWalkMenuItem,"Walks"); ! _palettePopup->Insert(kWallMenuItem,"Walls and Fences"); ! _palettePopup->Insert(kWaterMenuItem,"Water Features"); popupInfo.fViewID = kMaterialSelectMenu; popupInfo.fVisible = true; --- 314,328 ---- popupInfo.fAutoBottom = -BORDER_WIDTH; _palettePopup = new XGPopControl(this, popupInfo, kActiveMenuFont); + #else + _palettePopup = dynamic_cast<XGPopControl*>(parent->FindViewByID(kPaletteSelectMenu)); + AssertValidView(_palettePopup); + #endif _palettePopup->Insert(0,"All in document"); _palettePopup->Insert(1,"All in this plot"); _palettePopup->Insert(2,"Backgrounds"); ! _palettePopup->Insert(3,"Non-Plant Materials"); ! // _palettePopup->Insert(4,"-"); + #if 1 popupInfo.fViewID = kMaterialSelectMenu; popupInfo.fVisible = true; *************** *** 333,344 **** popupInfo.fLockBottom = true; popupInfo.fAutoLeft = BORDER_WIDTH; //myPaneSize.h - (BORDER_WIDTH+20); ! popupInfo.fAutoTop = myPaneSize.v - ((2*POPUP_HEIGHT) + BORDER_WIDTH); popupInfo.fAutoRight = -BORDER_WIDTH; ! popupInfo.fAutoBottom = -(BORDER_WIDTH+POPUP_HEIGHT); _popup = new XGPopControl(this, popupInfo, kActiveMenuFont); ! _popup->Insert(0,"-"); // _popup->Insert(1,"Edit Current PaletteÉ"); // _popup->Insert(2,"Create New PaletteÉ"); nameInfo.v.fViewID = kMaterialNameText; nameInfo.v.fVisible = true; --- 333,380 ---- popupInfo.fLockBottom = true; popupInfo.fAutoLeft = BORDER_WIDTH; //myPaneSize.h - (BORDER_WIDTH+20); ! popupInfo.fAutoTop = myPaneSize.v - ((3*POPUP_HEIGHT) + BORDER_WIDTH); popupInfo.fAutoRight = -BORDER_WIDTH; ! popupInfo.fAutoBottom = -(BORDER_WIDTH+(2*POPUP_HEIGHT)); _popup = new XGPopControl(this, popupInfo, kActiveMenuFont); ! #else ! _popup = dynamic_cast<XGPopControl*>(this->FindViewByID(kMaterialSelectMenu)); ! AssertValidView(_popup); ! #endif ! // _popup->Insert(0,"-"); // _popup->Insert(1,"Edit Current PaletteÉ"); // _popup->Insert(2,"Create New PaletteÉ"); + #if 1 + catPopInfo.fViewID = kCategorySelectMenu; + catPopInfo.fVisible = false; + catPopInfo.fEnabled = true; + catPopInfo.fLockLeft = true; + catPopInfo.fLockTop = true; + catPopInfo.fLockRight = true; + catPopInfo.fLockBottom = true; + catPopInfo.fAutoLeft = BORDER_WIDTH+20; //myPaneSize.h - (BORDER_WIDTH+20); + catPopInfo.fAutoTop = myPaneSize.v - ((2*POPUP_HEIGHT) + BORDER_WIDTH); + catPopInfo.fAutoRight = -BORDER_WIDTH; + catPopInfo.fAutoBottom = -(BORDER_WIDTH+POPUP_HEIGHT); + #else + _categoryPopup = dynamic_cast<XGPopControl*>(this->FindViewByID(kMaterialSelectMenu)); + AssertValidView(_categoryPopup); + #endif + _categoryPopup = new XGPopControl(this, catPopInfo, kActiveMenuFont); + _categoryPopup->Insert(kAccentMenuItem,"Accents"); + _categoryPopup->Insert(kDeckMenuItem,"Decks and Patios"); + _categoryPopup->Insert(kNaturalMenuItem,"Natural Items"); + _categoryPopup->Insert(kOtherMenuItem,"Other Hardscape"); + _categoryPopup->Insert(kStairMenuItem,"Stairs"); + _categoryPopup->Insert(kStructureMenuItem,"Structures"); + _categoryPopup->Insert(kWalkMenuItem,"Walks"); + _categoryPopup->Insert(kWallMenuItem,"Walls and Fences"); + _categoryPopup->Insert(kWaterMenuItem,"Water Features"); + + popupInfo.fAutoLeft = BORDER_WIDTH; //myPaneSize.h - (BORDER_WIDTH+20); + popupInfo.fAutoTop = myPaneSize.v - ((3*POPUP_HEIGHT) + BORDER_WIDTH); + popupInfo.fAutoRight = -BORDER_WIDTH; + popupInfo.fAutoBottom = -(BORDER_WIDTH+(2*POPUP_HEIGHT)); + _popup = new XGPopControl(this, popupInfo, kActiveMenuFont); nameInfo.v.fViewID = kMaterialNameText; nameInfo.v.fVisible = true; *************** *** 363,369 **** imageInfo.fAutoTop = BORDER_WIDTH; imageInfo.fAutoRight = -BORDER_WIDTH; ! imageInfo.fAutoBottom = -(BORDER_WIDTH + (2*POPUP_HEIGHT) + NAME_HEIGHT); width = myPaneSize.h - (2 * BORDER_WIDTH); ! height = myPaneSize.v - ((2 * BORDER_WIDTH) + (2*POPUP_HEIGHT) + NAME_HEIGHT); if(height < width) { --- 399,405 ---- imageInfo.fAutoTop = BORDER_WIDTH; imageInfo.fAutoRight = -BORDER_WIDTH; ! imageInfo.fAutoBottom = -(BORDER_WIDTH + (3*POPUP_HEIGHT) + NAME_HEIGHT); width = myPaneSize.h - (2 * BORDER_WIDTH); ! height = myPaneSize.v - ((2 * BORDER_WIDTH) + (3*POPUP_HEIGHT) + NAME_HEIGHT); if(height < width) { *************** *** 501,504 **** --- 537,542 ---- } } + if(!foundSeper) + _popup->DeleteAll(); /****/ *************** *** 548,552 **** { index = mat->GetMaterialType() & kMinorMaterialType; ! printf("Mat %s is index %ld\n", mat->GetCommonName().c_str(), index); if(index > (sizeof(_hardscape)/sizeof(hardscapeElem_t))) index = kMaterialTypeHardscape & kMinorMaterialType; --- 586,590 ---- { index = mat->GetMaterialType() & kMinorMaterialType; ! // printf("Mat %s is index %ld\n", mat->GetCommonName().c_str(), index); if(index > (sizeof(_hardscape)/sizeof(hardscapeElem_t))) index = kMaterialTypeHardscape & kMinorMaterialType; *************** *** 791,849 **** case 0: _paletteType = kUsePalette; break; case 1: _paletteType = kInThisPlot; RebuildPlotPalette(); break; case 2: _paletteType = kBackgroundItems; RebuildPlotPalette(); break; case 3: - return -1; // Drop out completely, it's the separator - case kAccentMenuItem: _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeAccents & kMinorMaterialType; - RebuildPlotPalette(); break; case kDeckMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeDeckPatio & kMinorMaterialType; - RebuildPlotPalette(); break; case kNaturalMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeNaturalItems & kMinorMaterialType; - RebuildPlotPalette(); break; case kOtherMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeHardscape & kMinorMaterialType; - RebuildPlotPalette(); break; case kStairMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeSteps & kMinorMaterialType; - RebuildPlotPalette(); break; case kStructureMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeStructure & kMinorMaterialType; - RebuildPlotPalette(); break; case kWalkMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeWalks & kMinorMaterialType; - RebuildPlotPalette(); break; case kWallMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeWallsFences & kMinorMaterialType; - RebuildPlotPalette(); break; case kWaterMenuItem: - _paletteType = kHardscapeItems; _hardscapeIndex = kMaterialTypeWaterFeature & kMinorMaterialType; - RebuildPlotPalette(); break; } --- 829,886 ---- case 0: _paletteType = kUsePalette; + _categoryPopup->HideView(); break; case 1: _paletteType = kInThisPlot; RebuildPlotPalette(); + _categoryPopup->HideView(); break; case 2: _paletteType = kBackgroundItems; RebuildPlotPalette(); + _categoryPopup->HideView(); break; case 3: _paletteType = kHardscapeItems; + _hardscapeIndex = 0; + _categoryPopup->ShowView(); + return DoPopValue(kCategorySelectMenu, NULL); + } + UpdateMaterialPaletteMenu(); + if(GetNumMaterials() > 0) + PickMaterial(0); + result = 0; + break; + + case kCategorySelectMenu: + menuItem = _categoryPopup->GetValue(); + switch(menuItem) + { + case kAccentMenuItem: _hardscapeIndex = kMaterialTypeAccents & kMinorMaterialType; break; case kDeckMenuItem: _hardscapeIndex = kMaterialTypeDeckPatio & kMinorMaterialType; break; case kNaturalMenuItem: _hardscapeIndex = kMaterialTypeNaturalItems & kMinorMaterialType; break; case kOtherMenuItem: _hardscapeIndex = kMaterialTypeHardscape & kMinorMaterialType; break; case kStairMenuItem: _hardscapeIndex = kMaterialTypeSteps & kMinorMaterialType; break; case kStructureMenuItem: _hardscapeIndex = kMaterialTypeStructure & kMinorMaterialType; break; case kWalkMenuItem: _hardscapeIndex = kMaterialTypeWalks & kMinorMaterialType; break; case kWallMenuItem: _hardscapeIndex = kMaterialTypeWallsFences & kMinorMaterialType; break; case kWaterMenuItem: _hardscapeIndex = kMaterialTypeWaterFeature & kMinorMaterialType; break; } *************** *** 851,854 **** --- 888,892 ---- _hardscapeIndex = kMaterialTypeHardscape & kMinorMaterialType; + RebuildPlotPalette(); UpdateMaterialPaletteMenu(); if(GetNumMaterials() > 0) Index: ActiveMaterial.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.h,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -C2 -d -r1.10.2.1 -r1.10.2.2 *** ActiveMaterial.h 2 Nov 2006 23:47:24 -0000 1.10.2.1 --- ActiveMaterial.h 4 Nov 2006 01:54:33 -0000 1.10.2.2 *************** *** 103,106 **** --- 103,107 ---- // attributes paletteType_t _paletteType; + XGPopControl* _categoryPopup; XGPopControl* _palettePopup; XGPopControl* _popup; |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:47:50
|
Update of /cvsroot/igarden/Garden/source/resources In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28990 Modified Files: Tag: Release_branch_v1 SourceMaterialsStart.xml Log Message: Add new non-plant material types Index: SourceMaterialsStart.xml =================================================================== RCS file: /cvsroot/igarden/Garden/source/resources/SourceMaterialsStart.xml,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.2 diff -C2 -d -r1.24.2.1 -r1.24.2.2 *** SourceMaterialsStart.xml 29 Oct 2006 03:32:13 -0000 1.24.2.1 --- SourceMaterialsStart.xml 2 Nov 2006 23:47:44 -0000 1.24.2.2 *************** *** 1260,1273 **** <Material UID="FA3A0F41-5B7F-11D9-BB5D-000A95A7588C" CanonicalName="Yucca glauca" CommonName="." materialType="ConiferousShrub" suppliers="0000BA00-0000-5571-0000-000600009860, 0000BA01-0000-5571-0000-000600009860" PlantZone="4a" Height="60.90cm" Spread="91.40cm" PlantForm="decumbant" GrowthRate="moderate" LifeExp="short lived" SoilPh="neutral-alkaline" SoilTex="sand, sandy loam, loam" ShadeTol="full sun" FolTex="coarse" FolCol="medium green" AutumnVis="high, medium" FlwrColor="white" FruitCol="black"/> <Material UID="FA3A1AE5-5B7F-11D9-BB5D-000A95A7588C" CanonicalName="Zelkova serrata" CommonName="Japanese zelkova" materialType="DeciduousTree" suppliers="0000BA00-0000-5571-0000-000600009860, 0000BA01-0000-5571-0000-000600009860" PlantZone="3-3b" Height="18.29m" Spread="15.24m" PlantForm="vase" GrowthRate="slow" LifeExp="long lived" SoilPh="lightly acid-neutral" SoilTex="sand, sandy loam, loam, clay loam, clay" ShadeTol="full sun" FolTex="fine" FolCol="dark green" AutumnVis="high, medium" FlwrColor="yellow green" FlwrVis="very low" FruitCol="brown"/> ! <Material UID="14FD3400-1370-11DA-AB89-C467FD397B7A" CommonName="Pergola" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Pergola.svg"/> ! <Material UID="6A02247A-18E2-11DA-AB89-C467FD397B7A" CommonName="Planter" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Planter.svg"> <Variant UID="54EDFD1A-19BA-11DA-AB89-C467FD397B7A" variantName="Medium" MaterialLength="35.50cm" MaterialWidth="91.40cm"/> <Variant UID="54EDFDB0-19BA-11DA-AB89-C467FD397B7A" variantName="Small" MaterialLength="30.40cm" MaterialWidth="30.40cm"/> </Material> ! <Material UID="9D4F582C-1AD9-11DA-AB89-C467FD397B7A" CommonName="Picket Fence" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Picket.svg"/> ! <Material UID="9D4F589A-1AD9-11DA-AB89-C467FD397B7A" CommonName="Brick Walk" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Walk.svg"> <Variant UID="4DE2D348-2120-11DA-AB89-C467FD397B7A" variantName="Running" PlanDrawing="Walk3.svg"/> </Material> ! <Material UID="EC575BE4-32D6-11DA-AB89-C467FD397B7A" CommonName="Wall Edge" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Edge.svg"/> <Material UID="EC575C84-32D6-11DA-AB89-C467FD397B7A" CommonName="Stair" materialType="Steps" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Stair4.svg"> <Variant UID="EC575F90-32D6-11DA-AB89-C467FD397B7A" variantName="Wide Tread 1" PlanDrawing="Stair1.svg"/> --- 1260,1273 ---- <Material UID="FA3A0F41-5B7F-11D9-BB5D-000A95A7588C" CanonicalName="Yucca glauca" CommonName="." materialType="ConiferousShrub" suppliers="0000BA00-0000-5571-0000-000600009860, 0000BA01-0000-5571-0000-000600009860" PlantZone="4a" Height="60.90cm" Spread="91.40cm" PlantForm="decumbant" GrowthRate="moderate" LifeExp="short lived" SoilPh="neutral-alkaline" SoilTex="sand, sandy loam, loam" ShadeTol="full sun" FolTex="coarse" FolCol="medium green" AutumnVis="high, medium" FlwrColor="white" FruitCol="black"/> <Material UID="FA3A1AE5-5B7F-11D9-BB5D-000A95A7588C" CanonicalName="Zelkova serrata" CommonName="Japanese zelkova" materialType="DeciduousTree" suppliers="0000BA00-0000-5571-0000-000600009860, 0000BA01-0000-5571-0000-000600009860" PlantZone="3-3b" Height="18.29m" Spread="15.24m" PlantForm="vase" GrowthRate="slow" LifeExp="long lived" SoilPh="lightly acid-neutral" SoilTex="sand, sandy loam, loam, clay loam, clay" ShadeTol="full sun" FolTex="fine" FolCol="dark green" AutumnVis="high, medium" FlwrColor="yellow green" FlwrVis="very low" FruitCol="brown"/> ! <Material UID="14FD3400-1370-11DA-AB89-C467FD397B7A" CommonName="Pergola" materialType="Struct" Height="6ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Pergola.svg"/> ! <Material UID="6A02247A-18E2-11DA-AB89-C467FD397B7A" CommonName="Planter" materialType="Accent" Height="2ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Planter.svg"> <Variant UID="54EDFD1A-19BA-11DA-AB89-C467FD397B7A" variantName="Medium" MaterialLength="35.50cm" MaterialWidth="91.40cm"/> <Variant UID="54EDFDB0-19BA-11DA-AB89-C467FD397B7A" variantName="Small" MaterialLength="30.40cm" MaterialWidth="30.40cm"/> </Material> ! <Material UID="9D4F582C-1AD9-11DA-AB89-C467FD397B7A" CommonName="Picket Fence" materialType="Wall" Height="2ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Picket.svg"/> ! <Material UID="9D4F589A-1AD9-11DA-AB89-C467FD397B7A" CommonName="Brick Walk" materialType="Walks" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Walk.svg"> <Variant UID="4DE2D348-2120-11DA-AB89-C467FD397B7A" variantName="Running" PlanDrawing="Walk3.svg"/> </Material> ! <Material UID="EC575BE4-32D6-11DA-AB89-C467FD397B7A" CommonName="Wall Edge" materialType="Struct" Height="8ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Edge.svg"/> <Material UID="EC575C84-32D6-11DA-AB89-C467FD397B7A" CommonName="Stair" materialType="Steps" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Stair4.svg"> <Variant UID="EC575F90-32D6-11DA-AB89-C467FD397B7A" variantName="Wide Tread 1" PlanDrawing="Stair1.svg"/> *************** *** 1279,1286 **** <Variant UID="EC575F22-32D6-11DA-AB89-C467FD397B7A" variantName="Narrow Tread 2" PlanDrawing="Stair7.svg"/> </Material> ! <Material UID="B64F6AE5-2852-4986-A2E6-E8ED75CD5466" CommonName="Fountain" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Fountain.svg" MaterialLength="5ft" MaterialWidth="5ft"/> ! <Material UID="18075690-6F13-4F0D-8E4F-36C362F795F2" CommonName="Decking" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Decking.svg"/> ! <Material UID="60495A35-20A1-460C-841E-AF2C5CC2FC1C" CommonName="Bench" materialType="Structure" Height="3ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Bench1.svg"/> ! <Material UID="4D1274EC-E63B-4158-B9F8-3653FCDC4BA8" CommonName="Bluestone" materialType="Structure" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Bluestone.svg"/> <Material UID="01234683-0000-E73E-0000-0A00000065F1" CommonName="Turf" materialType="Background" MaterialLength="20.30cm" MaterialWidth="20.30cm" Picture="turf.png"/> <Material UID="01234684-0000-E73E-0000-0A00000065F1" CommonName="Asphalt" materialType="Background" MaterialLength="20.30cm" MaterialWidth="20.30cm" Picture="blacktop.png"/> --- 1279,1286 ---- <Variant UID="EC575F22-32D6-11DA-AB89-C467FD397B7A" variantName="Narrow Tread 2" PlanDrawing="Stair7.svg"/> </Material> ! <Material UID="B64F6AE5-2852-4986-A2E6-E8ED75CD5466" CommonName="Fountain" materialType="Water" Height="1ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Fountain.svg" MaterialLength="5ft" MaterialWidth="5ft"/> ! <Material UID="18075690-6F13-4F0D-8E4F-36C362F795F2" CommonName="Decking" materialType="Deck" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Decking.svg"/> ! <Material UID="60495A35-20A1-460C-841E-AF2C5CC2FC1C" CommonName="Bench" materialType="Struct" Height="3ft" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Bench1.svg"/> ! <Material UID="4D1274EC-E63B-4158-B9F8-3653FCDC4BA8" CommonName="Bluestone" materialType="Walks" suppliers="0000B7EB-0000-0AF1-0000-00030000E122" PlanDrawing="Bluestone.svg"/> <Material UID="01234683-0000-E73E-0000-0A00000065F1" CommonName="Turf" materialType="Background" MaterialLength="20.30cm" MaterialWidth="20.30cm" Picture="turf.png"/> <Material UID="01234684-0000-E73E-0000-0A00000065F1" CommonName="Asphalt" materialType="Background" MaterialLength="20.30cm" MaterialWidth="20.30cm" Picture="blacktop.png"/> |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:47:34
|
Update of /cvsroot/igarden/Garden/source/SourceMaterialDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28977 Modified Files: Tag: Release_branch_v1 AttributeDictionary.cpp SourceMaterialFile.cpp Log Message: Add new non-plant material types Index: AttributeDictionary.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/AttributeDictionary.cpp,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -C2 -d -r1.41 -r1.41.2.1 *** AttributeDictionary.cpp 17 Jun 2006 02:40:16 -0000 1.41 --- AttributeDictionary.cpp 2 Nov 2006 23:47:32 -0000 1.41.2.1 *************** *** 317,321 **** break; case kMaterialTypeStructure: ! result = "Structure"; break; case kMaterialTypeSteps: --- 317,321 ---- break; case kMaterialTypeStructure: ! result = "Struct"; break; case kMaterialTypeSteps: *************** *** 325,328 **** --- 325,349 ---- result = "Background"; break; + case kMaterialTypeWalks: + result = "Walks"; + break; + case kMaterialTypeDeckPatio: + result = "Deck"; + break; + case kMaterialTypeWallsFences: + result = "Wall"; + break; + case kMaterialTypeAccents: + result = "Accent"; + break; + case kMaterialTypeWaterFeature: + result = "Water"; + break; + case kMaterialTypeNaturalItems: + result = "Natural"; + break; + case kMaterialTypeHardscape: + result = "Hardscape"; + break; default: result = "????"; *************** *** 601,610 **** else if(strcmp(txt, "Vegetable") == 0) val = kMaterialTypeVegetable; ! else if(strcmp(txt, "Structure") == 0) ! val = kMaterialTypeStructure; else if(strcmp(txt, "Steps") == 0) val = kMaterialTypeSteps; else if(strcmp(txt, "Background") == 0) val = kMaterialTypeBackground; else sscanf(txt, "%08lx", &val); --- 622,645 ---- else if(strcmp(txt, "Vegetable") == 0) val = kMaterialTypeVegetable; ! else if(strcmp(txt, "Structure") == 0 || strcmp(txt, "Hardscape") == 0) ! val = kMaterialTypeHardscape; else if(strcmp(txt, "Steps") == 0) val = kMaterialTypeSteps; else if(strcmp(txt, "Background") == 0) val = kMaterialTypeBackground; + else if(strcmp(txt, "Walks") == 0) + val = kMaterialTypeWalks; + else if(strcmp(txt, "Deck") == 0) + val = kMaterialTypeDeckPatio; + else if(strcmp(txt, "Wall") == 0) + val = kMaterialTypeWallsFences; + else if(strcmp(txt, "Accent") == 0) + val = kMaterialTypeAccents; + else if(strcmp(txt, "Water") == 0) + val = kMaterialTypeWaterFeature; + else if(strcmp(txt, "Natural") == 0) + val = kMaterialTypeNaturalItems; + else if(strcmp(txt, "Struct") == 0) + val = kMaterialTypeStructure; else sscanf(txt, "%08lx", &val); Index: SourceMaterialFile.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/SourceMaterialDB/SourceMaterialFile.cpp,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -d -r1.22 -r1.22.2.1 *** SourceMaterialFile.cpp 21 Jun 2006 02:16:18 -0000 1.22 --- SourceMaterialFile.cpp 2 Nov 2006 23:47:32 -0000 1.22.2.1 *************** *** 558,561 **** --- 558,562 ---- Variant *variant; Material *mat; + materialType_t oldType; done = false; *************** *** 579,583 **** } } ! if(mat->CanAttributesBeMerged(sub2)) { --- 580,591 ---- } } ! oldType = mat->GetMaterialType(); ! if(oldType == kMaterialTypeHardscape) ! { ! mat->SetMaterialType(kMaterialTypeUnspecified); // Force to take new type ! if(!mat->CanAttributesBeMerged(sub2)) ! mat->SetMaterialType(oldType); // If still can't be merged, leave alone. ! } ! if(mat->CanAttributesBeMerged(sub2)) { |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:47:27
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28961 Modified Files: Tag: Release_branch_v1 ActiveMaterial.h ActiveMaterial.cpp Log Message: Add new non-plant material types Index: ActiveMaterial.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.cpp,v retrieving revision 1.45 retrieving revision 1.45.2.1 diff -C2 -d -r1.45 -r1.45.2.1 *** ActiveMaterial.cpp 1 Jul 2006 23:17:32 -0000 1.45 --- ActiveMaterial.cpp 2 Nov 2006 23:47:24 -0000 1.45.2.1 *************** *** 62,65 **** --- 62,76 ---- const long kActiveMenuFont = 139; + const long kSeparatorItem = 3; + const long kAccentMenuItem = 4; + const long kDeckMenuItem = 5; + const long kNaturalMenuItem = 6; + const long kOtherMenuItem = 7; + const long kStairMenuItem = 8; + const long kStructureMenuItem = 9; + const long kWalkMenuItem = 10; + const long kWallMenuItem = 11; + const long kWaterMenuItem = 12; + BEGINDISPATCH(ActiveMaterial,XGView) DISPATCHTABLE(KXGAppPostEvent,ActiveMaterial::UseIdleTime) *************** *** 196,200 **** return _backgrounds.Length() + 1; case kHardscapeItems: ! return _hardscape.Length() + 1; default: return 0; --- 207,212 ---- return _backgrounds.Length() + 1; case kHardscapeItems: ! MyAssert(_hardscapeIndex < (sizeof(_hardscape)/sizeof(hardscapeElem_t))); ! return _hardscape[_hardscapeIndex].elem.Length() + 1; default: return 0; *************** *** 222,229 **** return _backgrounds[index-1]; case kHardscapeItems: if(index == 0) return 0; else ! return _hardscape[index-1]; default: return 0; --- 234,242 ---- return _backgrounds[index-1]; case kHardscapeItems: + MyAssert(_hardscapeIndex < (sizeof(_hardscape)/sizeof(hardscapeElem_t))); if(index == 0) return 0; else ! return (_hardscape[_hardscapeIndex]).elem[index-1]; default: return 0; *************** *** 301,305 **** _palettePopup->Insert(1,"All in this plot"); _palettePopup->Insert(2,"Backgrounds"); ! _palettePopup->Insert(3,"Non-Plant"); popupInfo.fViewID = kMaterialSelectMenu; --- 314,327 ---- _palettePopup->Insert(1,"All in this plot"); _palettePopup->Insert(2,"Backgrounds"); ! _palettePopup->Insert(3,"-"); ! _palettePopup->Insert(kAccentMenuItem,"Accents"); ! _palettePopup->Insert(kDeckMenuItem,"Decks and Patios"); ! _palettePopup->Insert(kNaturalMenuItem,"Natural Items"); ! _palettePopup->Insert(kOtherMenuItem,"Other Hardscape"); ! _palettePopup->Insert(kStairMenuItem,"Stairs"); ! _palettePopup->Insert(kStructureMenuItem,"Structures"); ! _palettePopup->Insert(kWalkMenuItem,"Walks"); ! _palettePopup->Insert(kWallMenuItem,"Walls and Fences"); ! _palettePopup->Insert(kWaterMenuItem,"Water Features"); popupInfo.fViewID = kMaterialSelectMenu; *************** *** 388,425 **** _needsUIUpdate = false; ! SourceMaterialFile *sources; ! UInt32 n, numMaterials, var, numVariants; ! Material *mat, *varMat; ! ! sources = SourceMaterialFile::GetSourceDatabase(); ! numMaterials = DBPersist::NumRows(sources, kMaterialBodyCID); ! for(n = 0; n < numMaterials; n++) ! { ! mat = new Material(sources, n); ! if((mat->GetMaterialType() & kMajorMaterialType) == kMaterialTypeBackground) ! { ! _backgrounds.push_back(mat); ! } ! else if((mat->GetMaterialType() & kMajorMaterialType) == kMaterialTypeStructure) ! { ! numVariants = mat->NumVariants(); ! for(var = 0; var < numVariants; var++) ! { ! Variant *variant; ! variantID_t vid; ! ! variant = mat->GetIndexedVariant(var); ! variant->GetVariantID(vid); ! varMat = mat->CloneAsVariant(vid); ! _hardscape.push_back(varMat); ! } ! ! _hardscape.push_back(mat); ! } ! else ! { ! delete mat; ! } ! } } // --------------------------------------------------------------------------- --- 410,414 ---- _needsUIUpdate = false; ! RebuildHardscapeMenu(); } // --------------------------------------------------------------------------- *************** *** 536,539 **** --- 525,577 ---- } } + + // --------------------------------------------------------------------------- + /// RebuildHardscapeMenu + // + void ActiveMaterial::RebuildHardscapeMenu() + { + SourceMaterialFile *sources; + UInt32 n, numMaterials, var, numVariants; + Material *mat, *varMat; + uint32 index; + + sources = SourceMaterialFile::GetSourceDatabase(); + numMaterials = DBPersist::NumRows(sources, kMaterialBodyCID); + for(n = 0; n < numMaterials; n++) + { + mat = new Material(sources, n); + if((mat->GetMaterialType() & kMajorMaterialType) == kMaterialTypeBackground) + { + _backgrounds.push_back(mat); + } + else if((mat->GetMaterialType() & kMajorMaterialType) == kMaterialTypeHardscape) + { + index = mat->GetMaterialType() & kMinorMaterialType; + printf("Mat %s is index %ld\n", mat->GetCommonName().c_str(), index); + if(index > (sizeof(_hardscape)/sizeof(hardscapeElem_t))) + index = kMaterialTypeHardscape & kMinorMaterialType; + + + numVariants = mat->NumVariants(); + for(var = 0; var < numVariants; var++) + { + Variant *variant; + variantID_t vid; + + variant = mat->GetIndexedVariant(var); + variant->GetVariantID(vid); + varMat = mat->CloneAsVariant(vid); + _hardscape[index].elem.push_back(varMat); + } + + _hardscape[index].elem.push_back(mat); + } + else + { + delete mat; + } + } + } + // --------------------------------------------------------------------------- // void ActiveMaterial::PickMaterial( UInt32 index ) *************** *** 753,783 **** case 0: _paletteType = kUsePalette; - if(GetNumMaterials() > 0) - PickMaterial(0); - result = 0; break; case 1: _paletteType = kInThisPlot; RebuildPlotPalette(); - if(GetNumMaterials() > 0) - PickMaterial(0); - result = 0; break; case 2: _paletteType = kBackgroundItems; RebuildPlotPalette(); - if(GetNumMaterials() > 0) - PickMaterial(0); - result = 0; break; case 3: _paletteType = kHardscapeItems; RebuildPlotPalette(); - if(GetNumMaterials() > 0) - PickMaterial(0); - result = 0; break; } UpdateMaterialPaletteMenu(); break; --- 791,858 ---- case 0: _paletteType = kUsePalette; break; case 1: _paletteType = kInThisPlot; RebuildPlotPalette(); break; case 2: _paletteType = kBackgroundItems; RebuildPlotPalette(); break; case 3: + return -1; // Drop out completely, it's the separator + case kAccentMenuItem: _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeAccents & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kDeckMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeDeckPatio & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kNaturalMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeNaturalItems & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kOtherMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeHardscape & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kStairMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeSteps & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kStructureMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeStructure & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kWalkMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeWalks & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kWallMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeWallsFences & kMinorMaterialType; + RebuildPlotPalette(); + break; + case kWaterMenuItem: + _paletteType = kHardscapeItems; + _hardscapeIndex = kMaterialTypeWaterFeature & kMinorMaterialType; RebuildPlotPalette(); break; } + if(_hardscapeIndex > (sizeof(_hardscape)/sizeof(hardscapeElem_t))) + _hardscapeIndex = kMaterialTypeHardscape & kMinorMaterialType; + UpdateMaterialPaletteMenu(); + if(GetNumMaterials() > 0) + PickMaterial(0); + result = 0; break; Index: ActiveMaterial.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/ActiveMaterial.h,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** ActiveMaterial.h 28 Oct 2005 11:33:56 -0000 1.10 --- ActiveMaterial.h 2 Nov 2006 23:47:24 -0000 1.10.2.1 *************** *** 49,58 **** typedef enum { ! kInThisPlot, ! kUsePalette, ! kBackgroundItems, ! kHardscapeItems } paletteType_t; class ActiveMaterial : public XGView , public XGDropper { --- 49,63 ---- typedef enum { ! kInThisPlot = 0, ! kUsePalette = 1, ! kBackgroundItems = 2, ! kHardscapeItems = 3 } paletteType_t; + typedef struct + { + materialArray_t elem; + } hardscapeElem_t; + class ActiveMaterial : public XGView , public XGDropper { *************** *** 91,94 **** --- 96,100 ---- Material* GetIndexedMaterial(UInt32 index); void RebuildPlotPalette(); + void RebuildHardscapeMenu(); private: // methods *************** *** 108,112 **** MaterialCollection* _topPalette; XGDynArray<Material*> _backgrounds; ! XGDynArray<Material*> _hardscape; bool _needsUIUpdate; materialID_t _newUpdateID; --- 114,119 ---- MaterialCollection* _topPalette; XGDynArray<Material*> _backgrounds; ! uint32 _hardscapeIndex; ! hardscapeElem_t _hardscape[10]; bool _needsUIUpdate; materialID_t _newUpdateID; |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:44:36
|
Update of /cvsroot/igarden/Garden/source/Plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27790 Modified Files: Tag: Release_branch_v1 RenderPlugin.cpp Log Message: Add z-axis Index: RenderPlugin.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/RenderPlugin.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** RenderPlugin.cpp 29 Oct 2006 03:31:48 -0000 1.13.2.1 --- RenderPlugin.cpp 2 Nov 2006 23:44:34 -0000 1.13.2.2 *************** *** 480,484 **** err = glGetError(); glPushMatrix(); ! glTranslatef(centerParm.xOffset, centerParm.yOffset, kGraphicsZ); err = glGetError(); gluDisk(quad, 0, (_fullSpread)/2, 64, 16); --- 480,484 ---- err = glGetError(); glPushMatrix(); ! glTranslatef(centerParm.xOffset, centerParm.yOffset, centerParm.zOffset+kGraphicsZ); err = glGetError(); gluDisk(quad, 0, (_fullSpread)/2, 64, 16); *************** *** 494,498 **** ErrorCode ec; ! ec = draw.Draw(spec, centerParm.xOffset, centerParm.yOffset, kGraphicsZ, _xSize, _ySize, _zSize, kMiddleFixed, _forcePastBounds); return (ec == yaaf::KYAAFNoError) ? kCanvasOK : kCanvasNotHandled; } --- 494,498 ---- ErrorCode ec; ! ec = draw.Draw(spec, centerParm.xOffset, centerParm.yOffset, centerParm.zOffset+kGraphicsZ, _xSize, _ySize, _zSize, kMiddleFixed, _forcePastBounds); return (ec == yaaf::KYAAFNoError) ? kCanvasOK : kCanvasNotHandled; } *************** *** 586,591 **** --- 586,593 ---- center.xOffset = _groupBounds.xOffset + (_groupBounds.xSize/2); center.yOffset = _groupBounds.yOffset + (_groupBounds.ySize/2); + center.zOffset = 0.0; corner.xOffset = xpos-(20*12); corner.yOffset = ypos; + corner.zOffset = 0.0; end.xOffset = corner.xOffset + (20*12); end.yOffset = corner.yOffset; *************** *** 751,760 **** if((mtype & kMajorMaterialType) == kMaterialTypePlant) { ! ec = draw.Draw(spec, center.xOffset, center.yOffset, kGraphicsZ, _fullSpread, _fullSpread, 0.0, kMiddleGrow, _forcePastBounds); } else { ! ec = draw.Draw(spec, center.xOffset, center.yOffset, kGraphicsZ, _xSize, _ySize, _zSize, kMiddleFixed, _forcePastBounds); } --- 753,762 ---- if((mtype & kMajorMaterialType) == kMaterialTypePlant) { ! ec = draw.Draw(spec, center.xOffset, center.yOffset, center.zOffset+kGraphicsZ, _fullSpread, _fullSpread, 0.0, kMiddleGrow, _forcePastBounds); } else { ! ec = draw.Draw(spec, center.xOffset, center.yOffset, center.zOffset+kGraphicsZ, _xSize, _ySize, _zSize, kMiddleFixed, _forcePastBounds); } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:43:29
|
Update of /cvsroot/igarden/Garden/source/Database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27399 Modified Files: Tag: Release_branch_v1 RGXMLUtils.cpp Log Message: Add z-axis Index: RGXMLUtils.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Database/RGXMLUtils.cpp,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** RGXMLUtils.cpp 7 May 2005 22:59:30 -0000 1.8 --- RGXMLUtils.cpp 2 Nov 2006 23:43:27 -0000 1.8.2.1 *************** *** 115,119 **** void StringToPlanPoint(const char *str, planPoint_t &point) { ! sscanf(str, "[%lf,%lf,0]", &point.xOffset, &point.yOffset); } --- 115,119 ---- void StringToPlanPoint(const char *str, planPoint_t &point) { ! sscanf(str, "[%lf,%lf,%lf]", &point.xOffset, &point.yOffset, &point.zOffset); } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:43:20
|
Update of /cvsroot/igarden/CommonSource/YAAFExtensions In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv27363 Modified Files: Tag: Release_branch_v1 RGGLSVGDraw.cpp Log Message: Add z-axis Index: RGGLSVGDraw.cpp =================================================================== RCS file: /cvsroot/igarden/CommonSource/YAAFExtensions/RGGLSVGDraw.cpp,v retrieving revision 1.26.2.1 retrieving revision 1.26.2.2 diff -C2 -d -r1.26.2.1 -r1.26.2.2 *** RGGLSVGDraw.cpp 29 Oct 2006 03:31:56 -0000 1.26.2.1 --- RGGLSVGDraw.cpp 2 Nov 2006 23:43:15 -0000 1.26.2.2 *************** *** 310,314 **** double zPos = -0.1; titleTag_t tag, tag2; ! bool forX, forY, xGrows, yGrows; long xReps, yReps, xIndex, yIndex; const char *nextCh, *tmp; --- 310,314 ---- double zPos = -0.1; titleTag_t tag, tag2; ! bool forX, forY, xGrows, yGrows, fillVisible, strokeVisible; long xReps, yReps, xIndex, yIndex; const char *nextCh, *tmp; *************** *** 519,530 **** else if(strcmp(data->GetTag(), "polyline") == 0) { ! val = data->GetArgValue("points"); ! glBegin(GL_LINE_STRIP); ! while(*val != '\0') { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); // Z axis taken care of on glTranslate } - glEnd(); } else if(strcmp(data->GetTag(), "rect") == 0) --- 519,556 ---- else if(strcmp(data->GetTag(), "polyline") == 0) { ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { ! val = data->GetArgValue("points"); ! glBegin(GL_POLYGON); ! SetFillStyle(data); ! while(*val != '\0') ! { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! glEnd(); ! } ! ! if(fillVisible || strokeVisible) ! { ! if(strokeVisible) ! SetStrokeStyle(data, scaleX, scaleY); ! ! glPushAttrib(GL_LINE_BIT); ! glEnable (GL_LINE_SMOOTH); ! glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); ! val = data->GetArgValue("points"); ! glBegin(GL_LINE_STRIP); ! while(*val != '\0') ! { ! val = ParseOnePoint(val, true, xSize, ySize, _bounds.top, _bounds.left, xPos, yPos); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); // Z axis taken care of on glTranslate ! } ! glEnd(); ! glPopAttrib(); } } else if(strcmp(data->GetTag(), "rect") == 0) *************** *** 549,584 **** yPos = ((ySize-yPos) - (ySize/2)); ! if(IsStrokeStyleVisible(data)) { ! glBegin(GL_LINE_STRIP); ! SetStrokeStyle(data, scaleX, scaleY); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, 0.0); glEnd(); } ! ! if(IsFillStyleVisible(data)) { ! glBegin(GL_POLYGON); ! SetFillStyle(data); ! ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); } } --- 575,618 ---- yPos = ((ySize-yPos) - (ySize/2)); ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { ! SetFillStyle(data); ! glBegin(GL_POLYGON); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); } ! ! if(fillVisible || strokeVisible) { ! if(strokeVisible) ! SetStrokeStyle(data, scaleX, scaleY); ! ! glPushAttrib(GL_LINE_BIT); ! glEnable (GL_LINE_SMOOTH); ! glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); ! glBegin(GL_LINE_STRIP); ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos += width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos -= height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! xPos -= width; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); ! yPos += height; ! glVertex3f((xPos * scaleX) + xOffset, (yPos * scaleY) + yOffset, zOffset); glEnd(); + glPopAttrib(); } } *************** *** 622,642 **** glEnable(GL_MAP1_VERTEX_3); ! if(IsStrokeStyleVisible(data)) ! { ! glBegin(GL_LINE_STRIP); ! SetStrokeStyle(data, scaleX, scaleY); ! EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY, translateX, translateY); ! glEnd(); ! } ! ! if(IsFillStyleVisible(data)) { dval = data->GetArgValue("d"); - glBegin(GL_POLYGON); SetFillStyle(data); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); } glPopAttrib(); --- 656,685 ---- glEnable(GL_MAP1_VERTEX_3); ! fillVisible = IsFillStyleVisible(data); ! strokeVisible = IsStrokeStyleVisible(data); ! ! if(fillVisible) { dval = data->GetArgValue("d"); SetFillStyle(data); ! glBegin(GL_POLYGON); ! EnumeratePathVertices(dval, xOffset, yOffset, zOffset, xSize, ySize, scaleX, scaleY, translateX, translateY); glEnd(); } + if(fillVisible || strokeVisible) + { + if(strokeVisible) + SetStrokeStyle(data, scaleX, scaleY); + + glPushAttrib(GL_LINE_BIT); + glEnable (GL_LINE_SMOOTH); + glHint (GL_LINE_SMOOTH_HINT, GL_NICEST); + glBegin(GL_LINE_STRIP); + EnumeratePathVertices(dval, xOffset, yOffset, 0.0, xSize, ySize, scaleX, scaleY, translateX, translateY); + glEnd(); + glPopAttrib(); + } + glPopAttrib(); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:41:28
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26590 Modified Files: Tag: Release_branch_v1 PlanGroup.cp Log Message: Add z-axis Index: PlanGroup.cp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PlanGroup.cp,v retrieving revision 1.34 retrieving revision 1.34.2.1 diff -C2 -d -r1.34 -r1.34.2.1 *** PlanGroup.cp 24 Jun 2006 15:37:32 -0000 1.34 --- PlanGroup.cp 2 Nov 2006 23:41:26 -0000 1.34.2.1 *************** *** 467,470 **** --- 467,471 ---- break; } + result.zOffset = ElevationAtPosition(result.xOffset, result.yOffset); return result; *************** *** 773,777 **** { pt = GetIndexedPathPoint(n); ! planView->AddTessPoint(pt.xOffset, pt.yOffset, kBackGroundZ); } planView->EndTessContour(); --- 774,778 ---- { pt = GetIndexedPathPoint(n); ! planView->AddTessPoint(pt.xOffset, pt.yOffset, pt.zOffset); } planView->EndTessContour(); *************** *** 1282,1285 **** --- 1283,1287 ---- _pathPointCache[n].xOffset += offset.xOffset; _pathPointCache[n].yOffset += offset.yOffset; + _pathPointCache[n].zOffset += offset.zOffset; } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:41:21
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv26572 Modified Files: Tag: Release_branch_v1 PlanView.cpp PlanPaletteView.cpp PlanRuler.cpp Log Message: Add z-axis Index: PlanView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanView.cpp,v retrieving revision 1.47 retrieving revision 1.47.2.1 diff -C2 -d -r1.47 -r1.47.2.1 *** PlanView.cpp 15 Apr 2006 23:23:55 -0000 1.47 --- PlanView.cpp 2 Nov 2006 23:41:19 -0000 1.47.2.1 *************** *** 1267,1270 **** --- 1267,1271 ---- origin.xOffset = 0; origin.yOffset = 0; + origin.zOffset = 0; SetOrigin(origin); _layout->GetBoundingRect(planRect); Index: PlanPaletteView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanPaletteView.cpp,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** PlanPaletteView.cpp 13 Jan 2006 23:22:55 -0000 1.5 --- PlanPaletteView.cpp 2 Nov 2006 23:41:19 -0000 1.5.2.1 *************** *** 79,83 **** if(_drawLayout == NULL) { ! planPoint_t center = { 50*18, 50*18 }; Layer* layer; GardenPlot *plot; --- 79,83 ---- if(_drawLayout == NULL) { ! planPoint_t center(50*18, 50*18, 0.0); Layer* layer; GardenPlot *plot; *************** *** 130,133 **** --- 130,134 ---- center.xOffset = (viewSize.h/2.0)*scale; center.yOffset = (viewSize.v/2.0)*scale; + center.zOffset = 0.0; path->ChangeIndexedAnchorPoint(0, center); Index: PlanRuler.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanRuler.cpp,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** PlanRuler.cpp 2 Feb 2006 01:21:03 -0000 1.6 --- PlanRuler.cpp 2 Nov 2006 23:41:19 -0000 1.6.2.1 *************** *** 508,511 **** --- 508,512 ---- newOrigin.xOffset = _origin.xOffset - (x); newOrigin.yOffset = _origin.yOffset - (y); + newOrigin.zOffset = 0.0; SetOrigin(newOrigin); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:39:18
|
Update of /cvsroot/igarden/Garden/source/Database In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv25662 Modified Files: Tag: Release_branch_v1 RGXMLWriter.cpp Log Message: Add z-axis Index: RGXMLWriter.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Database/RGXMLWriter.cpp,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** RGXMLWriter.cpp 7 Jun 2006 00:09:57 -0000 1.12 --- RGXMLWriter.cpp 2 Nov 2006 23:39:16 -0000 1.12.2.1 *************** *** 141,145 **** PRECONDITION(strchr(a, '/') == NULL); ! snprintf(buf, sizeof(buf), "[%f,%f,0]", val.xOffset, val.yOffset); XGXMLWriter::WriteStartTagArg(a, buf); } --- 141,145 ---- PRECONDITION(strchr(a, '/') == NULL); ! snprintf(buf, sizeof(buf), "[%lf,%lf,%lf]", val.xOffset, val.yOffset, val.zOffset); XGXMLWriter::WriteStartTagArg(a, buf); } *************** *** 169,173 **** { char buf[768]; ! snprintf(buf, sizeof(buf), "[%f,%f,0]", val.xOffset, val.yOffset); XGXMLWriter::WriteData(buf); } --- 169,173 ---- { char buf[768]; ! snprintf(buf, sizeof(buf), "[%lf,%lf,%lf]", val.xOffset, val.yOffset, val.zOffset); XGXMLWriter::WriteData(buf); } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:35:11
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23815 Modified Files: Tag: Release_branch_v1 WarningOverlay.cpp Log Message: Add z-axis Index: WarningOverlay.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/WarningOverlay.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** WarningOverlay.cpp 9 Aug 2005 12:35:15 -0000 1.4 --- WarningOverlay.cpp 2 Nov 2006 23:35:08 -0000 1.4.2.1 *************** *** 59,62 **** --- 59,63 ---- point.xOffset = bounds.xOffset + (bounds.xSize/2); point.yOffset = bounds.yOffset + (bounds.ySize/2); + point.zOffset = 0.0; if(matRef->NumWarnings() != 0) |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:30:41
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv22231 Modified Files: Tag: Release_branch_v1 PointPath.cpp Log Message: Add z-axis Index: PointPath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/PointPath.cpp,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C2 -d -r1.21 -r1.21.2.1 *** PointPath.cpp 5 Oct 2005 22:12:46 -0000 1.21 --- PointPath.cpp 2 Nov 2006 23:30:22 -0000 1.21.2.1 *************** *** 223,227 **** void PointPath::CreateTestPattern( Layer* layout ) { ! planPoint_t point1 = { 5, 5 }, point2 = { 60 , 60 }; Path *path; PathElement *element; --- 223,227 ---- void PointPath::CreateTestPattern( Layer* layout ) { ! planPoint_t point1(5, 5,0), point2(60 , 60,0); Path *path; PathElement *element; *************** *** 256,259 **** --- 256,260 ---- _value.xOffset += offset.xOffset; _value.yOffset += offset.yOffset; + _value.zOffset += offset.zOffset; } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:29:38
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21842 Modified Files: Tag: Release_branch_v1 TextBox.cpp Log Message: Add z-axis Index: TextBox.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/TextBox.cpp,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** TextBox.cpp 22 Jun 2006 01:26:24 -0000 1.16 --- TextBox.cpp 2 Nov 2006 23:29:33 -0000 1.16.2.1 *************** *** 180,195 **** --- 180,199 ---- point.xOffset = _rectangle.xOffset; point.yOffset = _rectangle.yOffset; + point.zOffset = 0.0; // Annotations are at z 0.0 intoView->DrawSymbol(point, kPlanSymAnchorPoint); point.xOffset = _rectangle.xOffset; point.yOffset = _rectangle.yOffset + _rectangle.ySize; + point.zOffset = 0.0; intoView->DrawSymbol(point, kPlanSymAnchorPoint); point.xOffset = _rectangle.xOffset + _rectangle.xSize; point.yOffset = _rectangle.yOffset; + point.zOffset = 0.0; intoView->DrawSymbol(point, kPlanSymAnchorPoint); point.xOffset = _rectangle.xOffset + _rectangle.xSize; point.yOffset = _rectangle.yOffset + _rectangle.ySize; + point.zOffset = 0.0; intoView->DrawSymbol(point, kPlanSymAnchorPoint); } *************** *** 346,349 **** --- 350,354 ---- break; } + result.zOffset = 0.0; // Anchors are at z 0.0 return result; |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:28:45
|
Update of /cvsroot/igarden/Garden/source In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21427 Modified Files: Tag: Release_branch_v1 RedstartGarden.h Log Message: Add z-axis Index: RedstartGarden.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/RedstartGarden.h,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -C2 -d -r1.25 -r1.25.2.1 *** RedstartGarden.h 24 May 2006 12:10:36 -0000 1.25 --- RedstartGarden.h 2 Nov 2006 23:28:43 -0000 1.25.2.1 *************** *** 42,50 **** double ySize; } planRectangle_t; ! typedef struct { double xOffset; double yOffset; ! } planPoint_t; typedef struct --- 42,55 ---- double ySize; } planRectangle_t; ! ! struct planPoint_t { double xOffset; double yOffset; ! double zOffset; ! public: ! planPoint_t() { xOffset=0; yOffset=0; zOffset=0; } ! planPoint_t(double x, double y, double z) { xOffset=x; yOffset=y; zOffset=z; } ! }; typedef struct *************** *** 236,241 **** kMaterialTypeBackground = 0x00020000, kMaterialTypeMulch = 0x00020001, ! kMaterialTypeStructure = 0x00030000, ! kMaterialTypeSteps = 0x00030001 } materialType_t; --- 241,253 ---- kMaterialTypeBackground = 0x00020000, kMaterialTypeMulch = 0x00020001, ! kMaterialTypeHardscape = 0x00030000, ! kMaterialTypeSteps = 0x00030001, ! kMaterialTypeWalks = 0x00030002, ! kMaterialTypeDeckPatio = 0x00030003, ! kMaterialTypeWallsFences = 0x00030005, ! kMaterialTypeAccents = 0x00030006, ! kMaterialTypeWaterFeature = 0x00030007, ! kMaterialTypeNaturalItems = 0x00030008, ! kMaterialTypeStructure = 0x00030009 } materialType_t; |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:27:55
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21012 Modified Files: Tag: Release_branch_v1 RectanglePath.cpp Log Message: Add z-axis Index: RectanglePath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/RectanglePath.cpp,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -C2 -d -r1.38 -r1.38.2.1 *** RectanglePath.cpp 22 Jun 2006 00:34:59 -0000 1.38 --- RectanglePath.cpp 2 Nov 2006 23:27:52 -0000 1.38.2.1 *************** *** 82,85 **** --- 82,86 ---- point.xOffset = rect.xOffset; point.yOffset = rect.yOffset; + point.zOffset = 0.0; // Set zaxis when placed _pathPoints.push_back(point); point.xOffset += rect.xSize; *************** *** 162,165 **** --- 163,167 ---- point.xOffset = rect.xOffset; point.yOffset = rect.yOffset; + point.zOffset = 0.0; AddAnchorPoint(point); _pathPoints.push_back(point); *************** *** 204,218 **** --- 206,226 ---- top.xOffset = start.xOffset + ((middle.xOffset - start.xOffset)/2.0); top.yOffset = start.yOffset + ((middle.yOffset - start.yOffset)/2.0); + top.zOffset = 0.0; // Set zaxis when placed bottom.xOffset = top.xOffset + dx; bottom.yOffset = top.yOffset + dy; + bottom.zOffset = 0.0; // Set zaxis when placed right.xOffset = middle.xOffset + (/*(oppositeCorner.xOffset - middle.xOffset)*/dx/2.0); right.yOffset = middle.yOffset + (/*(oppositeCorner.yOffset - middle.yOffset)*/dy/2.0); + right.zOffset = 0.0; // Set zaxis when placed left.xOffset = right.xOffset - (middle.xOffset - start.xOffset); left.yOffset = right.yOffset - (middle.yOffset - start.yOffset); + left.zOffset = 0.0; // Set zaxis when placed corner1.xOffset = middle.xOffset + dx; corner1.yOffset = middle.yOffset + dy; + corner1.zOffset = 0.0; // Set zaxis when placed corner2.xOffset = start.xOffset + dx; corner2.yOffset = start.yOffset + dy; + corner2.zOffset = 0.0; // Set zaxis when placed // 3--------2 *************** *** 344,353 **** --- 352,365 ---- left.xOffset = _pathPoints[0].xOffset + ((_pathPoints[3].xOffset - _pathPoints[0].xOffset)/2.0); left.yOffset = _pathPoints[0].yOffset + ((_pathPoints[3].yOffset - _pathPoints[0].yOffset)/2.0); + left.zOffset = 0.0; // Anchors are at z 0.0 right.xOffset = _pathPoints[1].xOffset + ((_pathPoints[2].xOffset - _pathPoints[1].xOffset)/2.0); right.yOffset = _pathPoints[1].yOffset + ((_pathPoints[2].yOffset - _pathPoints[1].yOffset)/2.0); + right.zOffset = 0.0; top.xOffset = _pathPoints[0].xOffset + ((_pathPoints[1].xOffset - _pathPoints[0].xOffset)/2.0); top.yOffset = _pathPoints[0].yOffset + ((_pathPoints[1].yOffset - _pathPoints[0].yOffset)/2.0); + top.zOffset = 0.0; bottom.xOffset = _pathPoints[3].xOffset + ((_pathPoints[2].xOffset - _pathPoints[3].xOffset)/2.0); bottom.yOffset = _pathPoints[3].yOffset + ((_pathPoints[2].yOffset - _pathPoints[3].yOffset)/2.0); + bottom.zOffset = 0.0; _anchorPoints.push_back(left); _anchorPoints.push_back(right); *************** *** 937,940 **** --- 949,953 ---- to.xOffset = pt.xOffset + deltaX; to.yOffset = pt.yOffset + deltaY; + to.zOffset = ElevationAtPosition(to.xOffset, to.yOffset); if(n > 0) *************** *** 953,956 **** --- 966,971 ---- item.xOffset = (long)(from.xOffset + cos(angle)*subOff); item.yOffset = (long)(from.yOffset + sin(angle)*subOff); + item.zOffset = ElevationAtPosition(item.xOffset, item.yOffset); + spreadOut = IsPointNearPreviousElement(item, spacing); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-02 23:27:03
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv20620 Modified Files: Tag: Release_branch_v1 SimplePath.cpp Log Message: Add z-axis Index: SimplePath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/SimplePath.cpp,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** SimplePath.cpp 31 Oct 2005 02:50:20 -0000 1.17 --- SimplePath.cpp 2 Nov 2006 23:26:59 -0000 1.17.2.1 *************** *** 306,309 **** --- 306,310 ---- _anchorPoints[n].xOffset += offset.xOffset; _anchorPoints[n].yOffset += offset.yOffset; + _anchorPoints[n].zOffset += offset.zOffset; } } *************** *** 334,338 **** for(n = 0; n < count; n++) { ! stream->Read(sizeof(aPoint), &aPoint); AddAnchorPoint(aPoint); } --- 335,340 ---- for(n = 0; n < count; n++) { ! stream->Read(sizeof(double)*2, &aPoint); ! aPoint.zOffset = 0.0; AddAnchorPoint(aPoint); } *************** *** 341,345 **** for(n = 0; n < count; n++) { ! stream->Read(sizeof(aPoint), &aPoint); AddFixedItemPoint(aPoint); } --- 343,348 ---- for(n = 0; n < count; n++) { ! stream->Read(sizeof(double)*2, &aPoint); ! aPoint.zOffset = 0.0; AddFixedItemPoint(aPoint); } *************** *** 348,352 **** for(n = 0; n < count; n++) { ! stream->Read(sizeof(aPoint), &aPoint); AddElementPoint(aPoint); } --- 351,356 ---- for(n = 0; n < count; n++) { ! stream->Read(sizeof(double)*2, &aPoint); ! aPoint.zOffset = 0.0; AddElementPoint(aPoint); } *************** *** 832,838 **** --- 836,844 ---- destPoint.xOffset = pt.xOffset + deltaX; destPoint.yOffset = pt.yOffset + deltaY; + destPoint.zOffset = pt.zOffset; leftPoints->push_back(destPoint); destPoint.xOffset = pt.xOffset - deltaX; destPoint.yOffset = pt.yOffset - deltaY; + destPoint.zOffset = pt.zOffset; rightPoints->push_back(destPoint); } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:18:31
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1863 Modified Files: Tag: Release_branch_v1 Layout.cpp Path.cpp MaterialRef.h LinePath.cpp Path.h MaterialRef.cpp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: Path.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Path.cpp,v retrieving revision 1.67 retrieving revision 1.67.2.1 diff -C2 -d -r1.67 -r1.67.2.1 *** Path.cpp 24 Jun 2006 15:36:51 -0000 1.67 --- Path.cpp 1 Nov 2006 03:18:29 -0000 1.67.2.1 *************** *** 1095,1098 **** --- 1095,1105 ---- } + landscapeHeight_t Path::ElevationAtPosition( planLength_t x, planLength_t y ) + { + if(_owningElement != NULL) + return _owningElement->ElevationAtPosition(x,y); + else + return 0.0; + } #pragma mark PROTECTED *************** *** 1179,1182 **** --- 1186,1190 ---- if(ySpacing > 0) { + item.zOffset = 0.0; for(y = yStart, row=0; y < yEnd; y += ySpacing, row++) { *************** *** 1482,1485 **** --- 1490,1494 ---- center.xOffset = (long)(((double)(rect.xOffset+ rect.xSize)/2.0) + 0.5); center.yOffset = (long)(((double)(rect.yOffset+ rect.ySize)/2.0) + 0.5); + center.yOffset = (long)0.0; } Index: Path.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Path.h,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -C2 -d -r1.38 -r1.38.2.1 *** Path.h 22 Jun 2006 00:32:26 -0000 1.38 --- Path.h 1 Nov 2006 03:18:29 -0000 1.38.2.1 *************** *** 174,177 **** --- 174,178 ---- virtual void PlaceOneRowOfElementsInPath(planLength_t perpOffset, planLength_t startOffset, planLength_t spacing) {} virtual void ComputeBackdropPoints(PlanView* view, double xSize, double ySize); + landscapeHeight_t ElevationAtPosition( planLength_t x, planLength_t y ); protected: Index: MaterialRef.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/MaterialRef.cpp,v retrieving revision 1.119.2.1 retrieving revision 1.119.2.2 diff -C2 -d -r1.119.2.1 -r1.119.2.2 *** MaterialRef.cpp 29 Oct 2006 03:31:35 -0000 1.119.2.1 --- MaterialRef.cpp 1 Nov 2006 03:18:29 -0000 1.119.2.2 *************** *** 467,470 **** --- 467,471 ---- result.xOffset = center.xOffset; result.yOffset = center.yOffset; + result.zOffset = center.zOffset; switch(Index) { *************** *** 1468,1471 **** --- 1469,1473 ---- XGDirectory mkdir; materialType_t mtype; + planPoint_t centerPoint; PRECONDITION(view != NULL); *************** *** 1475,1479 **** PrepareToDraw(view, actualSize, plantVisible); view->SetLineColorToDefault(); - view->DrawSymbol(point, kPlanSymCenterPoint); if(plantVisible || ((mtype & kMajorMaterialType) != kMaterialTypePlant)) --- 1477,1480 ---- *************** *** 1481,1484 **** --- 1482,1486 ---- XGFileSpecifier spec; + centerPoint = point; glLineWidth (1.0); if(GetPlanDrawFile(spec)) *************** *** 1505,1508 **** --- 1507,1513 ---- GetLatestPlantDimensions(&height, &spread); + centerPoint.zOffset += height + 0.1; + view->DrawSymbol(centerPoint, kPlanSymCenterPoint); + view->SetItemSize(width, length, height, true); view->SetItemRotation(_rotation, point); *************** *** 1515,1518 **** --- 1520,1525 ---- else { + view->DrawSymbol(point, kPlanSymCenterPoint); + glPushAttrib(GL_CURRENT_BIT); glColor3f (0.0, 0.0, 0.0); *************** *** 1522,1526 **** err = glGetError(); glPushMatrix(); ! glTranslatef(point.xOffset, point.yOffset, kGraphicsZ); err = glGetError(); gluDisk(quad, 0, actualSize/2, 64, 16); --- 1529,1533 ---- err = glGetError(); glPushMatrix(); ! glTranslatef(point.xOffset, point.yOffset, point.zOffset); err = glGetError(); gluDisk(quad, 0, actualSize/2, 64, 16); *************** *** 1746,1749 **** --- 1753,1758 ---- GLenum err; short minYear, maxYear, primaryYear; + landscapeHeight_t height; + planLength_t spread; bool growX, growY; *************** *** 1769,1774 **** else { - landscapeHeight_t height; - planLength_t spread; GetPlantDimensions(&height, &spread, primaryYear); actualSize = spread; --- 1778,1781 ---- *************** *** 1798,1806 **** --- 1805,1816 ---- planPoint_t start, end; + height = TopElevation(intoView) + 0.1; if(growY) { start = GetIndexedAnchorPoint(kItemAnchorTop); + start.zOffset += height; intoView->DrawSymbol(start, kPlanSymAnchorPoint); end = GetIndexedAnchorPoint(kItemAnchorBottom); + end.zOffset += height; intoView->DrawSymbol(end, kPlanSymAnchorPoint); *************** *** 1816,1821 **** --- 1826,1833 ---- { start = GetIndexedAnchorPoint(kItemAnchorLeft); + start.zOffset += height; intoView->DrawSymbol(start, kPlanSymAnchorPoint); end = GetIndexedAnchorPoint(kItemAnchorRight); + end.zOffset += height; intoView->DrawSymbol(end, kPlanSymAnchorPoint); *************** *** 1906,1915 **** { PRECONDITION(heightPtr != NULL && spreadPtr != NULL); ! InstanceData *before, *after; ! bool isGiven; ! Int32 growthBitfield, maxHeight, maxSpread, temp32; ! double averageGrowthRate, yearsToMaxHt; ! planLength_t lastKnownHeight, temp; ! double sigmoidDenom, yearOffset; if(_material != NULL) --- 1918,1923 ---- { PRECONDITION(heightPtr != NULL && spreadPtr != NULL); ! Int32 growthBitfield; ! double averageGrowthRate; if(_material != NULL) *************** *** 3320,3324 **** { UInt32 n; ! planPoint_t point = { 0, 0 }; if(_path == NULL) --- 3328,3332 ---- { UInt32 n; ! planPoint_t point; if(_path == NULL) *************** *** 3509,3512 **** --- 3517,3538 ---- } + landscapeHeight_t MaterialRef::TopElevation(PlanView* view) + { + landscapeHeight_t height; + planLength_t spread; + + if((GetMaterialType() & kMajorMaterialType) == kMaterialTypePlant) + { + short minYear, maxYear, primaryYear; + + view->GetYearsDisplayed(minYear, maxYear, primaryYear); + GetPlantDimensions(&height, &spread, primaryYear); + } + else + GetLatestPlantDimensions(&height, &spread); + + return height; + } + #pragma mark PRIVATE Index: Layout.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Layout.cpp,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -C2 -d -r1.27 -r1.27.2.1 *** Layout.cpp 25 Oct 2005 00:55:27 -0000 1.27 --- Layout.cpp 1 Nov 2006 03:18:29 -0000 1.27.2.1 *************** *** 1013,1017 **** UInt32 n; Path *path; ! planPoint_t aPoint = { 0, 0 }; ref = _unusedMaterial->FindMaterial(materialID); --- 1013,1017 ---- UInt32 n; Path *path; ! planPoint_t aPoint; ref = _unusedMaterial->FindMaterial(materialID); Index: LinePath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/LinePath.cpp,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -C2 -d -r1.27 -r1.27.2.1 *** LinePath.cpp 5 Oct 2005 22:10:08 -0000 1.27 --- LinePath.cpp 1 Nov 2006 03:18:29 -0000 1.27.2.1 *************** *** 298,301 **** --- 298,302 ---- void LinePath::CreateTestPattern( Layer* layout, Material* material ) { + #if 0 Path *path; PathElement *element; *************** *** 313,319 **** plot->GetDimensions(planHeight, planWidth); ! planPoint_t start = { 10, planHeight-10 }, end = { 800, planHeight-800 }; ! planPoint_t matStart = { 10, planHeight-40 }, matEnd = { 1000, planHeight-1000 }; ! planPoint_t star[6] = {{40,planHeight-10}, {34,planHeight-30}, {50,planHeight-18}, {30,planHeight-18}, {46,planHeight-30}, {40,planHeight-10}}; path = new LinePath(start, end); --- 314,320 ---- plot->GetDimensions(planHeight, planWidth); ! planPoint_t start(10, planHeight-10, 0), end(800, planHeight-800, 0); ! planPoint_t matStart(10, planHeight-40, 0), matEnd(1000, planHeight-1000, 0 }; ! planPoint_t star[6] = {{40,planHeight-10, 0}, {34,planHeight-30, 0}, {50,planHeight-18, 0}, {30,planHeight-18, 0}, {46,planHeight-30, 0}, {40,planHeight-10, 0}}; path = new LinePath(start, end); *************** *** 337,340 **** --- 338,342 ---- layout->AddElement(ref); } + #endif } Index: MaterialRef.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/MaterialRef.h,v retrieving revision 1.43 retrieving revision 1.43.2.1 diff -C2 -d -r1.43 -r1.43.2.1 *** MaterialRef.h 26 Jun 2006 01:23:48 -0000 1.43 --- MaterialRef.h 1 Nov 2006 03:18:29 -0000 1.43.2.1 *************** *** 223,226 **** --- 223,227 ---- virtual void UserChangedAttribute(attributeID_t attributeID); virtual void RefreshElement(PlanView* intoView); + virtual landscapeHeight_t TopElevation(PlanView* view); protected: |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:18:21
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1835 Modified Files: Tag: Release_branch_v1 PlanCanvasView.cpp PlanGeometry.cpp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: PlanGeometry.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanGeometry.cpp,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** PlanGeometry.cpp 26 Jul 2005 10:50:43 -0000 1.9 --- PlanGeometry.cpp 1 Nov 2006 03:18:19 -0000 1.9.2.1 *************** *** 247,250 **** --- 247,251 ---- destPoint.xOffset = (long)objectX; destPoint.yOffset = (long)objectY; + destPoint.zOffset = 0.0; } // --------------------------------------------------------------------------- Index: PlanCanvasView.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/PlanCanvasView.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** PlanCanvasView.cpp 29 Oct 2006 03:31:24 -0000 1.13.2.1 --- PlanCanvasView.cpp 1 Nov 2006 03:18:19 -0000 1.13.2.2 *************** *** 202,205 **** --- 202,206 ---- point.xOffset = xOffset; point.yOffset = yOffset; + point.zOffset = 0.0; //!!! return DrawSymbol(point, symbol); } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:10:12
|
Update of /cvsroot/igarden/Garden/source/Plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30791 Modified Files: Tag: Release_branch_v1 DefaultRenderPlugin.cpp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: DefaultRenderPlugin.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/DefaultRenderPlugin.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** DefaultRenderPlugin.cpp 29 Oct 2006 03:31:48 -0000 1.13.2.1 --- DefaultRenderPlugin.cpp 1 Nov 2006 03:10:10 -0000 1.13.2.2 *************** *** 440,449 **** { pt = list[n]; ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); } if(closure == kFigureClosed) { pt = list[0]; ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); } glEnd(); --- 440,449 ---- { pt = list[n]; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); } if(closure == kFigureClosed) { pt = list[0]; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); } glEnd(); *************** *** 480,487 **** markLen = 5 * scale; glBegin(GL_LINES); ! glVertex3f (point.xOffset-markLen, point.yOffset, kGraphicsZ); ! glVertex3f (point.xOffset+markLen, point.yOffset, kGraphicsZ); ! glVertex3f (point.xOffset, point.yOffset-markLen, kGraphicsZ); ! glVertex3f (point.xOffset, point.yOffset+markLen, kGraphicsZ); glEnd(); result = kCanvasOK; --- 480,487 ---- markLen = 5 * scale; glBegin(GL_LINES); ! glVertex3f (point.xOffset-markLen, point.yOffset, point.zOffset); ! glVertex3f (point.xOffset+markLen, point.yOffset, point.zOffset); ! glVertex3f (point.xOffset, point.yOffset-markLen, point.zOffset); ! glVertex3f (point.xOffset, point.yOffset+markLen, point.zOffset); glEnd(); result = kCanvasOK; *************** *** 497,511 **** glColor4f (0.0, 0.0, 0.0, 1.0); glBegin(GL_POLYGON); ! glVertex3f (left, top, kGraphicsZ); ! glVertex3f (right, top, kGraphicsZ); ! glVertex3f (right, bottom, kGraphicsZ); ! glVertex3f (left, bottom, kGraphicsZ); glEnd(); glColor4f (1.0, 1.0, 1.0, 1.0); glBegin(GL_LINE_LOOP); ! glVertex3f (left-scale, top+scale, kGraphicsZ); ! glVertex3f (right+scale, top+scale, kGraphicsZ); ! glVertex3f (right+scale, bottom-scale, kGraphicsZ); ! glVertex3f (left-scale, bottom-scale, kGraphicsZ); glEnd(); glPopAttrib(); --- 497,511 ---- glColor4f (0.0, 0.0, 0.0, 1.0); glBegin(GL_POLYGON); ! glVertex3f (left, top, point.zOffset); ! glVertex3f (right, top, point.zOffset); ! glVertex3f (right, bottom, point.zOffset); ! glVertex3f (left, bottom, point.zOffset); glEnd(); glColor4f (1.0, 1.0, 1.0, 1.0); glBegin(GL_LINE_LOOP); ! glVertex3f (left-scale, top+scale, point.zOffset); ! glVertex3f (right+scale, top+scale, point.zOffset); ! glVertex3f (right+scale, bottom-scale, point.zOffset); ! glVertex3f (left-scale, bottom-scale, point.zOffset); glEnd(); glPopAttrib(); *************** *** 621,626 **** --- 621,628 ---- upperLeft.xOffset = center.xOffset - (_xSize/2); upperLeft.yOffset = center.yOffset - (_ySize/2); + upperLeft.zOffset = center.zOffset; lowerRight.xOffset = center.xOffset + (_xSize/2); lowerRight.yOffset = center.yOffset + (_ySize/2); + lowerRight.zOffset = center.zOffset; /**/ *************** *** 637,641 **** glPushMatrix(); { ! glTranslatef(center.xOffset, center.yOffset, kGraphicsZ); err = glGetError(); --- 639,643 ---- glPushMatrix(); { ! glTranslatef(center.xOffset, center.yOffset, center.zOffset+kGraphicsZ); err = glGetError(); *************** *** 705,708 **** --- 707,711 ---- pt.xOffset = center.xOffset + (cos(angle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(angle) * _fullSpread/2); + pt.zOffset = center.zOffset; glVertex3f (pt.xOffset, pt.yOffset, _zSize); *************** *** 710,714 **** pt.xOffset = center.xOffset + (cos(endAngle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(endAngle) * _fullSpread/2); ! glVertex3f (pt.xOffset, pt.yOffset, _zSize); glEnd(); } --- 713,718 ---- pt.xOffset = center.xOffset + (cos(endAngle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(endAngle) * _fullSpread/2); ! pt.zOffset = center.zOffset; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset+_zSize); glEnd(); } *************** *** 731,735 **** glEnd(); _picture->CopyImage(_view, left, top, ! _zSize+kPlantImageZ, _pictureWidth, _pictureHeight, 1.0, _scale); } } --- 735,739 ---- glEnd(); _picture->CopyImage(_view, left, top, ! center.zOffset+_zSize+kPlantImageZ, _pictureWidth, _pictureHeight, 1.0, _scale); } } |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:09:58
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30709 Modified Files: Tag: Release_branch_v1 CPlanPanel.cp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: CPlanPanel.cp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/CPlanPanel.cp,v retrieving revision 1.43 retrieving revision 1.43.2.1 diff -C2 -d -r1.43 -r1.43.2.1 *** CPlanPanel.cp 22 Jun 2006 11:34:35 -0000 1.43 --- CPlanPanel.cp 1 Nov 2006 03:09:56 -0000 1.43.2.1 *************** *** 1054,1057 **** --- 1054,1058 ---- newPos.xOffset = xOffset; newPos.yOffset = yOffset; + newPos.zOffset = 0.0; glColor3f (0.0, 0.0, 0.0); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:09:50
|
Update of /cvsroot/igarden/Garden/source/LayoutDB In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30687 Modified Files: Tag: Release_branch_v1 BSPNode.cpp FreehandPath.cpp GardenPlot.h DimensionLine.cpp Element.cpp GardenPlot.cpp ArcPath.cpp Element.h Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: Element.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.cpp,v retrieving revision 1.40 retrieving revision 1.40.2.1 diff -C2 -d -r1.40 -r1.40.2.1 *** Element.cpp 13 Jan 2006 22:53:20 -0000 1.40 --- Element.cpp 1 Nov 2006 03:09:47 -0000 1.40.2.1 *************** *** 43,46 **** --- 43,47 ---- #include "RGCompression.h" #include <XGFile.h> + #include "GardenPlot.h" const rsuid_t ElementUID = { 0xb672, 0xc187, 0x0006, 0xd935 }; *************** *** 1003,1006 **** --- 1004,1022 ---- } + landscapeHeight_t Element::ElevationAtPosition( planLength_t x, planLength_t y ) + { + GardenPlot *plot = GetPlot(); + if(plot != NULL) + return plot->ElevationAtPosition(x, y); + else + return 0.0; + } + + landscapeHeight_t Element::TopElevation(PlanView* view) + { + return 0.0; + } + + #pragma mark PROTECTED Index: Element.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/Element.h,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -C2 -d -r1.38 -r1.38.2.1 *** Element.h 13 Jan 2006 22:53:20 -0000 1.38 --- Element.h 1 Nov 2006 03:09:47 -0000 1.38.2.1 *************** *** 202,205 **** --- 202,207 ---- virtual void PrintPathName() {} bool _converted; + landscapeHeight_t ElevationAtPosition( planLength_t x, planLength_t y ); + virtual landscapeHeight_t TopElevation(PlanView* view); protected: Index: GardenPlot.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/GardenPlot.h,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** GardenPlot.h 22 Sep 2005 01:41:37 -0000 1.19 --- GardenPlot.h 1 Nov 2006 03:09:47 -0000 1.19.2.1 *************** *** 134,137 **** --- 134,138 ---- bool IsAerialPicturePresent() { return _aerialPhoto != NULL; } MaterialRef* FindMaterial( materialID_t materialID ); + landscapeHeight_t ElevationAtPosition( planLength_t x, planLength_t y ) { return 0.0; } private: Index: BSPNode.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/BSPNode.cpp,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -C2 -d -r1.28 -r1.28.2.1 *** BSPNode.cpp 31 Oct 2005 02:30:47 -0000 1.28 --- BSPNode.cpp 1 Nov 2006 03:09:47 -0000 1.28.2.1 *************** *** 526,530 **** if(IntersectsRect(within)) { ! Int32 n, count; count = _elements.Length(); --- 526,532 ---- if(IntersectsRect(within)) { ! Int32 n, count; ! landscapeHeight_t maxHeight = 0.0, height; ! Element *maxElem = NULL; count = _elements.Length(); *************** *** 538,546 **** pt.xOffset = within.xOffset; pt.yOffset = within.yOffset; if(elem->IsPointOver(pt, view)) { ! selected->AddSelectedElements(elem); ! result = true; ! break; // Only return 1st element for point } } --- 540,552 ---- pt.xOffset = within.xOffset; pt.yOffset = within.yOffset; + pt.zOffset = 0.0; if(elem->IsPointOver(pt, view)) { ! height = elem->TopElevation(view); ! if(height >= maxHeight) ! { ! maxElem = elem; ! maxHeight = height; ! } } } *************** *** 554,557 **** --- 560,566 ---- } } + + if(maxElem != NULL) + selected->AddSelectedElements(maxElem); if(!_isLeaf) *************** *** 591,594 **** --- 600,605 ---- pt.xOffset = within.xOffset; pt.yOffset = within.yOffset; + pt.zOffset = 0; + if(elem->IsPointOver(pt, view)) { Index: ArcPath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/ArcPath.cpp,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -C2 -d -r1.19 -r1.19.2.1 *** ArcPath.cpp 22 Jun 2006 00:35:57 -0000 1.19 --- ArcPath.cpp 1 Nov 2006 03:09:47 -0000 1.19.2.1 *************** *** 44,47 **** --- 44,49 ---- center.xOffset = 0.0; center.yOffset = 0.0; + center.zOffset = 0.0; + AddAnchorPoint( center ); AddAnchorPoint( center ); *************** *** 298,302 **** { pt = GetIndexedPathPoint(n); ! planView->AddTessPoint(pt.xOffset, pt.yOffset, kBackGroundZ); } planView->EndTessContour(); --- 300,304 ---- { pt = GetIndexedPathPoint(n); ! planView->AddTessPoint(pt.xOffset, pt.yOffset, pt.zOffset); } planView->EndTessContour(); *************** *** 316,320 **** planLength_t offset, rad; planAngle_t angle; ! planPoint_t pt, center, startPt1 = { 0,0}, startPt2 = { 0,0}, endPt1 = { 0,0}, endPt2 = { 0,0}; long n, pointCount; --- 318,322 ---- planLength_t offset, rad; planAngle_t angle; ! planPoint_t pt, center, startPt1(0,0,0), startPt2(0,0,0), endPt1(0,0,0), endPt2(0,0,0); long n, pointCount; *************** *** 333,337 **** pt.xOffset = center.xOffset + (cos(angle) * rad); pt.yOffset = center.yOffset + (sin(angle) * rad); ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); if(n == 0) startPt1 = pt; --- 335,340 ---- pt.xOffset = center.xOffset + (cos(angle) * rad); pt.yOffset = center.yOffset + (sin(angle) * rad); ! pt.zOffset = center.zOffset; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); if(n == 0) startPt1 = pt; *************** *** 347,351 **** pt.xOffset = center.xOffset + (cos(angle) * rad); pt.yOffset = center.yOffset + (sin(angle) * rad); ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); if(n == 0) endPt2 = pt; --- 350,355 ---- pt.xOffset = center.xOffset + (cos(angle) * rad); pt.yOffset = center.yOffset + (sin(angle) * rad); ! pt.zOffset = center.zOffset; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); if(n == 0) endPt2 = pt; *************** *** 357,366 **** { glBegin(GL_LINES); ! glVertex3f (startPt2.xOffset, startPt2.yOffset, kGraphicsZ); ! glVertex3f (startPt1.xOffset, startPt1.yOffset, kGraphicsZ); glEnd(); glBegin(GL_LINES); ! glVertex3f (endPt2.xOffset, endPt2.yOffset, kGraphicsZ); ! glVertex3f (endPt1.xOffset, endPt1.yOffset, kGraphicsZ); glEnd(); } --- 361,370 ---- { glBegin(GL_LINES); ! glVertex3f (startPt2.xOffset, startPt2.yOffset, pt.zOffset); ! glVertex3f (startPt1.xOffset, startPt1.yOffset, pt.zOffset); glEnd(); glBegin(GL_LINES); ! glVertex3f (endPt2.xOffset, endPt2.yOffset, pt.zOffset); ! glVertex3f (endPt1.xOffset, endPt1.yOffset, pt.zOffset); glEnd(); } *************** *** 538,543 **** --- 542,549 ---- center.xOffset = rect.xOffset + 100; center.yOffset = (rect.yOffset + rect.ySize) - 100; + center.zOffset = 0.0; edge.xOffset = rect.xOffset; edge.yOffset = (rect.yOffset + rect.ySize) - 100; + edge.zOffset = 0.0; path = new ArcPath::ArcPath(center, edge); *************** *** 612,615 **** --- 618,622 ---- point.xOffset = center.xOffset + (cos(angle) * (_radius + perpOffset)); point.yOffset = center.yOffset + (sin(angle) * (_radius + perpOffset)); + point.zOffset = center.zOffset; AddElementPoint(point); } *************** *** 756,763 **** --- 763,772 ---- point.xOffset = center.xOffset + (cos(angle) * _radius); point.yOffset = center.yOffset + (sin(angle) * _radius); + point.zOffset = center.zOffset; _pathPoints[n] = point; } point.xOffset = center.xOffset + (cos(_endAngle) * _radius); point.yOffset = center.yOffset + (sin(_endAngle) * _radius); + point.zOffset = center.zOffset; SimplePath::ChangeIndexedAnchorPoint(kPointAnchorArcEnd, point); Index: GardenPlot.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/GardenPlot.cpp,v retrieving revision 1.50 retrieving revision 1.50.2.1 diff -C2 -d -r1.50 -r1.50.2.1 *** GardenPlot.cpp 7 Jun 2006 00:10:51 -0000 1.50 --- GardenPlot.cpp 1 Nov 2006 03:09:47 -0000 1.50.2.1 *************** *** 785,792 **** fixOffset.xOffset = _plotXOffset; fixOffset.yOffset = _plotYOffset; } else { ! fixOffset.xOffset = fixOffset.yOffset = 0.0; } --- 785,793 ---- fixOffset.xOffset = _plotXOffset; fixOffset.yOffset = _plotYOffset; + fixOffset.zOffset = 0.0; } else { ! fixOffset.xOffset = fixOffset.yOffset = fixOffset.zOffset = 0.0; } Index: DimensionLine.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/DimensionLine.cpp,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** DimensionLine.cpp 27 Oct 2005 03:03:45 -0000 1.11 --- DimensionLine.cpp 1 Nov 2006 03:09:47 -0000 1.11.2.1 *************** *** 95,101 **** tagX = _end.xOffset+_overshootDx+(30*_defaultScale); glBegin(GL_LINES); ! glVertex3f (_start.xOffset, _start.yOffset, kGraphicsZ); ! glVertex3f (_end.xOffset+_overshootDx, _end.yOffset+_overshootDy, kGraphicsZ); ! glVertex3f (_end.xOffset+_overshootDx, _end.yOffset+_overshootDy, kGraphicsZ); glVertex3f (tagX, _end.yOffset+_overshootDy, kGraphicsZ); glEnd(); --- 95,101 ---- tagX = _end.xOffset+_overshootDx+(30*_defaultScale); glBegin(GL_LINES); ! glVertex3f (_start.xOffset, _start.yOffset, _start.zOffset); ! glVertex3f (_end.xOffset+_overshootDx, _end.yOffset+_overshootDy, _end.zOffset); ! glVertex3f (_end.xOffset+_overshootDx, _end.yOffset+_overshootDy, _end.zOffset); glVertex3f (tagX, _end.yOffset+_overshootDy, kGraphicsZ); glEnd(); *************** *** 108,113 **** { glBegin(GL_LINES); ! glVertex3f (_start.xOffset, _start.yOffset, kGraphicsZ); ! glVertex3f (_end.xOffset, _end.yOffset, kGraphicsZ); glEnd(); } --- 108,113 ---- { glBegin(GL_LINES); ! glVertex3f (_start.xOffset, _start.yOffset, _start.zOffset); ! glVertex3f (_end.xOffset, _end.yOffset, _end.zOffset); glEnd(); } *************** *** 119,125 **** { glBegin(GL_LINE_STRIP); ! glVertex3f (_end.xOffset + _arrowDx1, _end.yOffset + _arrowDy1, kGraphicsZ); ! glVertex3f (_end.xOffset, _end.yOffset, kGraphicsZ); ! glVertex3f (_end.xOffset + _arrowDx2, _end.yOffset + _arrowDy2, kGraphicsZ); glEnd(); } --- 119,125 ---- { glBegin(GL_LINE_STRIP); ! glVertex3f (_end.xOffset + _arrowDx1, _end.yOffset + _arrowDy1, _end.zOffset); ! glVertex3f (_end.xOffset, _end.yOffset, _end.zOffset); ! glVertex3f (_end.xOffset + _arrowDx2, _end.yOffset + _arrowDy2, _end.zOffset); glEnd(); } *************** *** 127,138 **** { glBegin(GL_LINE_STRIP); ! glVertex3f (_start.xOffset + _arrowDx1, _start.yOffset + _arrowDy1, kGraphicsZ); ! glVertex3f (_start.xOffset, _start.yOffset, kGraphicsZ); ! glVertex3f (_start.xOffset + _arrowDx2, _start.yOffset + _arrowDy2, kGraphicsZ); glEnd(); glBegin(GL_LINE_STRIP); ! glVertex3f (_end.xOffset - _arrowDx1, _end.yOffset - _arrowDy1, kGraphicsZ); ! glVertex3f (_end.xOffset, _end.yOffset, kGraphicsZ); ! glVertex3f (_end.xOffset - _arrowDx2, _end.yOffset - _arrowDy2, kGraphicsZ); glEnd(); } --- 127,138 ---- { glBegin(GL_LINE_STRIP); ! glVertex3f (_start.xOffset + _arrowDx1, _start.yOffset + _arrowDy1, _start.zOffset); ! glVertex3f (_start.xOffset, _start.yOffset, _start.zOffset); ! glVertex3f (_start.xOffset + _arrowDx2, _start.yOffset + _arrowDy2, _start.zOffset); glEnd(); glBegin(GL_LINE_STRIP); ! glVertex3f (_end.xOffset - _arrowDx1, _end.yOffset - _arrowDy1, _end.zOffset); ! glVertex3f (_end.xOffset, _end.yOffset, _end.zOffset); ! glVertex3f (_end.xOffset - _arrowDx2, _end.yOffset - _arrowDy2, _end.zOffset); glEnd(); } *************** *** 142,149 **** { glBegin(GL_LINES); ! glVertex3f (_start.xOffset - _projectionDx, _start.yOffset - _projectionDy, kGraphicsZ); ! glVertex3f (_start.xOffset + _projectionDx, _start.yOffset + _projectionDy, kGraphicsZ); ! glVertex3f (_end.xOffset - _projectionDx, _end.yOffset - _projectionDy, kGraphicsZ); ! glVertex3f (_end.xOffset + _projectionDx, _end.yOffset + _projectionDy, kGraphicsZ); glEnd(); } --- 142,149 ---- { glBegin(GL_LINES); ! glVertex3f (_start.xOffset - _projectionDx, _start.yOffset - _projectionDy, _start.zOffset); ! glVertex3f (_start.xOffset + _projectionDx, _start.yOffset + _projectionDy, _start.zOffset); ! glVertex3f (_end.xOffset - _projectionDx, _end.yOffset - _projectionDy, _end.zOffset); ! glVertex3f (_end.xOffset + _projectionDx, _end.yOffset + _projectionDy, _end.zOffset); glEnd(); } *************** *** 164,170 **** { glBegin(GL_LINE_STRIP); ! glVertex3f (end.xOffset - _backupDx - (_arrowLen*_arrowDx1), end.yOffset - _backupDy - (_arrowLen*_arrowDy1), kGraphicsZ); ! glVertex3f (end.xOffset - _backupDx, end.yOffset - _backupDy, kGraphicsZ); ! glVertex3f (end.xOffset - _backupDx - (_arrowLen*_arrowDx2), end.yOffset - _backupDy - (_arrowLen*_arrowDy2), kGraphicsZ); glEnd(); } --- 164,170 ---- { glBegin(GL_LINE_STRIP); ! glVertex3f (end.xOffset - _backupDx - (_arrowLen*_arrowDx1), end.yOffset - _backupDy - (_arrowLen*_arrowDy1), _end.zOffset); ! glVertex3f (end.xOffset - _backupDx, end.yOffset - _backupDy, _end.zOffset); ! glVertex3f (end.xOffset - _backupDx - (_arrowLen*_arrowDx2), end.yOffset - _backupDy - (_arrowLen*_arrowDy2), _end.zOffset); glEnd(); } Index: FreehandPath.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/LayoutDB/FreehandPath.cpp,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -C2 -d -r1.41 -r1.41.2.1 *** FreehandPath.cpp 8 Oct 2005 20:07:14 -0000 1.41 --- FreehandPath.cpp 1 Nov 2006 03:09:47 -0000 1.41.2.1 *************** *** 532,535 **** --- 532,536 ---- to.xOffset = pt.xOffset + deltaX; to.yOffset = pt.yOffset + deltaY; + to.zOffset = pt.zOffset; if(n > 0) *************** *** 548,551 **** --- 549,553 ---- item.xOffset = (long)(from.xOffset + cos(angle)*subOff); item.yOffset = (long)(from.yOffset + sin(angle)*subOff); + item.zOffset = (long)from.zOffset; spreadOut = IsPointNearPreviousElement(item, spacing); |
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:09:41
|
Update of /cvsroot/igarden/Garden/source/PlanTool In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30676 Modified Files: Tag: Release_branch_v1 FreehandTool.cpp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: FreehandTool.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/PlanTool/FreehandTool.cpp,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -C2 -d -r1.20 -r1.20.2.1 *** FreehandTool.cpp 27 Oct 2005 00:34:30 -0000 1.20 --- FreehandTool.cpp 1 Nov 2006 03:09:38 -0000 1.20.2.1 *************** *** 356,359 **** --- 356,360 ---- testPoint.xOffset = (long)(_doubleXPos[posIndex] + 0.5); testPoint.yOffset = (long)(_doubleYPos[posIndex] + 0.5); + testPoint.zOffset = (long)0; } path->ChangeIndexedAnchorPoint(oneElem, testPoint); |