当前位置: 首页>>代码示例>>C#>>正文


C# VisionViewBase.RenderLine方法代码示例

本文整理汇总了C#中VisionViewBase.RenderLine方法的典型用法代码示例。如果您正苦于以下问题:C# VisionViewBase.RenderLine方法的具体用法?C# VisionViewBase.RenderLine怎么用?C# VisionViewBase.RenderLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VisionViewBase的用法示例。


在下文中一共展示了VisionViewBase.RenderLine方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: ShowTraceResult

 public void ShowTraceResult(VisionViewBase view)
 {
     if (bResultValid)
       {
     float cx = 0, cy = 0, cz = 0;
     float r = EditorManager.Settings.GlobalUnitScaling * 5.0f;
     if (view.Project2D(hitPoint, ref cx, ref cy, ref cz))
       view.WriteText2D(cx, cy, hitPoint.ToString(), VisionColors.Yellow);
     view.RenderCross(hitPoint, r, VisionColors.Yellow, 1.0f);
     view.RenderLine(hitPoint, hitPoint + hitNormal * r * 3.0f, VisionColors.RGB(100, 255, 100), 1.0f);
       }
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:12,代码来源:MeasureTool.cs

示例4: OnHotSpotRender

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

示例5: 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

示例6: 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

示例7: 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);

              if (_hotSpotIntensity.Visible)
              {
            Vector3F vStart = Position;
            Vector3F vEnd = _hotSpotIntensity.Position;
            Vector3F vAng = _hotSpotAngle.Position;

            view.RenderLine(vStart, vEnd, VisionColors.Yellow, 1.0f);
              }
        }
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:19,代码来源:DynLightShape.cs

示例8: 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 = Position;
              Vector3F vFanInt = this._hotSpotFanIntensity.Position;
              Vector3F vFanAng = this._hotSpotFanAngle.Position;
              Vector3F vCycLen = this._hotSpotLength.Position;
              Vector3F vRad = this._hotSpotRadius.Position;

              if (ConstraintType == EngineInstanceConstraint.ConstraintType_e.Cyclone)
            view.RenderLine(vStart, vCycLen, VisionColors.Yellow, 1.0f);

              if ((ConstraintType == EngineInstanceConstraint.ConstraintType_e.Cyclone)
            ||(ConstraintType == EngineInstanceConstraint.ConstraintType_e.Point)
            ||(ConstraintType == EngineInstanceConstraint.ConstraintType_e.Sphere)
            ||(ConstraintType == EngineInstanceConstraint.ConstraintType_e.XAxis)
            ||(ConstraintType == EngineInstanceConstraint.ConstraintType_e.YAxis)
            ||(ConstraintType == EngineInstanceConstraint.ConstraintType_e.ZAxis))
            view.RenderLine(vStart, vRad, VisionColors.Yellow, 1.0f);
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:27,代码来源:ConstraintShape.cs


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