X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/5a4132d73bb1872523e9a7fccfa38cffbd551dda..f9812559e766a409abfbd2d3bae519298339ab65:/culooks_cube.cpp?ds=sidebyside diff --git a/culooks_cube.cpp b/culooks_cube.cpp index 29976e4..a1d0744 100644 --- a/culooks_cube.cpp +++ b/culooks_cube.cpp @@ -4,17 +4,73 @@ int culooks::cube::allid = 0; +void culooks::cube::setLink (const int& posdir, + const float& red, const float& green, const float& blue, const float& alpha) { + linkbuf[(linkbuf_active+1)%2][ posdir*4 ] = red; + linkbuf[(linkbuf_active+1)%2][ posdir*4 + 1 ] = green; + linkbuf[(linkbuf_active+1)%2][ posdir*4 + 2 ] = blue; + linkbuf[(linkbuf_active+1)%2][ posdir*4 + 3 ] = alpha; +} + +void culooks::cube::setPlaq (const int& posdir, + const float& red, const float& green, const float& blue, const float& alpha) { + plaqbuf[(plaqbuf_active+1)%2][ posdir*4 ] = red; + plaqbuf[(plaqbuf_active+1)%2][ posdir*4 + 1 ] = green; + plaqbuf[(plaqbuf_active+1)%2][ posdir*4 + 2 ] = blue; + plaqbuf[(plaqbuf_active+1)%2][ posdir*4 + 3 ] = alpha; +} + +void culooks::cube::hidePlaqs() +{ + for (int ibuf=0; ibuf<2; ibuf++) + for (int i=0; i