Exemplo n.º 1
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (TimeOfDay == null)
            {
                return;
            }
            const int iSteps     = 24;
            float     fStep      = 1.0f / (float)iSteps;
            float     fLen       = 200.0f * EditorManager.Settings.GlobalUnitScaling;
            float     fTime      = 0.0f;
            Vector3F  lastCorner = Vector3F.Zero;

            for (int i = 0; i < iSteps; i++, fTime += fStep)
            {
                if (!EditorManager.RendererNodeManager.GetTimeOfDaySnapshot(fTime, daytimeParams))
                {
                    continue;
                }
                Vector3F newCorner = Position + daytimeParams.SunDirection * fLen * 0.75f;
                if (i > 0)
                {
                    view.RenderSolidTriangle(Position, newCorner, lastCorner, VisionColors.Get(daytimeParams.AmbientColor));
                    view.RenderSolidTriangle(Position, lastCorner, newCorner, VisionColors.Get(daytimeParams.AmbientColor));
                }
                Vector3F vEnd = Position + daytimeParams.SunDirection * fLen;
                view.RenderLine(Position, vEnd, VisionColors.Get(daytimeParams.SunColor), 1.0f);
                uint iColor = (i == 12) ? VisionColors.White : VisionColors.Yellow;
                view.WriteText3D(vEnd, i.ToString() + ":00", iColor); // time

                lastCorner = newCorner;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Overridden render function: Let the engine instance render itself and render a box
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     if (HasEngineInstance())
     {
         EngineNode.RenderShape(view, mode);
     }
 }
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            // First check whether we have a fully configured constraint with an invalid configuration.
            // In that case we display an error sign to inform the user about the invalid configuration
            if (EngineConstraintChainInstance != null && (!EngineConstraintChainInstance.IsConfigurationValid()))
            {
                float fSize = 10.0f * EditorManager.Settings.GlobalUnitScaling;
                view.EngineManager.RenderSprite(this.RenderPosition, @"textures\warning32.dds", VisionColors.White, fSize, fSize);
                return;
            }

            if (mode == ShapeRenderMode.Selected || (mode == ShapeRenderMode.Normal && this.ParentLayer == EditorManager.Scene.ActiveLayer))
            {
                float fSize = 3.0f * EditorManager.Settings.GlobalUnitScaling;
                view.EngineManager.RenderSprite(this.RenderPosition, @"textures\carabiner32.dds", VisionColors.White, fSize, fSize);

                if (_engineInstance == null)
                {
                    return;
                }
                if (this.IsHintSet(HintFlags_e.Virtual)) // in prefabs it is disturbing
                {
                    return;
                }
            }
        }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            // Don't draw carvers if "playing the game" or 'Visible' property is false
            if (EditorManager.InPlayingMode || FinalVisibleState == false)
            {
                return;
            }

            Vector3F    size = new Vector3F(_vBoxSize.X * ScaleX, _vBoxSize.Y * ScaleY, _vBoxSize.Z * ScaleZ);
            BoundingBox bbox = new BoundingBox(-size * 0.5f, size * 0.5f);

            if (_bInverted)
            {
                bbox.Translate(Position);
                uint color = (mode == ShapeRenderMode.Selected) ? (uint)0x6000ff80 : (uint)0x3000ff80;
                view.RenderSolidBox(bbox, color);
            }
            else
            {
                uint color = (mode == ShapeRenderMode.Selected) ? (uint)0x600080ff : (uint)0x300080ff;
                view.RenderOrientedSolidBox(bbox, Position, RotationMatrix, color);
            }
        }
Exemplo n.º 5
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            //UIDialogInstance.RenderShape(view, mode);
            //EngineNode.RenderShape(c);
            //base.RenderShape(view, mode);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Renders the shape in the view
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
     if (_engineInstance != null)
     {
         EngineMirror.RenderShape(view, mode);
     }
 }
Exemplo n.º 7
0
 public override void RenderShape(CSharpFramework.VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
     if (mode == ShapeRenderMode.Selected)
     {
         _selection.RenderSelection(view, mode);
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Overridden function
 /// </summary>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
     if (Selected) // the ShapeRenderMode does not help here since this shape does not have an engine instance
     {
         view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 60.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Blue, 1.0f);
     }
 }
