ViewingSpace Class

Describes a Viewport's viewing volume, plus its size on the screen. A new instance of ViewingSpace is created every time the Viewport's frustum changes.

@see viewingSpace.

Methods

Name Description
calcNpcToView(): Map4d    
getFrustum(sys: CoordSystemCoordSystem.World, adjustedBox: booleantrue, box?: Frustum): Frustum Get an 8-point Frustum corresponding to the 8 corners of the Viewport in the specified coordinate system.  
getViewCorners(): Range3d    
npcToView(pt: Point3d, out?: Point3d): Point3d Convert a point from CoordSystem.Npc to CoordSystem.View  
npcToViewArray(pts: Point3d[]): void Convert an array of points from CoordSystem.Npc to CoordSystem.View  
npcToWorld(pt: Readonly<WritableXYAndZ>, out?: Point3d): Point3d Convert a point from CoordSystem.Npc to CoordSystem.World  
npcToWorldArray(pts: Point3d[]): void Convert an array of points from CoordSystem.Npc to CoordSystem.World  
view4dToWorld(input: Point4d, out?: Point3d): Point3d Convert a point from CoordSystem.View as a Point4d to CoordSystem.View  
view4dToWorldArray(viewPts: Point4d[], worldPts: Point3d[]): void Convert an array of points from CoordSystem.View as Point4ds to CoordSystem.World  
viewToNpc(pt: Point3d, out?: Point3d): Point3d Convert a point from CoordSystem.View to CoordSystem.Npc  
viewToNpcArray(pts: Point3d[]): void Convert an array of points from CoordSystem.View to CoordSystem.Npc  
viewToWorld(input: Readonly<WritableXYAndZ>, out?: Point3d): Point3d Convert a point from CoordSystem.View to CoordSystem.World  
viewToWorldArray(pts: Point3d[]): void Convert an array of points from CoordSystem.View to CoordSystem.World  
worldToNpc(pt: Readonly<WritableXYAndZ>, out?: Point3d): Point3d Convert a point from CoordSystem.World to CoordSystem.Npc  
worldToNpcArray(pts: Point3d[]): void Convert an array of points from CoordSystem.World to CoordSystem.Npc  
worldToView(input: Readonly<WritableXYAndZ>, out?: Point3d): Point3d Convert a point from CoordSystem.World to CoordSystem.View  
worldToView4d(input: Readonly<WritableXYAndZ>, out?: Point4d): Point4d Convert a point from CoordSystem.World to CoordSystem.View as Point4d  
worldToView4dArray(worldPts: Point3d[], viewPts: Point4d[]): void Convert an array of points from CoordSystem.World to CoordSystem.View, as Point4ds  
worldToViewArray(pts: Point3d[]): void Convert an array of points from CoordSystem.World to CoordSystem.View  
createFromViewport(vp: Viewport): undefined | ViewingSpace Static Create from a Viewport.  

Properties

Name Type Description
eyePoint Readonly undefined | Point3d Eye point - undefined if not a perspective projection.  
getViewedExtents Readonly () => Range3d Compute the bounding box of this viewing space in CoordSystem.World coordinates, including the extents of any TiledGraphicsProviders registered with the Viewport.  
rotation Readonly Matrix3d View rotation matrix (copied from ViewState)  
view Accessor ViewState The ViewState for this Viewport  
viewDelta Readonly Vector3d View delta, potentially expanded  
viewDeltaUnexpanded Readonly Vector3d View delta (from ViewState, unexpanded)  
viewOrigin Readonly Point3d View origin, potentially expanded  
viewOriginUnexpanded Readonly Point3d View origin (from ViewState, unexpanded)  
worldToNpcMap Readonly Map4d Providers conversions between world and Npc (non-dimensional perspective) coordinates.  
worldToViewMap Readonly Map4d Provides conversions between world and view coordinates.  

Defined in

Last Updated: 17 December, 2024