X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/870fa143f6a703e4f4432097ce8332ab3f15e4ad..0391c237272d90acfc769f4aeebe0554d47f74cb:/culooks_cube.cpp diff --git a/culooks_cube.cpp b/culooks_cube.cpp index 2bf8804..412b1d9 100644 --- a/culooks_cube.cpp +++ b/culooks_cube.cpp @@ -59,9 +59,10 @@ void culooks::cube::draw() glDisable(GL_BLEND); glPushMatrix(); glScalef(zoom*1.01, zoom*1.01, zoom*1.01); - glRotatef(az, 0, 1, 0); glRotatef(alt, 1, 0, 0); + glRotatef(az, 0, 1, 0); glColor4f(wireColor[0], wireColor[1], wireColor[2], wireColor[3]); + glLineWidth(framewidth); glutWireCube(2); glPopMatrix(); @@ -70,8 +71,8 @@ void culooks::cube::draw() glEnable(GL_BLEND); glPushMatrix(); glScalef(zoom, zoom, zoom); - glRotatef(az, 0, 1, 0); glRotatef(alt, 1, 0, 0); + glRotatef(az, 0, 1, 0); drawAll(); glPopMatrix(); @@ -92,6 +93,8 @@ void culooks::cube::drawAll() 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); @@ -113,6 +116,8 @@ void culooks::cube::drawAll() glEnd(); } + glLineWidth(1); + /* draw plaquettes */ if (!hideplaquettes) { glBegin(GL_QUADS); @@ -157,9 +162,9 @@ culooks::cube::cube(int _l) link = linkbuf[0]; plaq = plaqbuf[0]; - az = 30; - alt = -20; - zoom = 0.6; + az = 45; + alt = -30; + zoom = 0.57; id = allid; allid++; @@ -180,3 +185,11 @@ void culooks::cube::setWireColor(const float& r, const float& g, const float& b, wireColor[2] = b; wireColor[3] = a; } + +void culooks::cube::setFrameWidth(float width) { + framewidth = width; +} + +void culooks::cube::setLinkWidth(float width) { + linkwidth = width; +}