Exemplo n.º 1
0
        bool IAgStkGraphicsPluginProjectionStream.OnGetNextProjection(AGI.STKUtil.IAgDate Time, AGI.STKUtil.IAgDate NextTime, IAgStkGraphicsPluginProjectionStreamContext pContext)
        {
            pContext.NearPlane             = NearPlane;
            pContext.FarPlane              = FarPlane;
            pContext.FieldOfViewHorizontal = FieldOfViewHorizontal;
            pContext.FieldOfViewVertical   = FieldOfViewVertical;

            ProjectionPositionOrientation result = EvaluateProjectionPositionOrientation(double.Parse(Time.Format("epSec")), 0, Dates.Count);
            Array xyz  = result.Position;
            Array quat = result.Orientation;

            pContext.SetPosition(ref xyz);
            pContext.SetOrientation(ref quat);

            return(true);
        }
Exemplo n.º 2
0
        bool IAgStkGraphicsPluginRasterStream.OnGetNextRaster(AGI.STKUtil.IAgDate Time, AGI.STKUtil.IAgDate NextTime, IAgStkGraphicsPluginRasterStreamContext pContext)
        {
            if (m_LastTime == null)
            {
                m_LastTime = Time.Subtract("sec", 1.0);
            }

            // Only update if animating
            if (Time.OLEDate > m_LastTime.OLEDate)
            {
                pContext.RasterAsBitmap.SetBitmap(gifProvider.NextFrame().GetHbitmap());
                m_LastTime = Time;
            }
            else if (Time.OLEDate < m_LastTime.OLEDate)
            {
                pContext.RasterAsBitmap.SetBitmap(gifProvider.PreviousFrame().GetHbitmap());
                m_LastTime = Time;
            }

            return(true);
        }