import MeshLocalVertexSpace from "@arcgis/core/geometry/support/MeshLocalVertexSpace.js";const MeshLocalVertexSpace = await $arcgis.import("@arcgis/core/geometry/support/MeshLocalVertexSpace.js");- Inheritance
- MeshLocalVertexSpace→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.27
Represents a vertex space that interprets Mesh vertex positions as x, y, z values measured in meters from the source model's own [0,0,0].
A vertex space is the Mesh.vertexSpace object that tells the SDK how to read the x, y, z positions stored in Mesh.vertexAttributes.position. Use MeshLocalVertexSpace when those positions describe the shape of a source model relative to the model's own [0,0,0], and you want to place that model in a global SceneView.
The vertex space's origin is the [x, y, z] coordinate where the source model's [0,0,0] lands. The origin values use the coordinate system identified by Mesh.spatialReference. For example, with WGS84 the origin contains longitude, latitude, and elevation values; with Web Mercator it contains Web Mercator x, y, and z values.
In a global scene with WGS84, CGCS2000, or Web Mercator, the SDK places the model on a local tangent plane at the origin. The x-axis points east, the y-axis points north, and the z-axis points up.
The word local refers to local coordinates from the source model. It does not mean this vertex space is used for a local SceneView. For local scenes, use MeshGeoreferencedVertexSpace and a Mesh.spatialReference that matches SceneView.spatialReference.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
origin
Coordinates of the place where the source model's local [0,0,0] is anchored.
The array is [x, y, z] in the coordinate system identified by the Mesh.spatialReference property of the Mesh geometry that uses this vertex space. The vertex position [0,0,0] coincides with the vertex space's origin before any Mesh.transform is applied.
Methods
| Method | Signature | Class |
|---|---|---|
| inherited static | fromJSON(json: any): any | |
| inherited | clone(): this | |
| inherited | toJSON(): any |
fromJSON
- Signature
-
fromJSON (json: any): any
Creates a new instance of this class and initializes it with values from a JSON object
generated from an ArcGIS product. The object passed into the input json
parameter often comes from a response to a query operation in the REST API or a
toJSON()
method from another ArcGIS product. See the Using fromJSON()
topic in the Guide for details and examples of when and how to use this function.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects. | |
- Returns
- any
Returns a new instance of this class.
clone
- Signature
-
clone (): this
Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.
- Returns
- this
A deep clone of the class instance that invoked this method.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.