OrthographicViewState Class

Defines a spatial view that displays geometry on the image plane using a parallel orthographic projection.

Extends

Methods

Name Description
constructor(props: SpatialViewDefinitionProps, iModel: IModelConnection, categories: CategorySelectorState, displayStyle: DisplayStyle3dState, modelSelector: ModelSelectorState): OrthographicViewState    
supportsCamera(): boolean    

Inherited methods

Name Inherited from Description
_updateMaxGlobalScopeFactor(): void Protected SpatialViewState  
addViewedModel(id: string): void SpatialViewState  
adjustAspectRatio(aspect: number): void SpatialViewState Adjust the aspect ratio of this ViewState so it matches the supplied value.
alignToGlobe(target: Point3d, transition?: boolean): ViewStatus SpatialViewState For a geoLocated project, align the view with the global ellipsoid by rotating
allow3dManipulations(): boolean SpatialViewState Returns true if ViewTools are allowed to operate in three dimensions on this view.
applyPose(val: ViewPose): this SpatialViewState See applyPose.
attachToViewport(args: Viewport): void SpatialViewState See attachToViewport.
calcLensAngle(): Angle SpatialViewState Calculate the lens angle formed by the current delta and focus distance
calculateFocusCorners(): Point3d[] SpatialViewState  
calculateFrustum(result?: Frustum): undefined | Frustum SpatialViewState Calculate the world coordinate Frustum from the parameters of this ViewState.
cartographicToRoot(cartographic: Cartographic, result?: Point3d): undefined | Point3d SpatialViewState Convert a cartographic coordinate to a point in spatial coordinates.
cartographicToRootFromGcs(cartographic: Cartographic, result?: Point3d): Promise<undefined | Point3d> SpatialViewState Convert a cartographic coordinate to a point in spatial coordinates using the GCS reprojection.
cartographicToRootUsingGcs(cartographic: Cartographic[]): Promise<undefined | Point3d[]> SpatialViewState Convert cartographic coordinates to spatial coordinates using the GCS reprojection.
centerEyePoint(backDistance?: number): void SpatialViewState Place the eyepoint of the camera so it is aligned with the center of the view.
centerFocusDistance(): void SpatialViewState Center the focus distance of the camera halfway between the front plane and the back plane, keeping the eyepoint,
clearViewedModels(): void SpatialViewState  
clone(iModel?: IModelConnection): this SpatialViewState Make an independent copy of this EntityState
computeDisplayTransform(args: ComputeDisplayTransformArgs): undefined | Transform SpatialViewState Compute the transform applied to a model or element at display time, if any.
computeFitRange(options?: ComputeSpatialViewFitRangeOptions): Range3d SpatialViewState Compute a volume in world coordinates tightly encompassing the contents of the view.
detachFromViewport(): void SpatialViewState See detachFromViewport.
equals(other: this): boolean SpatialViewState Determine whether this ViewState exactly matches another.
forEachModel(func: (model: GeometricModelState) => void): void SpatialViewState Execute a function on each viewed model
forEachTileTreeRef(func: (treeRef: TileTreeReference) => void): void SpatialViewState Execute a function against each TileTreeReference associated with this view.
getAspectRatio(): number SpatialViewState Get the aspect ratio (width/height) of this view
getAspectRatioSkew(): number SpatialViewState Get the aspect ratio skew (x/y, usually 1.0) that is used to exaggerate the y axis of the view.
getAuxiliaryCoordinateSystemId(): string SpatialViewState Get the Id of the auxiliary coordinate system for this ViewState
getBackDistance(): number SpatialViewState Get the distance from the eyePoint to the back plane for this view.
getCartographicHeight(point: Readonly<WritableXYAndZ>): undefined | number SpatialViewState  
getCenter(result?: Point3d): Point3d SpatialViewState Get the point at the geometric center of the view.
getDisplayStyle3d(): DisplayStyle3dState SpatialViewState The style that controls how the contents of the view are displayed.
getDisplayedExtents(): Range3d Protected SpatialViewState Get world-space viewed extents based on the iModel's project extents.
getEarthFocalPoint(): undefined | Point3d SpatialViewState If the background map is displayed, return the point on the globe in directly front of the eye (or in center of view if camera off)
getExtents(): Vector3d SpatialViewState Get the extents of this view in CoordSystem.World coordinates.
getEyeCartographicHeight(): undefined | number SpatialViewState  
getEyeOrOrthographicViewPoint(): Point3d SpatialViewState Obtain an "eye" point for this view.
getEyePoint(): Point3d SpatialViewState Get the current location of the eyePoint for camera in this view.
getFocusDistance(): number SpatialViewState Get the distance from the eyePoint to the focus plane for this view.
getFrontDistance(): number SpatialViewState Get the distance from the eyePoint to the front plane for this view.
getGlobeRotation(): undefined | Matrix3d SpatialViewState If the view is not of the project as determined by getIsViewingProject then return
getGridOrientation(): GridOrientationType SpatialViewState Get the grid settings for this view
getGridSettings(vp: Viewport, origin: Point3d, rMatrix: Matrix3d, orientation: GridOrientationType): void SpatialViewState Populate the given origin and rotation with information from the grid settings from the grid orientation.
getGridSpacing(): Readonly<WritableXAndY> SpatialViewState  
getGridsPerRef(): number SpatialViewState  
getGroundElevation(): number SpatialViewState Returns the ground elevation taken from the environment added with the global z position of this imodel.
getGroundExtents(vp?: Viewport): Range3d SpatialViewState Return the ground extents, which will originate either from the viewport frustum or the extents of the imodel.
getIsViewingProject(): boolean SpatialViewState Return true if the view is looking at the current iModel project extents or
getLensAngle(): Angle SpatialViewState Get the lens angle for this view.
getModelAppearanceOverride(id: string): undefined | FeatureAppearance SpatialViewState Query the symbology overrides applied to a model when rendered using this ViewState.
getOrigin(): Point3d SpatialViewState Get the origin of this view in CoordSystem.World coordinates.
getRotation(): Matrix3d SpatialViewState Get the 3x3 ortho-normal Matrix3d for this view.
getSubCategoryOverride(id: string): undefined | SubCategoryOverride SpatialViewState Query the symbology overrides applied to geometry belonging to a specific subcategory when rendered using this ViewState.
getTargetPoint(result?: Point3d): Point3d SpatialViewState Get the target point of the view.
getUpVector(point: Point3d): Vector3d SpatialViewState Compute the vector in the "up" direction of a specific point in world space.
getViewClip(): undefined | ClipVector SpatialViewState Get the clipping volume for this view, if defined
getViewedExtents(): Range3d SpatialViewState Get the extents of this view in CoordSystem.World coordinates.
getXVector(result?: Vector3d): Vector3d SpatialViewState Get the unit vector that points in the view X (left-to-right) direction.
getYVector(result?: Vector3d): Vector3d SpatialViewState Get the unit vector that points in the view Y (bottom-to-top) direction.
getZVector(result?: Vector3d): Vector3d SpatialViewState Get the unit vector that points in the view Z (front-to-back) direction.
globalViewTransition(): number SpatialViewState A value representing the degree to which a view is viewing the globe as opposed to a specific location
hasSameCoordinates(other: ViewState): boolean SpatialViewState Determine whether this ViewState has the same coordinate system as another one.
is2d(): this is ViewState2d SpatialViewState Returns true if this ViewState is-a ViewState2d
is3d(): this is ViewState3d SpatialViewState See is3d.
isEyePointAbove(elevation: number): boolean SpatialViewState  
isEyePointGlobalView(eyePoint: Readonly<WritableXYAndZ>): boolean SpatialViewState  
isSheetView(): this is SheetViewState SpatialViewState Returns true if this ViewState is-a SheetViewState
load(): Promise<void> SpatialViewState Asynchronously load any required data for this ViewState from the backend.
lookAt(args: LookAtPerspectiveArgs | LookAtOrthoArgs | LookAtUsingLensAngle): ViewStatus SpatialViewState Setup view state for either perspective or orthographic view.
lookAtGlobalLocation(eyeHeight: number, pitchAngleRadians: number0, location?: GlobalLocation, eyePoint?: Point3d): number SpatialViewState Look at a global location, placing the camera's eye at the specified eye height above a viewed location.
lookAtGlobalLocationFromGcs(eyeHeight: number, pitchAngleRadians: number0, location?: GlobalLocation, eyePoint?: Point3d): Promise<number> SpatialViewState Look at a global location, placing the camera's eye at the specified eye height above a viewed location using the GCS.
lookAtViewAlignedVolume(volume: Range3d, aspect?: number, options?: MarginOptions & OnViewExtentsError): void SpatialViewState Look at a volume of space defined by a range in view local coordinates, keeping its current rotation.
lookAtVolume(volume: Readonly<WritableLowAndHighXYZ> | Readonly<WritableLowAndHighXY>, aspect?: number, options?: MarginOptions & OnViewExtentsError): void SpatialViewState Change the volume that this view displays, keeping its current rotation.
minimumFrontDistance(): number SpatialViewState  
moveCameraGlobal(fromPoint: Point3d, toPoint: Point3d): ViewStatus SpatialViewState Move camera about the global ellipsoid.
moveCameraLocal(distance: Vector3d): ViewStatus SpatialViewState Move the camera relative to its current location by a distance in camera coordinates.
moveCameraWorld(distance: Vector3d): ViewStatus SpatialViewState Move the camera relative to its current location by a distance in world coordinates.
removeViewedModel(id: string): void SpatialViewState  
resetExtentLimits(): void SpatialViewState Resets the largest and smallest values allowed for the extents of this ViewState to their default values.
rootToCartographic(root: Readonly<WritableXYAndZ>, result?: Cartographic): undefined | Cartographic SpatialViewState Convert a point in spatial coordinates to a cartographic coordinate.
rootToCartographicFromGcs(root: Readonly<WritableXYAndZ>, result?: Cartographic): Promise<undefined | Cartographic> SpatialViewState Convert a point in spatial coordinates to a cartographic coordinate using the GCS reprojection.
rootToCartographicUsingGcs(root: Readonly<WritableXYAndZ>[]): Promise<undefined | Cartographic[]> SpatialViewState Convert spatial coordinates to cartographic coordinates using the GCS reprojection.
rotateCameraLocal(angle: Angle, axis: Vector3d, aboutPt?: Point3d): ViewStatus SpatialViewState Rotate the camera from its current location about an axis relative to its current orientation.
rotateCameraWorld(angle: Angle, axis: Vector3d, aboutPt?: Point3d): ViewStatus SpatialViewState Rotate the camera from its current location about an axis in world coordinates.
savePose(): ViewPose3d SpatialViewState Capture a copy of the viewed volume and camera parameters.
setAllow3dManipulations(allow: boolean): void SpatialViewState Set whether ViewTools are allowed to operate in 3 dimensions on this view.
setAspectRatioSkew(val: number): void SpatialViewState Set the aspect ratio skew (x/y) for this view.
setAuxiliaryCoordinateSystem(acs?: AuxCoordSystemState): void SpatialViewState Set or clear the AuxiliaryCoordinateSystem for this view.
setCategorySelector(categories: CategorySelectorState): void SpatialViewState Set the CategorySelector for this view.
setCenter(center: Point3d): void SpatialViewState set the center of this view to a new position.
setDisplayStyle(style: DisplayStyleState): void SpatialViewState  
setExtents(extents: Readonly<WritableXYAndZ>): void SpatialViewState Set the extents of this view in CoordSystem.World coordinates.
setEyePoint(pt: Readonly<WritableXYAndZ>): void SpatialViewState Change the location of the eyePoint for the camera in this view.
setFocusDistance(dist: number): void SpatialViewState Set the focus distance for this view.
setGridSettings(orientation: GridOrientationType, spacing: Point2d, gridsPerRef: number): void SpatialViewState Set the grid settings for this view
setLensAngle(angle: Angle): void SpatialViewState Set the lens angle for this view.
setOrigin(origin: Readonly<WritableXYAndZ>): void SpatialViewState Set the origin of this view in CoordSystem.World coordinates.
setRotation(rot: Matrix3d): void SpatialViewState Change the rotation of the view.
setRotationAboutPoint(rotation: Matrix3d, point?: Point3d): void SpatialViewState Set the rotation of this ViewState to the supplied rotation, by rotating it about a point.
setStandardGlobalRotation(id: StandardViewId): void SpatialViewState Orient this view to one of the StandardView rotations, if the the view is not viewing the project then the
setStandardRotation(id: StandardViewId): void SpatialViewState Orient this view to one of the StandardView rotations.
setViewClip(clip?: ClipVector): void SpatialViewState Set or clear the clipping volume for this view.
setupFromFrustum(frustum: Frustum, opts?: OnViewExtentsError): ViewStatus SpatialViewState Initialize the origin, extents, and rotation from an existing Frustum
toJSON(): SpatialViewDefinitionProps SpatialViewState Convert to JSON representation.
toProps(): ViewStateProps SpatialViewState Serialize this ViewState as a set of properties that can be used to recreate it via createFromProps.
turnCameraOff(): void SpatialViewState Turn the camera off for this view.
verifyFocusPlane(): void SpatialViewState Ensure the focus plane lies between the front and back planes.
viewsCategory(id: string): boolean SpatialViewState Determine whether the specified Category is displayed in this view
viewsModel(modelId: string): boolean SpatialViewState Returns true if this view displays the contents of a Model specified by Id.
calculateMaxDepth(delta: Vector3d, zVec: Vector3d): number Protected Static SpatialViewState  
createBlank(iModel: IModelConnection, origin: Readonly<WritableXYAndZ>, extents: Readonly<WritableXYAndZ>, rotation?: Matrix3d): SpatialViewState Static SpatialViewState Create a new blank SpatialViewState.
createFromProps(props: ViewStateProps, iModel: IModelConnection): SpatialViewState Static SpatialViewState Create a new ViewState object from a set of properties.

