public void attach(View3DShape shape) {
this.shape = shape; // caller will decide whether to notifyChange() the shape or not
if (canvas!=null) view.removeCanvas3D(canvas);
Rectangle bounds = shape.getBounds();
canvas = new PBufferCanvas3D(bounds.width,bounds.height);
transformator.setWSize(Math.min(bounds.width,bounds.height));
transformator.updateZoomMatrix();
view.addCanvas3D(canvas);
}