Win->initialized = false;
- Win->linewidth = 1;
+ //Win->linewidth = 1;
Windows.push_back( pair<int,culooks::window*>(0, Win) );
Windows[mywid].second->cubes[icube].setWireColor(r, g, b, a);
}
-void culooks::setLineWidth(float width)
+void culooks::setFrameWidth(float width)
{
- Windows[mywid].second->linewidth = width;
+ for (int icube=0; icube<Windows[mywid].second->cubes.size(); icube++)
+ Windows[mywid].second->cubes[icube].setFrameWidth(width);
+}
+
+void culooks::setLinkWidth(float width)
+{
+ for (int icube=0; icube<Windows[mywid].second->cubes.size(); icube++)
+ Windows[mywid].second->cubes[icube].setLinkWidth(width);
}
void hideLinks();
void setBgColor(const float& red, const float& green, const float& blue, const float& alpha);
void setWireColor(const float& r, const float& g, const float& b, const float& a);
- void setLineWidth(float width);
+ void setFrameWidth(float width);
+ void setLinkWidth(float width);
private:
void hidePlaqs();
void hideLinks();
void setWireColor(const float& r, const float& g, const float& b, const float& a);
+ void setFrameWidth(float width);
+ void setLinkWidth(float width);
private:
float wireColor[4];
void drawAll();
static int allid;
bool hideplaquettes;
bool hidelinks;
+ float framewidth;
+ float linkwidth;
};
struct window {
string name;
float bgcolor[4];
bool redisplay;
- float linewidth;
};
class drawing
glRotatef(az, 0, 1, 0);
glRotatef(alt, 1, 0, 0);
glColor4f(wireColor[0], wireColor[1], wireColor[2], wireColor[3]);
+ glLineWidth(framewidth);
glutWireCube(2);
glPopMatrix();
glTranslatef(2.0*ix/l,2.0*iy/l,2.0*iz/l);
glScalef(2.0/l,2.0/l,2.0/l);
+ glLineWidth(linkwidth);
+
/* draw links */
if (!hidelinks) {
glBegin(GL_LINES);
glEnd();
}
+ glLineWidth(1);
+
/* draw plaquettes */
if (!hideplaquettes) {
glBegin(GL_QUADS);
wireColor[2] = b;
wireColor[3] = a;
}
+
+void culooks::cube::setFrameWidth(float width) {
+ framewidth = width;
+}
+
+void culooks::cube::setLinkWidth(float width) {
+ linkwidth = width;
+}
{
culooks::window *Win = getWin();
- glLineWidth(Win->linewidth);
-
glClearColor(Win->bgcolor[0], Win->bgcolor[1], Win->bgcolor[2], Win->bgcolor[3]);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);