from visual import *

class Bonds:
    def __init__(self):
        self.boxx = box(visible=0)
        self.boxy = box(visible=0)
        self.tvBonds = 0

    def setColors(self, colorx, colory):
        self.boxx.color = colorx
        self.boxy.color = colory

    def setBoxesX(self, boxxPos, length, width, height):
        self.boxx = box(pos=boxxPos, length=length, width=width, height=height, color=(.7,.7,.7), visible=self.tvBonds)

    def setBoxesY(self, boxyPos, length, width, height):
        self.boxy = box(pos=boxyPos, length=length, width=width, height=height, color=(.7,.7,.7), visible=self.tvBonds)

    def toggleBondVisibility(self):
        self.tvBonds = (self.tvBonds+1)%2
        self.boxx.visible = self.tvBonds
        self.boxy.visible = self.tvBonds




        
