Ejemplo n.º 1
0
        public static bool DrawAltAzGridText(RenderContext renderContext, float opacity, Color drawColor)
        {
            Coordinates zenithAltAz = new Coordinates(0, 0);
            Coordinates zenith      = Coordinates.HorizonToEquitorial(zenithAltAz, SpaceTimeController.Location, SpaceTimeController.Now);

            double   raPart  = -((zenith.RA - 6) / 24.0 * (Math.PI * 2));
            double   decPart = -(((zenith.Dec)) / 360.0 * (Math.PI * 2));
            string   raText  = Coordinates.FormatDMS(zenith.RA);
            Matrix3d mat     = Matrix3d.RotationY((float)-raPart - Math.PI);

            mat.Multiply(Matrix3d.RotationX((float)decPart));
            mat.Invert();

            MakeAltAzGridText();


            Matrix3d matOldWorld     = renderContext.World.Clone();
            Matrix3d matOldWorldBase = renderContext.WorldBase.Clone();

            renderContext.WorldBase = Matrix3d.MultiplyMatrix(mat, renderContext.World);
            renderContext.World     = renderContext.WorldBase.Clone();
            renderContext.MakeFrustum();

            AltAzTextBatch.ViewTransform = Matrix3d.InvertMatrix(mat);
            AltAzTextBatch.Draw(renderContext, opacity, drawColor);

            renderContext.WorldBase = matOldWorldBase;
            renderContext.World     = matOldWorld;
            renderContext.MakeFrustum();
            return(true);
        }
Ejemplo n.º 2
0
        public static bool DrawEquitorialGridText(RenderContext renderContext, float opacity, Color drawColor)
        {
            MakeEquitorialGridText();

            EquTextBatch.Draw(renderContext, opacity, drawColor);
            return(true);
        }
Ejemplo n.º 3
0
        public static bool DrawGalacticGridText(RenderContext renderContext, float opacity, Color drawColor)
        {
            MakeGalacticGridText();

            GalTextBatch.Draw(renderContext, opacity, drawColor);
            return(true);
        }
Ejemplo n.º 4
0
        public static bool DrawEclipticText(RenderContext renderContext, float opacity, Color drawColor)
        {
            MakeEclipticText();

            EclipOvTextBatch.Draw(renderContext, opacity, drawColor);

            return(true);
        }
Ejemplo n.º 5
0
        public static bool DrawPrecessionChart(RenderContext renderContext, float opacity, Color drawColor)
        {
            MakePrecessionChart();

            PrecTextBatch.Draw(renderContext, opacity, drawColor);

            precLineList.DrawLines(renderContext, opacity, drawColor);

            return(true);
        }
Ejemplo n.º 6
0
 public static void DrawConstellationNames(RenderContext renderContext, float opacity, Color drawColor)
 {
     if (NamesBatch == null)
     {
         InitializeConstellationNames();
         if (NamesBatch == null)
         {
             return;
         }
     }
     NamesBatch.Draw(renderContext, opacity, drawColor);
 }