GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components.Geometries
Mesh Class
A mesh is a general, client-side 3D geometry type
composed of vertices with attributes.
ArcGIS Maps SDK for JavaScript
public class Mesh : dymaptic.GeoBlazor.Core.Components.Geometries.Geometry
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 dymaptic.GeoBlazor.Core.Components.Geometries.Geometry 🡒 Mesh
Constructors
Mesh() Constructor
Parameterless constructor for use as a Razor Component.
public Mesh();
Mesh(IReadOnlyList, Nullable, Nullable, SpatialReference, MeshTransform, MeshVertexAttributes, IMeshVertexSpace) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public Mesh(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.MeshComponent>? components=null, System.Nullable<bool> hasM=null, System.Nullable<bool> hasZ=null, dymaptic.GeoBlazor.Core.Components.SpatialReference? spatialReference=null, dymaptic.GeoBlazor.Pro.Components.MeshTransform? transform=null, dymaptic.GeoBlazor.Pro.Components.MeshVertexAttributes? vertexAttributes=null, dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace? vertexSpace=null);
Parameters
components
System.Collections.Generic.IReadOnlyList<MeshComponent>
An array of mesh components that can be used to apply materials
to different regions of the same mesh.
ArcGIS Maps SDK for JavaScript
hasM
System.Nullable<System.Boolean>
Indicates if the geometry has M values.
ArcGIS Maps SDK for JavaScript
hasZ
System.Nullable<System.Boolean>
Indicates if the geometry has z-values (elevation).
ArcGIS Maps SDK for JavaScript
spatialReference
dymaptic.GeoBlazor.Core.Components.SpatialReference
The spatial reference of the geometry.
default SpatialReference.WGS84 // wkid: 4326
ArcGIS Maps SDK for JavaScript
transform
MeshTransform
Additional local transformation of the mesh vertices.
ArcGIS Maps SDK for JavaScript
vertexAttributes
MeshVertexAttributes
Object describing the attributes of each vertex of the mesh.
ArcGIS Maps SDK for JavaScript
vertexSpace
dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace
The vertex space of the mesh.
ArcGIS Maps SDK for JavaScript
Properties
Mesh.Components Property
An array of mesh components that can be used to apply materials
to different regions of the same mesh.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.MeshComponent>? Components { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<MeshComponent>
Mesh.Origin Property
The origin of the mesh.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.Geometries.Point? Origin { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Components.Geometries.Point
Mesh.Transform Property
Additional local transformation of the mesh vertices.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Pro.Components.MeshTransform? Transform { get; set; }
Property Value
Mesh.Type Property
The Geometry “type”, used internally to render.
public override dymaptic.GeoBlazor.Core.Enums.GeometryType Type { get; }
Property Value
dymaptic.GeoBlazor.Core.Enums.GeometryType
Mesh.VertexAttributes Property
Object describing the attributes of each vertex of the mesh.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Pro.Components.MeshVertexAttributes? VertexAttributes { get; set; }
Property Value
Mesh.VertexSpace Property
The vertex space of the mesh.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace? VertexSpace { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace
Methods
Mesh.AddComponent(MeshComponent) Method
Adds a component to the mesh.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task AddComponent(dymaptic.GeoBlazor.Pro.Components.MeshComponent component);
Parameters
component
MeshComponent
The component to add.
Returns
Mesh.AddToComponents(MeshComponent[]) Method
Asynchronously adds elements to the Components property.
public System.Threading.Tasks.Task AddToComponents(params dymaptic.GeoBlazor.Pro.Components.MeshComponent[] values);
Parameters
values
MeshComponent[]
The elements to add.
Returns
Mesh.CancelLoad() Method
Cancels a load() operation if it is already in progress.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task CancelLoad();
Returns
Mesh.CenterAt(Point, MeshCenterAtParameters) Method
Centers the mesh at the specified location without changing its scale.
param parameters Additional parameters.
param parameters.origin The origin at which to center. If not specified, the mesh will be centered at the mesh extent center.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.Geometries.Mesh?> CenterAt(dymaptic.GeoBlazor.Core.Components.Geometries.Point location, dymaptic.GeoBlazor.Pro.Model.MeshCenterAtParameters parameters);
Parameters
location
dymaptic.GeoBlazor.Core.Components.Geometries.Point
The location at which to center the mesh.
parameters
MeshCenterAtParameters
- parameters.geographic: Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator), and otherwise ignored. The default value is true. When true, the translation applied to center the mesh is done in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
Returns
System.Threading.Tasks.Task<Mesh>
Mesh.GetComponents() Method
Asynchronously retrieve the current value of the Components property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.MeshComponent>?> GetComponents();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<MeshComponent>>
Mesh.GetOrigin() Method
Asynchronously retrieve the current value of the Origin property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point?> GetOrigin();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point>
Mesh.GetTransform() Method
Asynchronously retrieve the current value of the Transform property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.MeshTransform?> GetTransform();
Returns
System.Threading.Tasks.Task<MeshTransform>
Mesh.GetVertexAttributes() Method
Asynchronously retrieve the current value of the VertexAttributes property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.MeshVertexAttributes?> GetVertexAttributes();
Returns
System.Threading.Tasks.Task<MeshVertexAttributes>
Mesh.GetVertexSpace() Method
Asynchronously retrieve the current value of the VertexSpace property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace?> GetVertexSpace();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace>
Mesh.IsFulfilled() Method
isFulfilled()
may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<System.Nullable<bool>> IsFulfilled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Mesh.IsRejected() Method
isRejected()
may be used to verify if creating an instance of the class is rejected.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<System.Nullable<bool>> IsRejected();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Mesh.IsResolved() Method
isResolved()
may be used to verify if creating an instance of the class is resolved.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<System.Nullable<bool>> IsResolved();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
Mesh.Load(CancellationToken) Method
Loads the resources referenced by this class.
param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError
when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<string?> Load(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
cancellationToken
System.Threading.CancellationToken
The CancellationToken to cancel an asynchronous operation.
Returns
System.Threading.Tasks.Task<System.String>
Mesh.Offset(double, double, double) Method
Offsets the mesh geometry by the specified distance in x, y, and z.
param dy The amount to offset the geometry in the y direction.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.Geometries.Mesh?> Offset(double dx, double dy, double dz);
Parameters
The amount to offset the geometry in the x direction.
The amount to offset the geometry in the y direction.
The amount to offset the geometry in the z direction.
Returns
System.Threading.Tasks.Task<Mesh>
Mesh.RemoveComponent(MeshComponent) Method
Removes a component from the mesh.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task RemoveComponent(dymaptic.GeoBlazor.Pro.Components.MeshComponent component);
Parameters
component
MeshComponent
The component to remove.
Returns
Mesh.RemoveFromComponents(MeshComponent[]) Method
Asynchronously remove an element from the Components property.
public System.Threading.Tasks.Task RemoveFromComponents(params dymaptic.GeoBlazor.Pro.Components.MeshComponent[] values);
Parameters
values
MeshComponent[]
The elements to remove.
Returns
Mesh.Rotate(double, double, double, MeshRotateParameters) Method
Rotates the mesh geometry around its x, y and z axis (in that order).
param angleY The angle by which to rotate around the y-axis (in degrees).
param parameters Additional parameters.
param parameters.origin The origin around which to rotate. If not specified, the mesh will be rotated around the Mesh.origin
.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.Geometries.Mesh?> Rotate(double angleX, double angleY, double angleZ, dymaptic.GeoBlazor.Pro.Model.MeshRotateParameters parameters);
Parameters
angleX
System.Double
The angle by which to rotate around the x-axis (in degrees).
angleY
System.Double
The angle by which to rotate around the y-axis (in degrees).
angleZ
System.Double
The angle by which to rotate around the z-axis (in degrees).
parameters
MeshRotateParameters
- parameters.geographic: Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator), and otherwise ignored. The default value is true. When true, the rotation is applied in a Cartesian system with respect to the local coordinate system on the globe and is specified in meters.
Returns
System.Threading.Tasks.Task<Mesh>
Mesh.Scale(double, MeshScaleParameters) Method
Scales the mesh geometry by the specified factor.
param parameters Additional parameters.
param parameters.origin The origin point for scaling. If not specified, the mesh will be scaled around the Mesh.origin
.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.Geometries.Mesh?> Scale(double factor, dymaptic.GeoBlazor.Pro.Model.MeshScaleParameters parameters);
Parameters
factor
System.Double
The amount to scale the geometry.
parameters
MeshScaleParameters
- parameters.geographic: Whether to georeference relative to the globe or the projected coordinate system (PCS). This parameter is only relevant for spatial references that can be used in both local and global viewing modes (currently only WebMercator), and otherwise ignored. The default value is true. When true, the scale is applied in a Cartesian system with respect to the local coordinate system on the globe.
Returns
System.Threading.Tasks.Task<Mesh>
Mesh.SetComponents(IReadOnlyList) Method
Asynchronously set the value of the Components property after render.
public System.Threading.Tasks.Task SetComponents(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.MeshComponent>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<MeshComponent>
The value to set.
Returns
Mesh.SetTransform(MeshTransform) Method
Asynchronously set the value of the Transform property after render.
public System.Threading.Tasks.Task SetTransform(dymaptic.GeoBlazor.Pro.Components.MeshTransform? value);
Parameters
value
MeshTransform
The value to set.
Returns
Mesh.SetVertexAttributes(MeshVertexAttributes) Method
Asynchronously set the value of the VertexAttributes property after render.
public System.Threading.Tasks.Task SetVertexAttributes(dymaptic.GeoBlazor.Pro.Components.MeshVertexAttributes? value);
Parameters
value
MeshVertexAttributes
The value to set.
Returns
Mesh.SetVertexSpace(IMeshVertexSpace) Method
Asynchronously set the value of the VertexSpace property after render.
public System.Threading.Tasks.Task SetVertexSpace(dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace? value);
Parameters
value
dymaptic.GeoBlazor.Core.Interfaces.IMeshVertexSpace
The value to set.
Returns
Mesh.ToBinaryGLTF(MeshToBinaryGLTFOptions, CancellationToken) Method
Export a mesh to a binary glTF (glb) representation.
param options.origin The origin of the exported model, defaults to Mesh.origin
. This location will correspond to the (0, 0, 0) coordinate in the binary glTF model.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<System.IO.Stream?> ToBinaryGLTF(dymaptic.GeoBlazor.Pro.Options.MeshToBinaryGLTFOptions options, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));
Parameters
options
MeshToBinaryGLTFOptions
Additional options.
- options.signal: An AbortSignal to abort the request. If canceled, the promise will be rejected with an error named
AbortError
. See also AbortController.
cancellationToken
System.Threading.CancellationToken
The CancellationToken to cancel an asynchronous operation.
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Mesh.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()
Mesh.VertexAttributesChanged() Method
Notifies that any cached values that depend on vertex attributes need to be recalculated.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task VertexAttributesChanged();
Returns
Mesh.When(Func, Func) Method
when()
may be leveraged once an instance of the class is created.
param errback The function to execute when the promise fails.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<string?> When(System.Func<System.Threading.Tasks.Task> callback, System.Func<System.Threading.Tasks.Task> errback);
Parameters
callback
System.Func<System.Threading.Tasks.Task>
The function to call when the promise resolves.
errback
System.Func<System.Threading.Tasks.Task>
The function to execute when the promise fails.