예제 #1
0
        /// <summary>
        /// Create a survey element by making a default circle element, then creating the GLCircle, and then adding this to the parent element list.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="oSurveyPoint"></param>
        /// <param name="a_oDefaultEffect"></param>
        /// <param name="SPIndex"></param>
        private void CreateSurveyPoint(SceenElement parent, SurveyPoint oSurveyPoint, GLEffect a_oDefaultEffect, int SPIndex)
        {
            Vector3 v3SPPos = new Vector3((float)oSurveyPoint.Position.X, (float)oSurveyPoint.Position.Y, 0.0f);

            CircleElement oSurveyPointElement = new CircleElement();

            oSurveyPointElement.EntityID = oSurveyPoint.Id;

            GLCircle oSPCircle = new GLCircle(a_oDefaultEffect,
                                              v3SPPos,
                                              4.0f / m_fZoomScaler,
                                              Color.White,
                                              UIConstants.Textures.DEFAULT_TEXTURE);


            GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3SPPos,
                                                                   UIConstants.DEFAULT_TEXT_SIZE, Color.White, UIConstants.Textures.DEFAULT_GLFONT2, SPIndex.ToString());

            oSurveyPointElement._isSurveyPoint   = true;
            oSurveyPointElement.Lable            = oNameLable;
            oSurveyPointElement.Lable.Size       = UIConstants.DEFAULT_TEXT_SIZE / m_fZoomScaler; //Initial taskgroup names weren't being scaled properly for whatever reason.
            oSurveyPointElement.RealSize         = new Vector2(0.0001f, 0.0001f) / m_fZoomScaler;
            oSurveyPointElement.PrimaryPrimitive = oSPCircle;
            oSurveyPointElement.AddPrimitive(oSPCircle);
            parent.AddChildElement(oSurveyPointElement);
        }
예제 #2
0
        public PlanetElement(GLEffect a_oDefaultEffect, Vector3 a_oPosition, SystemBody a_oPlanet, System.Drawing.Color a_oColor, SceenElement PElement)
            : base(a_oPlanet)
        {
            m_oOrbitCircle = new CircleElement(a_oDefaultEffect, a_oPosition, a_oPlanet, a_oColor);
#warning Cannot add m_oOrbitCircle to children for Planet Element

            _ParentElement = PElement;
        }
예제 #3
0
        public StarElement(Star a_oStar, GLEffect a_oDefaultEffect, Vector3 a_oPosition, System.Drawing.Color a_oColor, bool a_bPrimary = true)
            : base(a_oStar)
        {
            if (!a_bPrimary)
            {
                // Do Non Primary Star Stuff here (e.g. orbit circle).
                ///< @todo...

                m_oOrbitCircle = new CircleElement(a_oDefaultEffect, a_oPosition, a_oStar, a_oColor);
#warning As with planet, m_oOrbitCircle will not be added as a child.
            }
            else
            {
                m_oOrbitCircle = null;
            }
        }
예제 #4
0
        public StarElement(Star a_oStar, GLEffect a_oDefaultEffect, Vector3 a_oPosition, System.Drawing.Color a_oColor, bool a_bPrimary = true)
            : base(a_oStar)
        {
            if (!a_bPrimary)
            {
                // Do Non Primary Star Stuff here (e.g. orbit circle).
                ///< @todo...

                m_oOrbitCircle = new CircleElement(a_oDefaultEffect, a_oPosition, a_oStar, a_oColor);
#warning As with planet, m_oOrbitCircle will not be added as a child.
            }
            else
                m_oOrbitCircle = null;


        }
예제 #5
0
        public PlanetElement(GLEffect a_oDefaultEffect, Vector3 a_oPosition, SystemBody a_oPlanet, System.Drawing.Color a_oColor)
            : base(a_oPlanet)
        {
            m_oOrbitCircle = new CircleElement(a_oDefaultEffect, a_oPosition, a_oPlanet, a_oColor);
#warning Cannot add m_oOrbitCircle to children for Planet Element
        }