SEToolbox.Models.Import3DModelModel.Load C# (CSharp) Method

Load() public method

public Load ( VRage.MyPositionAndOrientation characterPosition ) : void
characterPosition VRage.MyPositionAndOrientation
return void
        public void Load(MyPositionAndOrientation characterPosition)
        {
            CharacterPosition = characterPosition;
        }

Usage Example

コード例 #1
0
        public void Test3Executed()
        {
            var model = new Import3DModelModel();
            var position = ThePlayerCharacter != null ? ThePlayerCharacter.PositionAndOrientation.Value : new MyPositionAndOrientation(Vector3D.Zero, Vector3.Forward, Vector3.Up);
            model.Load(position);
            var loadVm = new Import3DModelViewModel(this, model);

            loadVm.ArmorType = ImportArmorType.Light;
            loadVm.BuildDistance = 10;
            loadVm.ClassType = ImportModelClassType.SmallShip;
            loadVm.Filename = @"D:\Development\SpaceEngineers\building 3D\models\algos.obj";
            loadVm.Forward = new BindableVector3DModel(Vector3.Forward);
            loadVm.IsMaxLengthScale = false;
            loadVm.IsMultipleScale = true;
            loadVm.IsValidModel = true;
            loadVm.MultipleScale = 1;
            loadVm.Up = new BindableVector3DModel(Vector3.Up);

            IsBusy = true;
            var newEntity = loadVm.BuildEntity();

            // Split object where X=28|29.
            ((MyObjectBuilder_CubeGrid)newEntity).CubeBlocks.RemoveAll(c => c.Min.X <= 28);

            _selectNewStructure = true;
            _dataModel.CollisionCorrectEntity(newEntity);
            _dataModel.AddEntity(newEntity);
            _selectNewStructure = false;
            IsBusy = false;
        }
All Usage Examples Of SEToolbox.Models.Import3DModelModel::Load
Import3DModelModel