//Object private void radioButton_objectStatic_CheckedChanged(object sender, EventArgs e) { if (radioButton_objectStatic.Checked) { SetObjectPositionControlsEnabled(true); this.MeshActionType = MeshAction.Static; } }
private void radioButton_objectRotating_CheckedChanged(object sender, EventArgs e) { if (radioButton_objectRotating.Checked) { SetObjectPositionControlsEnabled(false); this.MeshActionType = MeshAction.Rotating; } }
private void SetupMeshes() { this.MeshActionType = MeshAction.Static; //Load meshes from Json var mainMeshFile = _device.LoadJsonFile("sphere.babylon"); var centerMeshFile = _device.LoadJsonFile("cube.babylon"); _mainMesh = mainMeshFile[0]; _centerMesh = centerMeshFile[0]; _mainMesh.PositionChanged += _mainMesh_PositionChanged; _mainMesh.RotationChanged += _mainMesh_RotationChanged; _mainMesh.ScaleChanged += _mainMesh_ScaleChanged; _mainMesh.Position = new Vector3(2, 0, 2); _mainMesh.Rotation = new Vector3(0, 0, 0); _centerMesh.Scale = new Vector3(0.5, 0.5, 0.5); }