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


C# VisionViewBase类代码示例

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


VisionViewBase类属于命名空间,在下文中一共展示了VisionViewBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: OnHotSpotDragEnd

        public override void OnHotSpotDragEnd(HotSpotBase hotSpot, VisionViewBase view)
        {
            base.OnHotSpotDragEnd(hotSpot, view);

              if (hotSpot == _hotSpotWindSpeed)
              {
            Vector3F vNewSpeed = _hotSpotWindSpeed.CurrentPosition;
            Vector3F vOldSpeed = _hotSpotWindSpeed.StartPosition;
            if (WindInLocalSpace)
            {
              Matrix3F rot = Matrix3F.Transpose(RotationMatrix);
              vNewSpeed = Matrix3F.Transform(rot, vNewSpeed);
              vOldSpeed = Matrix3F.Transform(rot, vOldSpeed);
            }
            WindSpeed = vOldSpeed; // set old value for the action
            EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this, "WindSpeed", vNewSpeed)); // send an action which sets the property from old value to new one
              }
              else if (hotSpot == _hotSpotLightSamplingOffset)
              {
            Vector3F vNewOffset = _hotSpotLightSamplingOffset.CurrentPosition;
            Vector3F vOldOffset = _hotSpotLightSamplingOffset.StartPosition;

            LightSamplingOffset = vOldOffset; // set old value for the action
            EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this, "LightSamplingOffset", vNewOffset)); // send an action which sets the property from old value to new one
              }
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:26,代码来源: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); // render the bounding box

              // render direction vector
              if (_engineInstance!=null)
            EnginePGroup.RenderShape(view,mode);
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:13,代码来源:ParticleGroupShape.cs

示例5: OnHotSpotDragEnd

 /// <summary>
 /// Overridden function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 public override void OnHotSpotDragEnd(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view)
 {
     if (hotSpot==_hotSpotGravity)
       {
     if (_hotSpotGravity.HasChanged)
     {
       float fNewVal = _hotSpotGravity.CurrentDistance;
       Gravity = _hotSpotGravity.StartDistance; // set old value for the action
       EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"Gravity",fNewVal));
     }
       }
       if (hotSpot==_hotSpotLightGridOfs)
       {
     Vector3F vNewPos = _hotSpotLightGridOfs.CurrentPosition;
     LightGridSampleOfs = _hotSpotLightGridOfs.StartPosition; // set old value for the action
     EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"LightGridSampleOfs",vNewPos)); // send an action which sets the property from old value to new one
       }
 }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:23,代码来源:ClothObjectShape.cs

示例6: OnHotSpotDrag

 /// <summary>
 /// Overridden function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 /// <param name="fDeltaX"></param>
 /// <param name="fDeltaY"></param>
 public override void OnHotSpotDrag(CSharpFramework.View.HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY)
 {
     if (hotSpot==_hotSpotGravity)
     Gravity = _hotSpotGravity.CurrentDistance;
 }
开发者ID:bgarrels,项目名称:projectanarchy,代码行数:12,代码来源:ClothObjectShape.cs

示例7: OnHotSpotDragEnd

 /// <summary>
 /// Called when the user releases the mouse button on a hotspot
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 public override void OnHotSpotDragEnd(HotSpotBase hotSpot, VisionViewBase view)
 {
     if (hotSpot==_hotSpotSizeX)
       {
     if (_hotSpotSizeX.HasChanged)
     {
       float fNewSize = _hotSpotSizeX.CurrentDistance;
       this.BoxSizeX = _hotSpotSizeX.StartDistance; // set old value for the action
       EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"BoxSizeX",fNewSize)); // send an action which sets the property from old value to new one
     }
       }
       if (hotSpot==_hotSpotSizeY)
       {
     if (_hotSpotSizeY.HasChanged)
     {
       float fNewSize = _hotSpotSizeY.CurrentDistance;
       this.BoxSizeY = _hotSpotSizeY.StartDistance; // set old value for the action
       EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"BoxSizeY",fNewSize)); // send an action which sets the property from old value to new one
     }
       }
       if (hotSpot==_hotSpotSizeZ)
       {
     if (_hotSpotSizeZ.HasChanged)
     {
       float fNewSize = _hotSpotSizeZ.CurrentDistance;
       this.BoxSizeZ = _hotSpotSizeZ.StartDistance; // set old value for the action
       EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"BoxSizeZ",fNewSize)); // send an action which sets the property from old value to new one
     }
       }
 }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:35,代码来源:TriggerBoxShape.cs

示例8: OnHotSpotDrag

 /// <summary>
 /// Called while the user drags a hotspot that belongs to this shape
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 /// <param name="fDeltaX"></param>
 /// <param name="fDeltaY"></param>
 public override void OnHotSpotDrag(HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY)
 {
     if (hotSpot==_hotSpotSizeX)
     this.BoxSizeX = _hotSpotSizeX.CurrentDistance;
       if (hotSpot==_hotSpotSizeY)
     this.BoxSizeY = _hotSpotSizeY.CurrentDistance;
       if (hotSpot==_hotSpotSizeZ)
     this.BoxSizeZ = _hotSpotSizeZ.CurrentDistance;
 }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:16,代码来源:TriggerBoxShape.cs

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

示例10: OnHotSpotDragEnd

 /// <summary>
 /// Overridden hot spot handle function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 public override void OnHotSpotDragEnd(HotSpotBase hotSpot, VisionViewBase view)
 {
     base.OnHotSpotDragEnd (hotSpot, view);
       if (hotSpot==_hotSpotLightGridOfs)
       {
     Vector3F vNewPos = _hotSpotLightGridOfs.CurrentPosition;
     LightGridSampleOfs = _hotSpotLightGridOfs.StartPosition; // set old value for the action
     EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"LightGridSampleOfs",vNewPos)); // send an action which sets the property from old value to new one
       }
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:15,代码来源:EntityShape.cs

示例11: OnHotSpotDragBegin

 /// <summary>
 /// Overridden hot spot handle function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 public override void OnHotSpotDragBegin(HotSpotBase hotSpot, VisionViewBase view)
 {
     base.OnHotSpotDragBegin (hotSpot, view);
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:9,代码来源:EntityShape.cs

示例12: OnHotSpotDrag

 /// <summary>
 /// Overridden hot spot handle function
 /// </summary>
 /// <param name="hotSpot"></param>
 /// <param name="view"></param>
 /// <param name="fDeltaX"></param>
 /// <param name="fDeltaY"></param>
 public override void OnHotSpotDrag(HotSpotBase hotSpot, VisionViewBase view, float fDeltaX, float fDeltaY)
 {
     base.OnHotSpotDrag (hotSpot, view, fDeltaX, fDeltaY);
 }
开发者ID:shuaiharry,项目名称:projectanarchy,代码行数:11,代码来源:EntityShape.cs

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

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

示例15: OnDragEnd

        public override void OnDragEnd(VisionViewBase view)
        {
            base.OnDragEnd(view);
              float fNewSX = _inst.ScaleX;
              float fNewSY = _inst.ScaleY;
              float fDist = System.Math.Max(CurrentDistance,0.01f);

              if (_bHoriz)
            fNewSX = fDist;
              else
            fNewSY = fDist;
              EditorManager.Actions.Add(new ScaleBillboardAction(Billboard, _inst, _inst.ScaleX, _inst.ScaleY, fNewSX, fNewSY));
        }
开发者ID:elemen,项目名称:projectanarchy,代码行数:13,代码来源:BillboardGroupShape.cs


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