Properties

Name Type Description
className Accessor Static ReadOnly string The name of the BIS class associated with this class.  

Inherited properties

Name Type Inherited from Description
_cameraOn Protected boolean SpatialViewState True if the camera is valid.
analysisStyle Accessor ReadOnly undefined | AnalysisStyle SpatialViewState See DisplayStyleSettings.analysisStyle.
areAllTileTreesLoaded Accessor ReadOnly boolean SpatialViewState Returns true if all TileTrees required by this view have been loaded.
Note that the map tile trees associated to the viewport rather than the view, to check the
map tiles as well call areAreAllTileTreesLoaded.
auxiliaryCoordinateSystem Accessor ReadOnly AuxCoordSystemState SpatialViewState get the auxiliary coordinate system state object for this ViewState.
backgroundColor Accessor ReadOnly ColorDef SpatialViewState Get this view's background color.
camera Readonly Camera SpatialViewState The camera used for this view.
categorySelector Accessor CategorySelectorState SpatialViewState Selects the categories that are display by this ViewState.
classFullName Accessor Static ReadOnly string SpatialViewState Get full BIS class name of this Entity in the form "SchemaName:ClassName".
classFullName Readonly string SpatialViewState The full class name in the form "schema:class".
className Accessor ReadOnly string SpatialViewState The name of the BIS class associated with this class.
code Readonly Code SpatialViewState The Code for this element
defaultExtentLimits Accessor ReadOnly { max: number, min: number } SpatialViewState Returns the default extent limits for this ViewState. These limits are used if the extentLimits have not been explicitly overridden.
description string | undefined SpatialViewState  
details Accessor ReadOnly ViewDetails3d SpatialViewState Provides access to optional detail settings for this view.
displayStyle Accessor DisplayStyle3dState SpatialViewState The style that controls how the contents of the view are displayed.
extentLimits Accessor ExtentLimits SpatialViewState Get or set the largest and smallest values allowed for the extents for this ViewState
The default limits vary based on the type of view:
- Spatial and drawing view extents cannot exceed the diameter of the earth.
- Sheet view extents cannot exceed ten times the paper size of the sheet.
Explicitly setting the extent limits overrides the default limits.
extents Readonly Vector3d SpatialViewState The extent of the view frustum.
federationGuid Readonly string | undefined SpatialViewState A FederationGuid assigned to this element by some other federated database
forceMinFrontDist number SpatialViewState Minimum distance for front plane
globalScopeFactor Accessor ReadOnly number SpatialViewState A value that represents the global scope of the view -- a value greater than one indicates that the scope of this view is global.
id Readonly string SpatialViewState The Id of this Entity.
iModel Readonly IModelConnection SpatialViewState The iModel from which this Entity was loaded
isAttachedToViewport Accessor ReadOnly boolean SpatialViewState Returns whether this view is currently being displayed by a Viewport.
isCameraOn Accessor ReadOnly boolean SpatialViewState  
isCameraValid Accessor ReadOnly boolean SpatialViewState Determine whether the camera is valid for this view
isGlobalView Accessor ReadOnly boolean SpatialViewState  
isPrivate boolean | undefined SpatialViewState  
jsonProperties Readonly [key: string]: any SpatialViewState Optional json properties of this Entity.
model Readonly string SpatialViewState The ModelId of the Model containing this element
modelDisplayTransformProvider Accessor undefined | ModelDisplayTransformProvider SpatialViewState An object that can provide per-model transforms to be applied at display time.
modelSelector Accessor ModelSelectorState SpatialViewState  
name Accessor ReadOnly string SpatialViewState Get the name of the ViewDefinition from which this ViewState originated.
onDisplayStyleChanged Readonly BeEvent<(newStyle: DisplayStyleState) => void> SpatialViewState An event raised just before assignment to the displayStyle property, only if the view is attached to a Viewport.
onModelDisplayTransformProviderChanged Readonly BeEvent<(newProvider: ModelDisplayTransformProvider) => void> SpatialViewState Event raised just before assignment to the modelDisplayTransformProvider property, only if the view is attached to a Viewport.
onViewedCategoriesChanged Readonly BeEvent<() => void> SpatialViewState An event raised when the set of categories viewed by this view changes, only if the view is attached to a Viewport.
onViewedModelsChanged Readonly BeEvent<() => void> SpatialViewState An event raised when the set of models viewed by this view changes, only if the view is attached to a Viewport.
origin Readonly Point3d SpatialViewState The lower left back corner of the view frustum.
parent Readonly RelatedElement | undefined SpatialViewState The parent Element of this, or undefined if no parent.
rotation Readonly Matrix3d SpatialViewState Rotation of the view frustum.
scheduleScript Accessor ReadOnly undefined | RenderSchedule.Script SpatialViewState The RenderSchedule.Script that animates the contents of the view, if any.
schemaName Accessor Static ReadOnly string SpatialViewState The name of the BIS schema for this class.
userLabel Readonly string | undefined SpatialViewState A user-assigned label for this element.
viewFlags Accessor ViewFlags SpatialViewState Flags controlling various aspects of this view's DisplayStyleState.

Defined in

Last Updated: 28 October, 2024