/// <summary>
        /// Creates new instance of prefab configuration without model
        /// </summary>
        /// <param name="buildType">Build type</param>
        /// <param name="categoryType">Category type</param>
        /// <param name="subCategoryType">Subcategory type</param>
        /// <param name="materialType">Material type</param>
        /// <param name="prefabTypeFlag">Prefab type flags</param>
        /// <param name="factionSpecific">To which faction is this prefab specific. Null if prefab is for all factions. Used for material (texture) set availability. </param>
        /// <param name="previewPointOfView">Indicates whether the preview image for this prefab should be from a different angle than normal. Use for flat objects that have incorrect default previews (such as signs). </param>
        protected MyPrefabConfiguration(
            BuildTypesEnum buildType,
            CategoryTypesEnum categoryType,
            SubCategoryTypesEnum? subCategoryType,
            MyMaterialType materialType,
            PrefabTypesFlagEnum prefabTypeFlag,
            MyMwcObjectBuilder_Prefab_AppearanceEnum? factionSpecific = null,
            bool needsUpdate = false,
            bool initPhysics = true,
            bool enabledInEditor = true,
            float rotatingVelocity = DEFAULT_ROTATING_VELOCITY,
            MySoundCuesEnum? startRotatingCue = null,
            MySoundCuesEnum? loopRotatingCue = null,
            MySoundCuesEnum? loopRotatingDamagedCue = null,
            MySoundCuesEnum? endRotatingCue = null,
            MyPreviewPointOfViewEnum previewPointOfView = MyPreviewPointOfViewEnum.Front,
            float minElectricCapacity = MyGameplayConstants.DEFAULT_MIN_ELECTRIC_CAPACITY,
            float maxElectricCapacity = MyGameplayConstants.DEFAULT_MAX_ELECTRIC_CAPACITY,
            MyExplosionTypeEnum explosionType = MyExplosionTypeEnum.SMALL_SHIP_EXPLOSION,
            float explosionRadiusMultiplier = 1.5f,
            float explosionDamageMultiplier = 1,
            float minSizeForExplosion = MyExplosionsConstants.MIN_OBJECT_SIZE_TO_CAUSE_EXPLOSION_AND_CREATE_DEBRIS,
            bool causesAlarm = false,
            bool requiresEnergy = false,
            float explosionParticleEffectScale = 1,
            bool displayHud = false)
        {
            //m_modelLod0Enum = null;
            m_modelLod1Enum = null;

            BuildType = buildType;
            CategoryType = categoryType;
            SubCategoryType = subCategoryType;
            MaterialType = materialType;
            PrefabTypeFlag = prefabTypeFlag;
            FactionSpecific = factionSpecific;
            EnabledInEditor = enabledInEditor;
            RotatingVelocity = rotatingVelocity;
            StartRotatingCue = startRotatingCue;
            LoopRotatingCue = loopRotatingCue;
            LoopRotatingDamagedCue = loopRotatingDamagedCue;
            EndRotatingCue = endRotatingCue;
            PreviewPointOfView = new MyPreviewPointOfView(previewPointOfView);
            MinElectricCapacity = minElectricCapacity;
            MaxElectricCapacity = maxElectricCapacity;
            NeedsUpdate = needsUpdate;
            InitPhysics = initPhysics;
            ExplosionType = explosionType;
            ExplosionRadiusMultiplier = explosionRadiusMultiplier;
            ExplosionDamage = explosionDamageMultiplier;
            ExplosionParticleEffectScale = explosionParticleEffectScale;
            MinSizeForExplosion = minSizeForExplosion;
            CausesAlarm = causesAlarm;
            RequiresEnergy = requiresEnergy;
            DisplayHud = displayHud;
        }
        public MyPreviewPointOfView(MyPreviewPointOfViewEnum pointOfView)
        {
            m_pointOfView = pointOfView;

            switch (pointOfView)
            {
                case MyPreviewPointOfViewEnum.Front:
                    m_transform = Matrix.Identity;
                    break;
                case MyPreviewPointOfViewEnum.Top:
                    m_transform = Matrix.CreateRotationX(MathHelper.PiOver2);
                    break;
                case MyPreviewPointOfViewEnum.Bottom:
                    m_transform = Matrix.CreateRotationX(MathHelper.PiOver2);
                    m_transform *= Matrix.CreateRotationY(MathHelper.Pi);
                    break;
                case MyPreviewPointOfViewEnum.FrontLeft:
                    m_transform = Matrix.CreateRotationX(MathHelper.ToRadians(10));
                    m_transform *= Matrix.CreateRotationY(MathHelper.ToRadians(15));
                    break;
                case MyPreviewPointOfViewEnum.Left:
                    m_transform = Matrix.CreateRotationY(MathHelper.ToRadians(45));
                    break;
                case MyPreviewPointOfViewEnum.BottomLeft:
                    m_transform = Matrix.CreateRotationX(MathHelper.PiOver2);
                    m_transform *= Matrix.CreateRotationY(MathHelper.PiOver4);
                    break;
                case MyPreviewPointOfViewEnum.RearLeft:
                    m_transform = Matrix.CreateRotationY(-MathHelper.PiOver2);
                    break;
                case MyPreviewPointOfViewEnum.RearLeftLeft:
                    m_transform = Matrix.CreateRotationY(MathHelper.ToRadians(67));
                    break;
                default:
                    throw new ArgumentOutOfRangeException("pointOfView");
            }
        }
 /// <summary>
 /// Creates new instance of prefab configuration with default prefab type flags
 /// </summary>
 /// <param name="modelLod0Enum">Model LOD0</param>
 /// <param name="modelLod1Enum">Model LOD2</param>
 /// <param name="buildType">Build type</param>
 /// <param name="categoryType">Category type</param>
 /// <param name="subCategoryType">Subcategory type</param>
 /// <param name="materialType">Material type</param>
 /// <param name="factionSpecific">To which faction is this prefab specific. Null if prefab is for all factions. Used for material (texture) set availability. </param>     
 public MyPrefabConfiguration(
     MyModelsEnum modelLod0Enum,
     MyModelsEnum? modelLod1Enum,
     BuildTypesEnum buildType,
     CategoryTypesEnum categoryType,
     SubCategoryTypesEnum? subCategoryType,
     MyMaterialType materialType,
     MyMwcObjectBuilder_Prefab_AppearanceEnum? factionSpecific = null,
     MyModelsEnum? collisionModelEnum = null,
     bool needsUpdate = false,
     bool initPhysics = true,
     bool enabledInEditor = true,
     float rotatingVelocity = DEFAULT_ROTATING_VELOCITY,
     MySoundCuesEnum? startRotatingCue = null,
     MySoundCuesEnum? loopRotatingCue = null,
     MySoundCuesEnum? loopRotatingDamagedCue = null,
     MySoundCuesEnum? endRotatingCue = null,
     MyPreviewPointOfViewEnum previewAngle = MyPreviewPointOfViewEnum.Front,
     MyExplosionTypeEnum explosionType = MyExplosionTypeEnum.SMALL_SHIP_EXPLOSION,
     float explosionRadiusMultiplier = 1,
     float explosionDamageMultiplier = 1,
     float minSizeForExplosion = MyExplosionsConstants.MIN_OBJECT_SIZE_TO_CAUSE_EXPLOSION_AND_CREATE_DEBRIS,
     bool causesAlarm = false,
     bool requiresEnergy = false,
     float explosionParticleEffectScale = 1,
     bool displayHud = false)
     : this(modelLod0Enum, modelLod1Enum, buildType, categoryType, subCategoryType, materialType, PrefabTypesFlagEnum.Default, collisionModelEnum, factionSpecific, needsUpdate, initPhysics, enabledInEditor, rotatingVelocity,
     startRotatingCue, loopRotatingCue, loopRotatingDamagedCue, endRotatingCue,
     previewAngle, explosionType: explosionType, explosionRadiusMultiplier: explosionRadiusMultiplier, explosionDamage: explosionDamageMultiplier, minSizeForExplosion: minSizeForExplosion, causesAlarm: causesAlarm, requiresEnergy: requiresEnergy, explosionParticleEffectScale: explosionParticleEffectScale, displayHud: displayHud)
 {
     System.Diagnostics.Debug.Assert(modelLod0Enum != modelLod1Enum, "LOD0 and LOD1 models are the same!");
     if (collisionModelEnum != null)
     {
         System.Diagnostics.Debug.Assert(modelLod0Enum != collisionModelEnum, "LOD0 and COL models are the same!");
         System.Diagnostics.Debug.Assert(modelLod1Enum != collisionModelEnum, "LOD1 and COL models are the same!");
     }
 }
 /// <summary>
 /// Creates new instance of prefab configuration
 /// </summary>
 /// <param name="modelLod0Enum">Model LOD0</param>
 /// <param name="modelLod1Enum">Model LOD2</param>
 /// <param name="buildType">Build type</param>
 /// <param name="categoryType">Category type</param>
 /// <param name="subCategoryType">Subcategory type</param>
 /// <param name="materialType">Material type</param>
 /// <param name="prefabTypeFlag">Prefab type flags</param>
 protected MyPrefabConfiguration(
     MyModelsEnum modelLod0Enum,
     MyModelsEnum? modelLod1Enum,
     BuildTypesEnum buildType,
     CategoryTypesEnum categoryType,
     SubCategoryTypesEnum? subCategoryType,
     MyMaterialType materialType,
     PrefabTypesFlagEnum prefabTypeFlag,
     MyModelsEnum? collisionModelEnum = null,
     MyMwcObjectBuilder_Prefab_AppearanceEnum? factionSpecific = null,
     bool needsUpdate = false,
     bool initPhysics = true,
     bool enabledInEditor = true,
     float rotatingVelocity = DEFAULT_ROTATING_VELOCITY,
     MySoundCuesEnum? startRotatingCue = null,
     MySoundCuesEnum? loopRotatingCue = null,
     MySoundCuesEnum? loopRotatingDamagedCue = null,
     MySoundCuesEnum? endRotatingCue = null,
     MyPreviewPointOfViewEnum previewAngle = MyPreviewPointOfViewEnum.Front,
     float minElectricCapacity = MyGameplayConstants.DEFAULT_MIN_ELECTRIC_CAPACITY,
     float maxElectricCapacity = MyGameplayConstants.DEFAULT_MAX_ELECTRIC_CAPACITY,
     MyExplosionTypeEnum explosionType = MyExplosionTypeEnum.SMALL_SHIP_EXPLOSION,
     float explosionRadiusMultiplier = 1,
     float explosionDamage = 1,
     float minSizeForExplosion = MyExplosionsConstants.MIN_OBJECT_SIZE_TO_CAUSE_EXPLOSION_AND_CREATE_DEBRIS,
     bool causesAlarm = false,
     bool requiresEnergy = false,
     float explosionParticleEffectScale = 1,
     bool displayHud = false)
     : this(buildType, categoryType, subCategoryType, materialType, prefabTypeFlag, factionSpecific, needsUpdate, initPhysics, enabledInEditor, rotatingVelocity, 
     startRotatingCue, loopRotatingCue, loopRotatingDamagedCue, endRotatingCue,
     previewAngle, minElectricCapacity, maxElectricCapacity, explosionType, explosionRadiusMultiplier, explosionDamage, minSizeForExplosion, causesAlarm, requiresEnergy: requiresEnergy, explosionParticleEffectScale: explosionParticleEffectScale, displayHud: displayHud)
 {
     m_modelLod0Enum = modelLod0Enum;
     m_modelLod1Enum = modelLod1Enum;
     m_collisionModelEnum = collisionModelEnum;
 }