SpatialViewState Class

Defines a view of one or more SpatialModels. The list of viewed models is stored in the ModelSelector.

Extends

Extended by

Implements

Methods

Name Description
constructor(props: SpatialViewDefinitionProps, iModel: IModelConnection, arg3: CategorySelectorState, displayStyle: DisplayStyle3dState, modelSelector: ModelSelectorState): SpatialViewState    
addViewedModel(id: Id64String): void    
clearViewedModels(): void    
computeFitRange(): AxisAlignedBox3d    
createAuxCoordSystem(acsName: string): AuxCoordSystemState    
equals(other: this): boolean    
forEachModel(func: (model: GeometricModelState) => void): void    
getViewedExtents(): AxisAlignedBox3d    
load(): Promise<void>    
removeViewedModel(id: Id64String): void    
toJSON(): SpatialViewDefinitionProps    
viewsModel(modelId: Id64String): boolean    
createBlank(iModel: IModelConnection, origin: XYAndZ, extents: XYAndZ, rotation?: Matrix3d): SpatialViewState Static Create a new blank SpatialViewState. Beta
createFromProps(props: ViewStateProps, iModel: IModelConnection): SpatialViewState Static    

Inherited methods

Name Inherited from Description
allow3dManipulations(): boolean ViewState3d  
calcLensAngle(): Angle ViewState3d Calculate the lens angle formed by the current delta and focus distance
calculateFrustum(result?: Frustum): Frustum | undefined ViewState Calculate the world coordinate Frustum from the parameters of this ViewState.
centerEyePoint(backDistance?: number): void ViewState3d Place the eyepoint of the camera so it is aligned with the center of the view.
centerFocusDistance(): void ViewState3d Center the focus distance of the camera halfway between the front plane and the back plane, keeping the eyepoint,
lens angle, rotation, back distance, and front distance unchanged.
clone(iModel?: IModelConnection): this EntityState Make an independent copy of this EntityState
decorate(context: DecorateContext): void ViewState3d  
getAspectRatio(): number ViewState Get the aspect ratio (width/height) of this view
getAspectRatioSkew(): number ViewState Get the aspect ratio skew (x/y, usually 1.0) that is used to exaggerate the y axis of the view.
getAuxiliaryCoordinateSystemId(): Id64String ViewState Get the Id of the auxiliary coordinate system for this ViewState
getBackDistance(): number ViewState3d Get the distance from the eyePoint to the back plane for this view.
getCenter(result?: Primitives.Point3d): Point3d ViewState Get the point at the geometric center of the view.
getDetails(): any ViewState  
getDisplayStyle3d(): DisplayStyle3dState ViewState3d  
getExtents(): Vector3d ViewState3d  
getEyePoint(): Point3d ViewState3d Get the current location of the eyePoint for camera in this view.
getFocusDistance(): number ViewState3d Get the distance from the eyePoint to the focus plane for this view.
getFrontDistance(): number ViewState3d Get the distance from the eyePoint to the front plane for this view.
getGridOrientation(): GridOrientationType ViewState Get the grid settings for this view
getGridSettings(vp: Viewport, origin: Point3d, rMatrix: Matrix3d, orientation: GridOrientationType): void ViewState Populate the given origin and rotation with information from the grid settings from the grid orientation.
getGridSpacing(): XAndY ViewState  
getGridsPerRef(): number ViewState  
getGroundElevation(): number ViewState3d Returns the ground elevation taken from the environment added with the global z position of this imodel.
getGroundExtents(vp?: Viewport): AxisAlignedBox3d ViewState3d Return the ground extents, which will originate either from the viewport frustum or the extents of the imodel.
getLensAngle(): Angle ViewState3d Get the lens angle for this view.
getOrigin(): Point3d ViewState3d  
getRotation(): Matrix3d ViewState3d  
getSubCategoryOverride(id: Id64String): SubCategoryOverride | undefined ViewState Query the symbology overrides applied to geometry belonging to a specific subcategory when rendered using this ViewState.
getTargetPoint(result?: Primitives.Point3d): Point3d ViewState3d Get the target point of the view.
getViewClip(): ClipVector | undefined ViewState Get the clipping volume for this view, if defined
getXVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view X (left-to-right) direction.
getYVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view Y (bottom-to-top) direction.
getZVector(result?: Vector3d): Vector3d ViewState Get the unit vector that points in the view Z (front-to-back) direction.
is2d(): boolean ViewState Returns true if this ViewState is-a ViewState2d
is3d(): boolean ViewState Returns true if this ViewState is-a ViewState3d
isDrawingView(): boolean ViewState Returns true if this ViewState is-a DrawingViewState
isEyePointAbove(elevation: number): boolean ViewState3d  
isSpatialView(): boolean ViewState Returns true if this ViewState is-a SpatialViewState
lookAt(eyePoint: XYAndZ, targetPoint: XYAndZ, upVector: Vector3d, newExtents?: XAndY, frontDistance?: number, backDistance?: number): ViewStatus ViewState3d Position the camera for this view and point it at a new target point.
lookAtUsingLensAngle(eyePoint: Point3d, targetPoint: Point3d, upVector: Vector3d, fov: Angle, frontDistance?: number, backDistance?: number): ViewStatus ViewState3d Position the camera for this view and point it at a new target point, using a specified lens angle.
lookAtViewAlignedVolume(volume: Range3d, aspect?: number, margin?: MarginPercent): void ViewState Look at a volume of space defined by a range in view local coordinates, keeping its current rotation.
lookAtVolume(volume: LowAndHighXYZ | LowAndHighXY, aspect?: number, margin?: MarginPercent): void ViewState Change the volume that this view displays, keeping its current rotation.
minimumFrontDistance(): number ViewState3d  
moveCameraLocal(distance: Vector3d): ViewStatus ViewState3d Move the camera relative to its current location by a distance in camera coordinates.
moveCameraWorld(distance: Vector3d): ViewStatus ViewState3d Move the camera relative to its current location by a distance in world coordinates.
onRenderFrame(_viewport: Viewport): void ViewState3d  
resetExtentLimits(): void ViewState Resets the largest and smallest values allowed for the extents of this ViewState to their default values.
rotateCameraLocal(angle: Angle, axis: Vector3d, aboutPt?: Primitives.Point3d): ViewStatus ViewState3d Rotate the camera from its current location about an axis relative to its current orientation.
rotateCameraWorld(angle: Angle, axis: Vector3d, aboutPt?: Primitives.Point3d): ViewStatus ViewState3d Rotate the camera from its current location about an axis in world coordinates.
setAspectRatioSkew(val: number): void ViewState Set the aspect ratio skew (x/y) for this view.
setAuxiliaryCoordinateSystem(acs?: AuxCoordSystemState): void ViewState Set or clear the AuxiliaryCoordinateSystem for this view.
setCategorySelector(categories: CategorySelectorState): void ViewState Set the CategorySelector for this view.
setDisplayStyle(style: DisplayStyleState): void ViewState  
setExtents(extents: XYAndZ): void ViewState3d  
setEyePoint(pt: XYAndZ): void ViewState3d Change the location of the eyePoint for the camera in this view.
setFocusDistance(dist: number): void ViewState3d Set the focus distance for this view.
setGridSettings(orientation: GridOrientationType, spacing: Point2d, gridsPerRef: number): void ViewState Set the grid settings for this view
setLensAngle(angle: Angle): void ViewState3d Set the lens angle for this view.
setOrigin(origin: XYAndZ): void ViewState3d  
setRotation(rot: Matrix3d): void ViewState3d  
setRotationAboutPoint(rotation: Matrix3d, point?: Primitives.Point3d): void ViewState Set the rotation of this ViewState to the supplied rotation, by rotating it about a point.
setStandardRotation(id: StandardViewId): void ViewState Orient this view to one of the StandardView rotations.
setViewClip(clip?: ClipVector): void ViewState Set or clear the clipping volume for this view.
setupFromFrustum(frustum: Frustum): ViewStatus ViewState3d  
supportsCamera(): boolean ViewState3d  
turnCameraOff(): void ViewState3d Turn the camera off for this view.
verifyFocusPlane(): void ViewState3d Ensure the focus plane lies between the front and back planes.
viewsCategory(id: Id64String): boolean ViewState Determine whether the specified Category is displayed in this view
calculateMaxDepth(delta: Vector3d, zVec: Vector3d): number ProtectedStatic ViewState3d  

