Exemplo n.º 1
0
        /// <summary>
        /// RenderHighlitedEntity - has to be called from render?
        /// </summary>
        public void DrawMouseOver()
        {
            if (m_bEnableAABBUnderMouse && m_physOverlapElemList.Count != 0)
            {
                //@ render of Ales rbElements

                /*foreach (MyRBElement elem in m_physOverlapElemList)
                 * {
                 *  BoundingBox elemBox = elem.GetWorldSpaceAABB();
                 *
                 *  //@ Draw AABB
                 *  Vector4 vctColorAABB = new Vector4(0.1f, 0.8f, 0.8f, 0.5f);
                 *  Matrix mtWorldAABB = Matrix.Identity;
                 *  MyDebugDraw.DrawWireFramedBox(ref mtWorldAABB, ref elemBox, ref vctColorAABB, 0.01f, 1);
                 * }*/
            }
            if (MyEditorGizmo.IsAnyAxisSelected())
            {
                HighlightEntity(m_mouseOverEntity, false);
            }

            if (m_mouseOverEntity == null)
            {
                return;
            }

            //@ mozny hack pro optimalizaci viditelnosti don't use IsVisible, nedoresena koncepce viditelnosti render/engine/game

            /*BoundingSphere bSphere = m_highlitedEntity.WorldVolumeHr;
             * if (!MyCamera.IsInFrustum(ref bSphere))
             *  return;*/

            m_mouseOverEntity.DrawMouseOver(ref MyEditorConstants.MOUSE_OVER_HIGHLIGHT_COLOR);
        }