View

Synopsis

Creates a view definition. View definitions are not visible entities. Views are primary designed to be used in Viewports.

Mixins

RenderMixin

BasePart

Canonicals

Name Type Description
eyePoint point Point from which the 'camera' is looking. Default is Point(0, 0, 1).

Parameters

Name Type Description
viewPoint point Point in the center of the view. Default is Point(0, 0, 0).
upVector vector Species which direction is 'up'. Default is Vector(0, 1, 0).
fieldWidth number Width of the view in model coordinates. Default is 1.
fieldHeight number Height of the view in model coordinates. Default is 1.
projection name Type of viewing projection. Choices include :Orthographic and :Perspective. The default is :Orthographic.
azimuth number Angle from +X axis. Default is 0.
elevation number Angle from XY plane. Default is 0.
viewDistance number Distance from eye to viewPoint.
viewName string Name for the view.
NearClipDistance any Distance toward eyePoint from viewPoint.
FarClipDistance any Distance away from viewPoint along viewVector.
autoFit? boolean If True, will auto-fit the view. Default is False.
scope name Relationship with global view collection. Choices are :Local, and :Global. Default is :Local.
showInModel any If True, shows the viewing pyramid. Default is False.

Rules

Name Type Description
viewVector vector Vector from eyePoint to viewPoint.
viewRightVector vector Unit vector in the +horizontal direction.

Methods

nearParallel?( v1 As Vector, _
               v2 As Vector ) As Boolean
Returns True if two vectors are near parallel (diff < 0.001 units).
projectPointOntoViewPlane( p As Point ) As Point
Projects a point onto the view plane, properly handling the projection type of the view. Note: the point is in World coordinates.