Exemplo n.º 9
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (EngineInstance != null && Parent != null && ((CustomVolumeShape)Parent).IsRendering && !((CustomVolumeShape)Parent).CustomStaticMesh)
            {
                EngineInstance.RenderShape(view, mode);
            }
        }
Exemplo n.º 10
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (IsRendering && !CustomStaticMesh && EngineInstance != null)
            {
                EngineInstance.RenderShape(view, mode);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (_engineInstance != null && mode == ShapeRenderMode.Selected)
            {
                EngineBox.RenderShape(view, mode, AbsoluteBoundingBox);
            }
        }
Exemplo n.º 12
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (HasEngineInstance() && FinalVisibleState == true)
            {
                EngineNavMesh.DebugRender(m_debugRenderOffset);
            }

            base.RenderShape(view, mode);
        }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (FinalVisibleState == true && EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count != 0)
            {
                HavokAiManaged.ManagedModule.ComputeAndDrawPath(view, _vStartPoint, _vEndPoint, _fCharacterRadius, _fCharacterHeight, _fpathDisplayOffset * _fCharacterHeight, VisionColors.Get(_pathColor));
            }

            base.RenderShape(view, mode);
        }
Exemplo n.º 14
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode); // render the bounding box

            // render direction vector
            if (_engineInstance != null)
            {
                EnginePGroup.RenderShape(view, mode);
            }
        }
Exemplo n.º 15
0
        public override void RenderShape(CSharpFramework.VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);
            float fScale = EditorManager.Settings.GlobalUnitScaling;

            if (mode == ShapeRenderMode.Selected)
            {
                view.RenderArrow(RenderPosition, RenderPosition + this.XAxis * 500.0f * fScale, VisionColors.White, 1.0f, 10.0f * fScale);
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (EngineHeightfieldGenerator == null)
            {
                return;
            }

            EngineHeightfieldGenerator.RenderShape(view, mode);
        }
Exemplo n.º 17
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (this.Visible == true)
            {
                uint iColor = VisionColors.RGBA(0, 255, 255, 255);

                view.RenderRectangle2D(0, 0, ResolutionX * _editScale, ResolutionY * _editScale, iColor, 1.0f);
            }
        }
Exemplo n.º 18
0
        public override void RenderHotSpot(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderHotSpot(view, mode);
            if (!OnScreen)
                return;

            Vector2F center2d = Sprite.CenterPosition;
            view.RenderRectangle2D(
                center2d.X - 5, center2d.Y - 5,
                center2d.X + 5, center2d.Y + 5,
                VisionColors.RGBA(0, 255, 0, 255), 1.0f );
        }
Exemplo n.º 19
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (_engineInstance != null)
            {
                if (mode == ShapeRenderMode.Selected || (ParentLayer == ParentLayer.ParentScene.ActiveLayer && _bPreview3D))
                {
                    EngineBox.RenderShape(view, mode, VisionColors.Get(_previewColor));
                }
            }
        }
Exemplo n.º 20
0
        /// <summary>
        /// Overridden function. This function draws a blue frustum. If the shape is selected the frustum switches to red
        /// </summary>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (this.Selected)
            {
                view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 2000.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Red, 2.0f);
            }
            else
            {
                view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 2000.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Blue, 2.0f);
            }
        }
Exemplo n.º 21
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            if (_engineInstance == null || mode != ShapeRenderMode.Selected)
            {
                return;
            }
            if (this.IsHintSet(HintFlags_e.Virtual)) // in prefabs it is disturbing
            {
                return;
            }
            EngineBox.RenderShape(view, mode);
        }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            // Don't draw seed points if "playing the game" or 'Visible' property is false
            if (EditorManager.InPlayingMode || FinalVisibleState == false)
                return;

            if (mode == ShapeRenderMode.Selected || (mode == ShapeRenderMode.Normal && this.ParentLayer == EditorManager.Scene.ActiveLayer))
            {
                float fSize = 10.0f * EditorManager.Settings.GlobalUnitScaling;
                view.EngineManager.RenderSprite(this.RenderPosition, @"textures\pin_green32.dds", VisionColors.White, fSize, fSize);
            }
        }
Exemplo n.º 23
0
        public override void RenderHotSpot(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderHotSpot(view, mode);
            if (!OnScreen)
            {
                return;
            }

            Vector2F center2d = Sprite.CenterPosition;

            view.RenderRectangle2D(
                center2d.X - 5, center2d.Y - 5,
                center2d.X + 5, center2d.Y + 5,
                VisionColors.RGBA(0, 255, 0, 255), 1.0f);
        }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            // Don't draw seed points if "playing the game" or 'Visible' property is false
            if (EditorManager.InPlayingMode || FinalVisibleState == false)
            {
                return;
            }

            if (mode == ShapeRenderMode.Selected || (mode == ShapeRenderMode.Normal && this.ParentLayer == EditorManager.Scene.ActiveLayer))
            {
                float fSize = 10.0f * EditorManager.Settings.GlobalUnitScaling;
                view.EngineManager.RenderSprite(this.RenderPosition, @"textures\pin_green32.dds", VisionColors.White, fSize, fSize);
            }
        }
Exemplo n.º 25
0
        /// <summary>
        /// Overridden render function: Let the engine instance render itself
        /// </summary>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);
            if (HasEngineInstance())
            {
                EngineFmodEvent.RenderShape(view, mode);

                if (_hotSpotStartEvent != null)
                {
                    // render again to keep the button state updated
                    if (EngineFmodEvent.IsPlaying())
                    {
                        EditorManager.ActiveView.UpdateView(false);
                    }
                    UpdatePlayIcon();
                }
            }
        }
Exemplo n.º 26
0
        public void RenderSelection(VisionViewBase view, ShapeRenderMode mode)
        {
            if (!Valid)
            {
                return;
            }
            uint iColor = VisionColors.RGBA(50, 20, 150, 50);

            /*
             * Vector3F v0 = new Vector3F(WorldSpaceExtent.X1, WorldSpaceExtent.Y1, DisplayZ);
             * Vector3F v1 = new Vector3F(WorldSpaceExtent.X2, WorldSpaceExtent.Y1, DisplayZ);
             * Vector3F v2 = new Vector3F(WorldSpaceExtent.X1, WorldSpaceExtent.Y2, DisplayZ);
             * Vector3F v3 = new Vector3F(WorldSpaceExtent.X2, WorldSpaceExtent.Y2, DisplayZ);
             *
             * view.RenderSolidTriangle(v0, v1, v2, iColor);
             * view.RenderSolidTriangle(v1, v3, v2, iColor);
             */
            float       fMin      = DisplayZ - EditorManager.Settings.MaxPickingDistance;
            BoundingBox renderBox = new BoundingBox(WorldSpaceExtent.X1, WorldSpaceExtent.Y1, fMin, WorldSpaceExtent.X2, WorldSpaceExtent.Y2, DisplayZ);

            view.RenderSolidBox(renderBox, iColor);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Overridden render function: Let the engine instance render itself and render a box
        /// </summary>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            //    EngineNode.RenderShape(view, mode);
            base.RenderShape(view, mode);

            if (this.Selected == true)
            {
                uint iColor = VisionColors.RGBA(0, 0, 255, 255);

                float fScaleX = UIEditorMessageService.GetInstance().GetResolutionScaleX();
                float fScaleY = UIEditorMessageService.GetInstance().GetResolutionScaleY();

                float fScreenPosX = PosX;
                float fScreenPosY = PosY;

                if (Parent != null && Parent is UIShapeBase)
                {
                    fScreenPosX += ((UIShapeBase)Parent).PosX;
                    fScreenPosY += ((UIShapeBase)Parent).PosY;
                }

                view.RenderRectangle2D(fScreenPosX * fScaleX, fScreenPosY * fScaleY, (fScreenPosX + SizeX) * fScaleX, (fScreenPosY + SizeY) * fScaleY, iColor, 1.0f);
            }
        }
Exemplo n.º 28
0
        /// <summary>
        /// Overridden function
        /// </summary>
        /// <param name="hotSpot"></param>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
        {
            base.OnHotSpotRender (hotSpot, view, mode);

              // render gravity as arrow
              if (hotSpot==_hotSpotGravity)
              {
            view.RenderArrow(Position, _hotSpotGravity.Position, VisionColors.Yellow, 4.0f, 2.0f * EditorManager.Settings.GlobalUnitScaling);
              }
        }