Properties

Name Type Description
defaultExtentLimits Accessor ReadOnly object    
modelSelector ModelSelectorState    

Inherited properties

Name Type Inherited from Description
_cameraOn Protected boolean ViewState3d True if the camera is valid.
analysisStyle Accessor ReadOnly AnalysisStyle | undefined ViewState Get the AnalysisDisplayProperties from the displayStyle of this ViewState.
auxiliaryCoordinateSystem Accessor ReadOnly AuxCoordSystemState ViewState get the auxiliary coordinate system state object for this ViewState.
backgroundColor Accessor ReadOnly ColorDef ViewState Get this view's background color.
camera Camera ViewState3d The camera used for this view.
categorySelector CategorySelectorState ViewState Selects the categories that are display by this ViewState.
classFullName Accessor StaticReadOnly string EntityState Get full BIS class name of this Entity in the form "SchemaName:ClassName".
classFullName string EntityState The full class name in the form "schema:class".
className Accessor ReadOnly string EntityState The name of the BIS class associated with this class.
code Code ElementState The Code for this element
description undefined | string ViewState  
displayStyle DisplayStyleState ViewState Selects the styling parameters for this this ViewState.
extentLimits Accessor ExtentLimits ViewState 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 view extents cannot exceed the diameter of the earth.
- Drawing view extents cannot exceed twice the longest axis of the drawing model's range.
- Sheet view extents cannot exceed ten times the paper size of the sheet.
Explicitly setting the extent limits overrides the default limits.
extents Vector3d ViewState3d The extent of the view frustum.
federationGuid undefined | GuidString ElementState A FederationGuid assigned to this element by some other federated database
forceMinFrontDist number ViewState3d Minimum distance for front plane
id Id64String EntityState The Id of this Entity.
iModel IModelConnection EntityState The iModel from which this Entity was loaded
isCameraOn Accessor ReadOnly boolean ViewState3d  
isCameraValid Accessor ReadOnly boolean ViewState3d Determine whether the camera is valid for this view
isPrivate undefined | false | true ViewState  
jsonProperties [key: string]: any EntityState Optional json properties of this Entity.
model Id64String ElementState The ModelId of the Model containing this element
name Accessor ReadOnly string ViewState Get the name of the ViewDefinition from which this ViewState originated.
origin Point3d ViewState3d The lower left back corner of the view frustum.
parent undefined | RelatedElement ElementState The parent Element of this, or undefined if no parent.
rotation Matrix3d ViewState3d Rotation of the view frustum.
schemaName Accessor StaticReadOnly string EntityState The name of the BIS schema for this class.
userLabel undefined | string ElementState A user-assigned label for this element.
viewFlags Accessor ReadOnly ViewFlags ViewState Get the ViewFlags from the DisplayStyleState of this ViewState.

Defined in

Last Updated: 13 October, 2019