private static ComplexCuboidModel GenerateButtonModel(float size, float border, float height) { ComplexCuboidModel model = new ComplexCuboidModel(); // TODO Add material somehow model.Add(Vector3.zero, new CuboidModel(size, size, height)); model.Add(new Vector3(border, border, -height), new CuboidModel(size - 2 * border, size - 2 * border, height)); return(model); }
private ComplexCuboidModel CreateButtonModel() { var size = GetButtonSize(); var height = GetButtonHeight(); var border = GetButtonBorder(); ComplexCuboidModel model = new ComplexCuboidModel(); model.Add(Vector3.zero, new CuboidModel(size, size, height, Model.PlateMaterial)); model.Add(new Vector3(border, border, -height), new CuboidModel(size - 2 * border, size - 2 * border, height, Model.ButtonMaterial)); return(model); }