本文整理汇总了C#中VisionViewBase类的典型用法代码示例。如果您正苦于以下问题:C# VisionViewBase类的具体用法?C# VisionViewBase怎么用?C# VisionViewBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisionViewBase类属于命名空间,在下文中一共展示了VisionViewBase类的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: 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
示例16: 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==_hotSpotSizeX)
{
if (_hotSpotSizeX.HasChanged)
{
float fNewVal = _hotSpotSizeX.CurrentDistance;
SizeX = _hotSpotSizeX.StartDistance; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"SizeX",fNewVal));
}
}
if (hotSpot==_hotSpotSizeY)
{
if (_hotSpotSizeY.HasChanged)
{
float fNewVal = _hotSpotSizeY.CurrentDistance;
SizeY = _hotSpotSizeY.StartDistance; // set old value for the action
EditorManager.Actions.Add(SetPropertyAction.CreateSetPropertyAction(this,"SizeY",fNewVal));
}
}
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:26,代码来源:MirrorShape.cs
示例17: RenderShape
/// <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);
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:11,代码来源:MirrorShape.cs
示例18: 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 (EngineHeightfieldGenerator == null)
return;
EngineHeightfieldGenerator.RenderShape(view,mode);
}
开发者ID:elemen,项目名称:projectanarchy,代码行数:14,代码来源:HeightFieldGeneratorShape.cs
示例19: OnHotSpotDragBegin
/// <summary>
/// Called when user starts dragging a hotspot that belongs to this shape
/// </summary>
/// <param name="hotSpot"></param>
/// <param name="view"></param>
public override void OnHotSpotDragBegin(HotSpotBase hotSpot, VisionViewBase view)
{
if (hotSpot==_hotSpotSizeX)
_hotSpotSizeX.StartDistance = this.BoxSizeX;
if (hotSpot==_hotSpotSizeY)
_hotSpotSizeY.StartDistance = this.BoxSizeY;
if (hotSpot==_hotSpotSizeZ)
_hotSpotSizeZ.StartDistance = this.BoxSizeZ;
}
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:14,代码来源:TriggerBoxShape.cs
示例20: 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
注:本文中的VisionViewBase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论