[brlcad-commits] SF.net SVN: brlcad:[35390] brlcad/trunk/src/conv/3dm/3dm-g.cpp
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2009-07-29 21:37:39
|
Revision: 35390 http://brlcad.svn.sourceforge.net/brlcad/?rev=35390&view=rev Author: starseeker Date: 2009-07-29 21:37:32 +0000 (Wed, 29 Jul 2009) Log Message: ----------- All red for all regions is getting boring - make it random until we figure out if there is color info in there and how to extract it. Modified Paths: -------------- brlcad/trunk/src/conv/3dm/3dm-g.cpp Modified: brlcad/trunk/src/conv/3dm/3dm-g.cpp =================================================================== --- brlcad/trunk/src/conv/3dm/3dm-g.cpp 2009-07-29 21:15:59 UTC (rev 35389) +++ brlcad/trunk/src/conv/3dm/3dm-g.cpp 2009-07-29 21:37:32 UTC (rev 35390) @@ -172,10 +172,15 @@ ON_MorphControl *morphctrl; ON_Group *group; ON_Geometry *geom; + int r,g,b; + r = int(256*drand48() + 1.0); + g = int(256*drand48() + 1.0); + b = int(256*drand48() + 1.0); + bu_log("Color: %d,%d,%d\n", r,g,b); if ((brep = const_cast<ON_Brep * >(ON_Brep::Cast(pGeometry)))) { mk_id(outfp, id_name); mk_brep(outfp, geom_name.c_str(), brep); - unsigned char rgb[] = {255,0,0}; + unsigned char rgb[] = {r,g,b}; mk_region1(outfp, region_name.c_str(), geom_name.c_str(), "plastic", "", rgb); // brep->Dump(*dump); // on if debug or verbose dump->PopIndent(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |