• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ShapeRenderMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ShapeRenderMode的典型用法代码示例。如果您正苦于以下问题:C# ShapeRenderMode类的具体用法?C# ShapeRenderMode怎么用?C# ShapeRenderMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ShapeRenderMode类属于命名空间,在下文中一共展示了ShapeRenderMode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RenderHotSpot

        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 );
        }
开发者ID:haoransun93,项目名称:2d,代码行数:12,代码来源:HotSpot2D.cs


示例2: RenderShape

        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);
            }
        }
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:14,代码来源:HavokNavMeshSeedPointShape.cs


示例3: RenderShape

        /// <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);
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:13,代码来源:ParticleGroupShape.cs


示例4: RenderShape

        /// <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));
            }
              }
        }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:17,代码来源:TriggerBoxShape.cs


示例5: RenderShape

 /// <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);
 }
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:9,代码来源:FmodCollisionMeshShape.cs


示例6: RenderShape

 public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
       if (HasEngineInstance())
     EngineBone.RenderShape(view, mode);
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:6,代码来源:EntityShape.cs


示例7: RenderShape

 /// <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);
       }
 }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:11,代码来源:CameraPositionShape.cs


示例8: OnHotSpotRender

 public override void OnHotSpotRender(HotSpotBase hotSpot, VisionViewBase view, ShapeRenderMode mode)
 {
     base.OnHotSpotRender(hotSpot, view, mode);
 }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:4,代码来源:HavokNavMeshCarverShape.cs


示例9: OnHotSpotRender

 /// <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;
       }
 }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:20,代码来源:PathShape.cs


示例10: RenderShape

        /// <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);
              }
        }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:20,代码来源:PathShape.cs


示例11: OnHotSpotRender

        /// <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);
              }
        }
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:17,代码来源:FmodSoundShape.cs


示例12: RenderShape

 public override void RenderShape(CSharpFramework.VisionViewBase view, ShapeRenderMode mode)
 {
     base.RenderShape(view, mode);
       if (mode == ShapeRenderMode.Selected)
     _selection.RenderSelection(view, mode);
 }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:6,代码来源:TerrainSelectionShape.cs


示例13: RenderShape

        public override void RenderShape(VisionViewBase view, ShapeRenderMode mode)
        {
            base.RenderShape(view, mode);

              if(IsRendering && !CustomStaticMesh && EngineInstance != null)
            EngineInstance.RenderShape(view, mode);
        }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:7,代码来源:CustomVolumeShape.cs


示例14: RenderShape

        /// <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);
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:12,代码来源:ParentingTest.cs


示例15: RenderShape

    /// <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);
    }
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:12,代码来源:StaticMeshGroupShape.cs


示例16: OnHotSpotRender

        /// <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);
        }
开发者ID:RexBaribal,项目名称:projectanarchy,代码行数:15,代码来源:ProjectorShape.cs


示例17: RenderShape

        /// <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();
            }
              }
        }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:21,代码来源:FmodEventShape.cs


示例18: RenderShape

        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);
            }
        }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:23,代码来源:HavokNavMeshCarverShape.cs


示例19: RenderShape

        /// <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);
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:15,代码来源:LightGridDetailShape.cs


示例20: RenderShape

        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;
              }
        }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:27,代码来源:TimeOfDaySunPathShape.cs



注:本文中的ShapeRenderMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ShapeStorageInfo类代码示例发布时间:2022-05-24
下一篇:
C# ShapeLink类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap