ViewInfo

References
public class ViewInfo : IDisposable
Represents the name and orientation of a View (and named view).

views can be thought of as cameras.

Constructors

ViewInfo

#Since v8.2
Create a default ViewInfo instance
public ViewInfo()

ViewInfo

#Since v6.0
Access to the ViewInfo for given RhinoViewport
public ViewInfo(
rhinoViewPort
)

ViewInfo

#Since v6.0
Construct the ViewInfo for active viewport of given doc.
[CLSCompliant(false)] public ViewInfo(
docRuntimeSerialNumber
Runtime serial number of the document to query for the active viewport
)

Finalizer

~ViewInfo

#
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
~ViewInfo()

Properties

ClippingPlanesIds

#Since v8.15
Returns a list of clipping plane Ids associated with this view.
public Guid[] ClippingPlanesIds { get; }

DisplayModeId

#Since v8.36
The id of the display mode this view opens in - wireframe, shaded, rendered, or any custom display mode. DisplayModeDescription holds the standard ids. A nil id means the view has no display mode of its own and opens in wireframe, which is what every template generated without this property did.
public Guid DisplayModeId { get; set; }

FocalBlurAperture

#Since v6.0
Gets or sets the Focal blur aperture of the active viewport
public double FocalBlurAperture { get; set; }

FocalBlurDistance

#Since v6.0
Gets or sets the Focal blur distance of the active viewport
public double FocalBlurDistance { get; set; }

FocalBlurJitter

#Since v6.0
Gets or sets the Focal blur jitter of the active viewport
public double FocalBlurJitter { get; set; }

FocalBlurMode

#Since v6.0
Gets or sets the Focal blur mode of the active viewport
[CLSCompliant(false)] public ViewInfoFocalBlurModes FocalBlurMode { get; set; }

FocalBlurSampleCount

#Since v6.0
Gets or sets the Focal blur sample count of the active viewport
[CLSCompliant(false)] public uint FocalBlurSampleCount { get; set; }

LockedProjection

#Since v8.36
Whether the view's projection is locked against changes.
public bool LockedProjection { get; set; }

Maximized

#Since v9.0
Gets or sets whether the view window is maximized in the frame window. Together with the window position (see GetWindowPosition(double, double, double, double)) this is stored in the 3dm file and controls the viewport layout when the file is opened.
public bool Maximized { get; set; }

Name

#Since v5.0
Gets or sets the name of the view.
public string Name { get; set; }

NamedViewId

#Since v7.28
Returns a unique id if this is a named view otherwise an empty Guid.
public Guid NamedViewId { get; set; }

RenderingSize

#Since v8.36
The pixel size this view renders at.
public Size RenderingSize { get; set; }

SectionBehavior

#Since v8.0
How a view will interact with clipping planes
public ViewSectionBehavior SectionBehavior { get; set; }

ShowConstructionAxes

#Since v8.36
Whether the construction plane x and y axes are drawn in this view.
public bool ShowConstructionAxes { get; set; }

ShowConstructionGrid

#Since v8.36
Whether the construction plane grid is drawn in this view.
public bool ShowConstructionGrid { get; set; }

ShowConstructionZAxis

#Since v8.36
Whether the construction plane z axis is drawn in this view.
public bool ShowConstructionZAxis { get; set; }

ShowWallpaperInGrayScale

#Since v6.0
True if wallpaper (if any) is to be shown in gray scale in this view.
public bool ShowWallpaperInGrayScale { get; }

ShowWorldAxes

#Since v8.36
Whether the world axes icon is drawn in the corner of this view.
public bool ShowWorldAxes { get; set; }

Viewport

#Since v5.0
Gets the viewport, or viewing frustum, associated with this view.
public ViewportInfo Viewport { get; }

ViewType

#Since v8.36
Whether this view is a model view, a layout page, a nested (detail) view, or one of the special editor views. A page view must be an orthographic top view; see PageSettings for its paper size.
public ViewType ViewType { get; set; }

WallpaperFilename

#Since v6.0
Get filename for wallpaper set to this view, if any.
public string WallpaperFilename { get; }

WallpaperHidden

#Since v6.0
True if wallpaper (if any) is to be hidden from this view.
public bool WallpaperHidden { get; }

Methods

ClippingPlaneSurfaces

#Since v8.17
Returns a list of ClippingPlaneSurfaces for this view.
public ClippingPlaneSurface[] ClippingPlaneSurfaces()

Dispose

#Since v5.0
Actively reclaims unmanaged resources that this instance uses.
public void Dispose()

Dispose

#
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

protected virtual void Dispose(
disposing
true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.
)

GetConstructionPlane

#Since v8.35
Gets the view's construction plane, including its grid settings: grid and snap spacing, grid line count, thick-line frequency, and depth buffering.
public ConstructionPlane GetConstructionPlane()
A copy of the view's construction plane.

GetPageSettings

#Since v8.36
Gets the paper size and margins of this view. Only meaningful when ViewType is ViewType.PageView.
public PageSettings GetPageSettings()

GetWindowPosition

#Since v9.0
Gets the position of the view window in the frame window, expressed as fractions (0 to 1) of the frame window size.
public void GetWindowPosition(
out double
left,
Left edge fraction.
out double
right,
Right edge fraction.
out double
top,
Top edge fraction.
out double
bottom
Bottom edge fraction.
)

SetConstructionPlane

#Since v8.35
Sets the view's construction plane, including its grid settings.
public void SetConstructionPlane(
constructionPlane
The construction plane to store on the view.
)

SetPageSettings

#Since v8.36
Sets the paper size and margins of this view. Set ViewType to ViewType.PageView as well, or the page settings are ignored.
public void SetPageSettings(
pageSettings
)

SetWindowPosition

#Since v9.0
Sets the position of the view window in the frame window, expressed as fractions (0 to 1) of the frame window size. The Maximized state is preserved.
public void SetWindowPosition(
left,
Left edge fraction.
right,
Right edge fraction.
top,
Top edge fraction.
bottom
Bottom edge fraction.
)