Test visibility

I need help from the experts. The 3d graphics has 3 object which I want to hide an unhide "simultaneously" with a checkbox. Hexagon poly1, triangle t1 and triangle t2. The problem is that t2 of them are always undefined, and which those are is defined by the position of point J. I have not found a way of adding objects to be made visible or unvisible to a check box after the checkbox is defined? How can I accomplish what I need