Exemplo n.º 29
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if (_engineInstance!=null)
              {
            if (mode == ShapeRenderMode.Selected || (ParentLayer == ParentLayer.ParentScene.ActiveLayer && _bPreview3D))
            {
              EngineBox.RenderShape(view, mode, VisionColors.Get(_previewColor));
            }
              }
        }
Exemplo n.º 30
0
 /// <summary>
 /// Renders the shape in the view
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape (view, mode);
       if (_engineInstance!=null)
     EngineMirror.RenderShape(view,mode);
 }
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if (EngineHeightfieldGenerator == null)
            return;

              EngineHeightfieldGenerator.RenderShape(view,mode);
        }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (TimeOfDay == null)
            return;
              const int iSteps = 24;
              float fStep = 1.0f / (float)iSteps;
              float fLen = 200.0f * EditorManager.Settings.GlobalUnitScaling;
              float fTime = 0.0f;
              Vector3F lastCorner = Vector3F.Zero;
              for (int i=0; i<iSteps; i++,fTime += fStep)
              {
            if (!EditorManager.RendererNodeManager.GetTimeOfDaySnapshot(fTime, daytimeParams))
              continue;
            Vector3F newCorner = Position + daytimeParams.SunDirection * fLen * 0.75f;
            if (i > 0)
            {
              view.RenderSolidTriangle(Position, newCorner, lastCorner, VisionColors.Get(daytimeParams.AmbientColor));
              view.RenderSolidTriangle(Position, lastCorner, newCorner, VisionColors.Get(daytimeParams.AmbientColor));
            }
            Vector3F vEnd = Position + daytimeParams.SunDirection * fLen;
            view.RenderLine(Position, vEnd, VisionColors.Get(daytimeParams.SunColor), 1.0f);
            uint iColor = (i == 12) ? VisionColors.White : VisionColors.Yellow;
            view.WriteText3D(vEnd, i.ToString()+":00", iColor); // time

            lastCorner = newCorner;
              }
        }
Exemplo n.º 33
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if( EngineInstance != null && Parent != null && ((CustomVolumeShape)Parent).IsRendering && !((CustomVolumeShape)Parent).CustomStaticMesh )
            EngineInstance.RenderShape(view, mode);
        }
Exemplo n.º 34
0
 /// <summary>
 /// Overridden function
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
     EngineRenderTarget.RenderShape(view, mode);
 }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (FinalVisibleState == true && EditorManager.Scene.AllShapesOfType(typeof(HavokAiEditorPlugin.Shapes.HavokNavMeshShape)).Count != 0)
            {
                HavokAiManaged.ManagedModule.ComputeAndDrawPath(view, _vStartPoint, _vEndPoint, _fCharacterRadius, _fCharacterHeight, _fpathDisplayOffset * _fCharacterHeight, VisionColors.Get(_pathColor));
            }

            base.RenderShape(view, mode);
        }
Exemplo n.º 36
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (_engineInstance==null)
            return;
              EnginePath.RenderShape(view,mode);
              base.RenderShape(view,mode); // also render bounding box

              if (this._fShowPathTimeHelper >= 0.0f)
              {
            Vector3F showWidget = new Vector3F();
            EnginePath.EvaluatePathPositionSmooth(_fShowPathTimeHelper, ref showWidget);
            float r = 2.0f*EditorManager.Settings.GlobalUnitScaling;
            view.RenderLineBox(showWidget.X - r, showWidget.Y - r, showWidget.Z - r, showWidget.X + r, showWidget.Y + r, showWidget.Z + r, VisionColors.Cyan, 1.0f);
              }
        }
 public override void RenderShape(CSharpFramework.VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
       float fScale = EditorManager.Settings.GlobalUnitScaling;
       if (mode == ShapeRenderMode.Selected)
     view.RenderArrow(RenderPosition, RenderPosition + this.XAxis * 500.0f * fScale, VisionColors.White, 1.0f, 10.0f * fScale);
 }
Exemplo n.º 38
0
        public void RenderSelection(VisionViewBase view, ShapeRenderMode mode)
        {
            if (!Valid)
            return;
              uint iColor = VisionColors.RGBA(50, 20, 150, 50);
              /*
              Vector3F v0 = new Vector3F(WorldSpaceExtent.X1, WorldSpaceExtent.Y1, DisplayZ);
              Vector3F v1 = new Vector3F(WorldSpaceExtent.X2, WorldSpaceExtent.Y1, DisplayZ);
              Vector3F v2 = new Vector3F(WorldSpaceExtent.X1, WorldSpaceExtent.Y2, DisplayZ);
              Vector3F v3 = new Vector3F(WorldSpaceExtent.X2, WorldSpaceExtent.Y2, DisplayZ);

              view.RenderSolidTriangle(v0, v1, v2, iColor);
              view.RenderSolidTriangle(v1, v3, v2, iColor);
              */
              float fMin = DisplayZ - EditorManager.Settings.MaxPickingDistance;
              BoundingBox renderBox = new BoundingBox(WorldSpaceExtent.X1, WorldSpaceExtent.Y1, fMin, WorldSpaceExtent.X2, WorldSpaceExtent.Y2, DisplayZ);
              view.RenderSolidBox(renderBox, iColor);
        }
Exemplo n.º 39
0
 /// <summary>
 /// Overridden function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender (hotSpot, view, mode);
       if (hotSpot==_hotSpotTangentIn)
       {
     view.RenderLine(Position,Position+_hotSpotTangentIn.CurrentPosition, VisionColors.Grey, 2.0f);
     return;
       }
       if (hotSpot==_hotSpotTangentOut)
       {
     view.RenderLine(Position,Position+_hotSpotTangentOut.CurrentPosition, VisionColors.Grey, 2.0f);
     return;
       }
 }
Exemplo n.º 40
0
        /// <summary>
        /// Overridden function
        /// </summary>
        /// <param name="hotSpot"></param>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
        {
            base.OnHotSpotRender(hotSpot, view, mode);

            if (_hotSpotVolume.Visible)
            {
                Vector3F vStart = Position;
                Vector3F vEnd   = _hotSpotVolume.Position;
                view.RenderLine(vStart, vEnd, VisionColors.Cyan, 1.0f);
            }
        }
Exemplo n.º 41
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if (_engineInstance == null || mode != ShapeRenderMode.Selected)
            return;
              if (this.IsHintSet(HintFlags_e.Virtual)) // in prefabs it is disturbing
            return;
              EngineBox.RenderShape(view,mode);
        }
Exemplo n.º 42
0
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
       if (hotSpot == _hotSpotWindSpeed)
       {
     view.RenderArrow(this.RenderPosition, _hotSpotWindSpeed.CurrentPosition + RenderPosition, VisionColors.White, 1.0f, 4.0f);
       }
 }
Exemplo n.º 43
0
        /// <summary>
        /// Overridden render function: Let the engine instance render itself
        /// </summary>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);
              if (HasEngineInstance())
              {
            EngineFmodEvent.RenderShape(view, mode);

            if (_hotSpotStartEvent != null)
            {
              // render again to keep the button state updated
              if (EngineFmodEvent.IsPlaying())
            EditorManager.ActiveView.UpdateView(false);
              UpdatePlayIcon();
            }
              }
        }
Exemplo n.º 44
0
        /// <summary>
        /// Overridden function. This function draws a blue frustum. If the shape is selected the frustum switches to red
        /// </summary>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if (this.Selected)
            view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 2000.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Red, 2.0f);
              else
            view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 2000.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Blue, 2.0f);
        }
Exemplo n.º 45
0
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if(IsRendering && !CustomStaticMesh && EngineInstance != null)
            EngineInstance.RenderShape(view, mode);
        }
Exemplo n.º 46
0
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
     if (hotSpot == _hotSpotWindSpeed)
     {
         view.RenderArrow(this.RenderPosition, _hotSpotWindSpeed.CurrentPosition + RenderPosition, VisionColors.White, 1.0f, 4.0f);
     }
 }
 /// <summary>
 /// Overridden function
 /// </summary>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape (view, mode);
       if (Selected) // the ShapeRenderMode does not help here since this shape does not have an engine instance
       {
     view.RenderLineFrustum(this.Position, this.RotationMatrix, 45.0f, 45.0f, 60.0f * EditorManager.Settings.GlobalUnitScaling, VisionColors.Blue, 1.0f);
       }
 }
