예제 #1
0
파일: MainForm.cs 프로젝트: Bajena/3dEngine
 //Object
 private void radioButton_objectStatic_CheckedChanged(object sender, EventArgs e)
 {
     if (radioButton_objectStatic.Checked)
     {
         SetObjectPositionControlsEnabled(true);
         this.MeshActionType = MeshAction.Static;
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: Bajena/3dEngine
        private void radioButton_objectRotating_CheckedChanged(object sender, EventArgs e)
        {
            if (radioButton_objectRotating.Checked)
            {
                SetObjectPositionControlsEnabled(false);

                this.MeshActionType = MeshAction.Rotating;
            }
        }
예제 #3
0
파일: MainForm.cs 프로젝트: Bajena/3dEngine
        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);
        }