本文整理汇总了C#中Axiom.Core.Camera.NotifyViewport方法的典型用法代码示例。如果您正苦于以下问题:C# Camera.NotifyViewport方法的具体用法?C# Camera.NotifyViewport怎么用?C# Camera.NotifyViewport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Axiom.Core.Camera
的用法示例。
在下文中一共展示了Camera.NotifyViewport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Viewport
/// <summary>
/// The constructor. Dimensions of the viewport are expressed as a pecentage between
/// 0 and 100. This allows the dimensions to apply irrespective of
/// changes in the target's size: e.g. to fill the whole area,
/// values of 0,0,100,100 are appropriate.
/// </summary>
/// <param name="camera">Reference to the camera to be the source for the image.</param>
/// <param name="target">Reference to the render target to be the destination for the rendering.</param>
/// <param name="left">Left</param>
/// <param name="top">Top</param>
/// <param name="width">Width</param>
/// <param name="height">Height</param>
/// <param name="zOrder">Relative Z-order on the target. Lower = further to the front.</param>
public Viewport(Camera camera, RenderTarget target, float left, float top, float width, float height, int zOrder)
{
Debug.Assert(camera != null, "Cannot use a null Camera to create a viewport.");
Debug.Assert(target != null, "Cannor use a null RenderTarget to create a viewport.");
LogManager.Instance.Write("Creating viewport rendering from camera '{0}', relative dimensions L:{1},T:{2},W:{3},H:{4}, Z-Order:{5}",
camera.Name, left, top, width, height, zOrder);
this.camera = camera;
this.target = target;
this.zOrder = zOrder;
relativeLeft = left;
relativeTop = top;
relativeWidth = width;
relativeHeight = height;
backColor = ColorEx.Black;
clearEveryFrame = true;
clearBuffers = FrameBuffer.Color | FrameBuffer.Depth;
// Calculate actual dimensions
UpdateDimensions();
isUpdated = true;
showOverlays = true;
showSkies = true;
showShadows = true;
materialSchemeName = MaterialManager.DefaultSchemeName;
// notify camera
camera.NotifyViewport(this);
}
示例2: Viewport
/// <summary>
/// The constructor. Dimensions of the viewport are expressed as a pecentage between
/// 0 and 100. This allows the dimensions to apply irrespective of
/// changes in the target's size: e.g. to fill the whole area,
/// values of 0,0,100,100 are appropriate.
/// </summary>
/// <param name="camera">Reference to the camera to be the source for the image.</param>
/// <param name="target">Reference to the render target to be the destination for the rendering.</param>
/// <param name="left">Left</param>
/// <param name="top">Top</param>
/// <param name="width">Width</param>
/// <param name="height">Height</param>
/// <param name="zOrder">Relative Z-order on the target. Lower = further to the front.</param>
public Viewport( Camera camera, RenderTarget target, float left, float top, float width, float height, int zOrder )
: base()
{
LogManager.Instance.Write(
"Creating viewport rendering from camera '{0}', relative dimensions L:{1},T:{2},W:{3},H:{4}, Z-Order:{5}",
camera.Name, left, top, width, height, zOrder );
Camera = camera;
Target = target;
Left = left;
Top = top;
Width = width;
Height = height;
ZOrder = zOrder;
BackgroundColor = ColorEx.Black;
ClearDepth = 1.0;
ClearEveryFrame = true;
ClearBuffers = FrameBufferType.Color | FrameBufferType.Depth;
IsUpdated = false;
ShowOverlays = true;
ShowSkies = true;
ShowShadows = true;
VisibilityMask = 0xFFFFFFFFu;
IsAutoUpdated = true;
OrientationMode = DefaultOrientationMode;
// MaterialScheme = MaterialManager.DefaultSchemeName;
MaterialScheme = Root.Instance.RenderSystem.DefaultViewportMaterialScheme;
// Calculate actual dimensions
UpdateDimensions();
// notify camera
if ( camera != null )
{
camera.NotifyViewport( this );
}
}