Beispiel #1
0
        public static void LoadColors(Settings.ColorBox color)
        {
            System = GetGeometry(SharedMeshes.Sphere, MaterialHelper.CreateMaterial(Brushes.LightYellow));

            LightSource = GetGeometry(
                SharedMeshes.Octahedron,
                MaterialHelper.CreateEmissiveMaterial(Color.FromRgb(120, 120, 0)));

            Construct = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Construct)));

            Depot = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Depot)));

            DockingRing = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.DockingRing)));

            JumpGate = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.JumpGate)));

            JumpHole = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.JumpHole)));

            Planet = GetGeometry(SharedMeshes.Sphere, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Planet)));

            Satellite = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Satellite)));

            Ship = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Ship)));

            Station = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Station)));

            Sun = GetGeometry(SharedMeshes.Sphere, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Sun)));

            TradeLane = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.Tradelane)));

            WeaponsPlatform = GetGeometry(SharedMeshes.Pyramid, MaterialHelper.CreateMaterial(new SolidColorBrush(color.WeaponsPlatform)));

            ZoneSphereOrEllipsoid = GetGeometry(SharedMeshes.Sphere, SharedMaterials.Zone);

            ZoneBox = GetGeometry(SharedMeshes.Box, SharedMaterials.Zone);

            ZoneCylinderOrRing = GetGeometry(SharedMeshes.Cylinder, SharedMaterials.Zone);

            ZoneSphereOrEllipsoidExclusion = GetGeometry(SharedMeshes.Sphere, SharedMaterials.ZoneExclusion);

            ZoneBoxExclusion = GetGeometry(SharedMeshes.Box, SharedMaterials.ZoneExclusion);

            ZoneCylinderExclusion = GetGeometry(SharedMeshes.Cylinder, SharedMaterials.ZoneExclusion);

            ZoneVignette = GetGeometry(
                SharedMeshes.Sphere,
                MaterialHelper.CreateEmissiveMaterial(color.ZoneVignette));

            ZonePath = GetGeometry(SharedMeshes.SurfaceCylinder, SharedMaterials.Zone);

            ZonePathTrade = GetGeometry(
                SharedMeshes.SurfaceCylinder,
                MaterialHelper.CreateEmissiveMaterial(color.ZonePathTrade));

            ZonePathTradeLane = GetGeometry(
                SharedMeshes.Surface,
                MaterialHelper.CreateEmissiveMaterial(color.ZonePathTradeLane));
        }
Beispiel #2
0
        protected override Model3D GetShapeModel()
        {
            Material material;

            if (FromType == ToType)
            {
                //solid brush
                material = MaterialHelper.CreateEmissiveMaterial(GetColor(FromType));
            }
            else
            {
                //gradient brush
                material = MaterialHelper.CreateEmissiveMaterial(new LinearGradientBrush(GetColor(FromType), GetColor(ToType), 90));
            }

            return(SharedGeometries.GetGeometry(SharedMeshes.Surface, material));
        }