VersionFrames
Class in @bimworks/viewercommon.
API catalogue · @bimworks/viewercommon · Class
class VersionFramesviewer3d.frames of both 3D viewers: a loaded version's own frame (its coordinates before alignment and placement, in metres) and the render frame (the camera's and the section planes', mm). What a stored value keeps its coordinates in, as the render frame moves with the first loaded model (docs/ui-api-wp4/1-frames-and-placement.md F3)
Members#
| Member | Kind | Description |
|---|---|---|
| constructor | Method | |
| fromVersion | Method | A point in the version frame of vid in the render frame; null when vid is not loaded |
| fromVersionDirection | Method | A direction in the version frame of vid in the render frame, the same length; null when vid is not loaded |
| measurementToVersion | Method | A point of the measurement frame (where the measuring tools work, mm) in the version frame of vid; null when vid is not loaded |
| toVersion | Method | A render point in the version frame of vid; null when vid is not loaded |
| toVersionDirection | Method | A render direction in the version frame of vid, the same length; null when vid is not loaded |
| versionToMeasurement | Method | A point in the version frame of vid in the measurement frame (mm); null when vid is not loaded |
constructor#
constructor(viewer3d: object)Parameters#
| Name | Type | Description |
|---|---|---|
viewer3d |
object |
fromVersion#
fromVersion(vid: string, point: ArrayLike<number>): (number)[] | nullA point in the version frame of vid in the render frame; null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
point |
ArrayLike<number> |
fromVersionDirection#
fromVersionDirection(vid: string, direction: ArrayLike<number>): (number)[] | nullA direction in the version frame of vid in the render frame, the same length; null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
direction |
ArrayLike<number> |
measurementToVersion#
measurementToVersion(vid: string, point: ArrayLike<number>): [number, number, number] | nullA point of the measurement frame (where the measuring tools work, mm) in the version frame of vid; null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
point |
ArrayLike<number> |
toVersion#
toVersion(vid: string, point: ArrayLike<number>): [number, number, number] | nullA render point in the version frame of vid; null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
point |
ArrayLike<number> |
toVersionDirection#
toVersionDirection(vid: string, direction: ArrayLike<number>): (number)[] | nullA render direction in the version frame of vid, the same length; null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
direction |
ArrayLike<number> |
versionToMeasurement#
versionToMeasurement(vid: string, point: ArrayLike<number>): (number)[] | nullA point in the version frame of vid in the measurement frame (mm); null when vid is not loaded
Parameters#
| Name | Type | Description |
|---|---|---|
vid |
string |
|
point |
ArrayLike<number> |