本文整理汇总了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;
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}