Exemplo n.º 48
0
        /// <summary>
        /// Overridden function
        /// </summary>
        /// <param name="hotSpot"></param>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
        {
            base.OnHotSpotRender(hotSpot, view, mode);

              if (_hotSpotVolume.Visible)
              {
            Vector3F vStart = Position;
            Vector3F vEnd = _hotSpotVolume.Position;
            view.RenderLine(vStart, vEnd, VisionColors.Cyan, 1.0f);
              }
        }
Exemplo n.º 49
0
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
       if (HasEngineInstance())
     EngineBone.RenderShape(view, mode);
 }
Exemplo n.º 50
0
        /// <summary>
        /// Called every frame and per hotspot that belongs to the shape
        /// </summary>
        /// <param name="hotSpot"></param>
        /// <param name="view"></param>
        /// <param name="mode"></param>
        public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
        {
            base.OnHotSpotRender (hotSpot, view, mode);

              Vector3F vStart = _hotSpotFadeOutDist1.Position;
              Vector3F vEnd = _hotSpotFadeOutDist2.Position;

              view.RenderLine(vStart, vEnd, VisionColors.Yellow, 1.0f);
        }
 /// <summary>
 /// Overridden render function: Let the engine instance render itself
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
 }
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
 }
Exemplo n.º 53
0
 /// <summary>
 /// Overridden render function: Let the engine instance render itself and render a box
 /// </summary>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     EngineNode.RenderShape(view, mode);
     base.RenderShape(view, mode);
 }
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

            // Don't draw carvers if "playing the game" or 'Visible' property is false
            if (EditorManager.InPlayingMode || FinalVisibleState == false)
                return;

            Vector3F size = new Vector3F(_vBoxSize.X * ScaleX, _vBoxSize.Y * ScaleY, _vBoxSize.Z * ScaleZ);
            BoundingBox bbox = new BoundingBox(-size * 0.5f, size * 0.5f);

            if (_bInverted)
            {
                bbox.Translate(Position);
                uint color = (mode == ShapeRenderMode.Selected) ? (uint)0x6000ff80 : (uint)0x3000ff80;
                view.RenderSolidBox(bbox, color);
            }
            else
            {
                uint color = (mode == ShapeRenderMode.Selected) ? (uint)0x600080ff : (uint)0x300080ff;
                view.RenderOrientedSolidBox(bbox, Position, RotationMatrix, color);
            }
        }
Exemplo n.º 55
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            if (!HasEngineInstance())
            return;

              base.RenderShape(view, mode);

              if (mode==ShapeRenderMode.Selected)
              {
            view.RenderOrientedLineBox(LocalBoundingBox, Position, RotationMatrix, VisionColors.Yellow, 1.0f);
            if (LightType == LightSourceType_e.Spotlight)
              EngineLight.HighlightShape(view,_fSpotAngle);
            else
              EngineLight.HighlightShape(view,0.0f);
              }
        }
 public override void RenderShape(CSharpFramework.VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
       if (mode == ShapeRenderMode.Selected)
     _selection.RenderSelection(view, mode);
 }
Exemplo n.º 57
0
        /// <summary>
        /// overridden function to render the shape
        /// </summary>
        /// <param name="view">destination view</param>
        /// <param name="mode">render mode</param>
        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view,mode); // render the bounding box

              // render direction vector
              if (_engineInstance!=null)
            EnginePGroup.RenderShape(view,mode);
        }
Exemplo n.º 58
0
 /// <summary>
 /// Overridden function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 /// <param name="mode"></param>
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
     UpdateHotspotVisibility();
 }
 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
     view.RenderLine(_hotSpotStartPoint.CurrentPosition + Position, _hotSpotEndPoint.CurrentPosition + Position, VisionColors.Grey, 2.0f);
 }
Exemplo n.º 60
0
    /// <summary>
    /// overridden function to render the shape
    /// </summary>
    /// <param name="view">destination view</param>
    /// <param name="mode">render mode</param>
    public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
    {
      base.RenderShape(view, mode);

      if (_engineInstance != null && mode == ShapeRenderMode.Selected)
        EngineBox.RenderShape(view,mode,AbsoluteBoundingBox);
    }