X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/f9812559e766a409abfbd2d3bae519298339ab65..77794fd69f839fbaefe813ea5ea45601aa056da0:/culooks.cpp?ds=inline diff --git a/culooks.cpp b/culooks.cpp index a1f386f..6e7fded 100644 --- a/culooks.cpp +++ b/culooks.cpp @@ -7,6 +7,7 @@ vector< pair > culooks::Windows; pthread_t culooks::glThreadId; +culooks::comarg culooks::comArg; int culooks::windowid = 0; @@ -41,15 +42,15 @@ culooks::culooks (const char* name, const int& xcubes, const int& ycubes, const Win->initialized = false; + //Win->linewidth = 1; + Windows.push_back( pair(0, Win) ); - + if (windowid == 0) { - comarg comArg; comArg.argc = argc; comArg.argv = argv; pthread_create(&glThreadId, 0, &drawing::glutThread, &comArg); } - mywid = windowid; windowid++; } @@ -99,3 +100,21 @@ void culooks::setBgColor(const float& red, const float& green, const float& blue Windows[mywid].second->bgcolor[2] = blue; Windows[mywid].second->bgcolor[3] = alpha; } + +void culooks::setWireColor(const float& r, const float& g, const float& b, const float& a) +{ + for (int icube=0; icubecubes.size(); icube++) + Windows[mywid].second->cubes[icube].setWireColor(r, g, b, a); +} + +void culooks::setFrameWidth(float width) +{ + for (int icube=0; icubecubes.size(); icube++) + Windows[mywid].second->cubes[icube].setFrameWidth(width); +} + +void culooks::setLinkWidth(float width) +{ + for (int icube=0; icubecubes.size(); icube++) + Windows[mywid].second->cubes[icube].setLinkWidth(width); +}