Compartir a través de


Class Mesh

Meshes contain geometry data and Material references for rendering.

Meshes can't be loaded directly, instead when a model is loaded, for instance through RenderingConnection.LoadModelAsync(LoadModelOptions), the loaded model contains at least one Entity which has a MeshComponent which in turn references a mesh. Once a model is loaded, you can get the mesh reference and also assign it to other objects.

Mesh data can't be modified at runtime. It is possible to modify the materials that a mesh references, however, that would affect all entities which use that mesh. Instead, the preferred method is to specify override materials on a MeshComponent to change which materials are used for rendering.

class Microsoft::Azure::RemoteRendering::Mesh final : public Microsoft::Azure::RemoteRendering::ResourceBase

Methods

GetResourceStateAsync_Experimental

This asynchronous function retrieves the current state of this mesh resource.

auto GetResourceStateAsync_Experimental(std::function<void(Status, Microsoft::Azure::RemoteRendering::ResourceStateResult_Experimental)> callback) -> void;

Parameters

Name Type Description
  • callback

Returns

Type Description
void

See also

Properties

Bounds

Returns the local-space bounding box of the mesh.

auto GetBounds() const noexcept -> Microsoft::Azure::RemoteRendering::Bounds;

Materials

The list of materials used for rendering the mesh, unless overridden by a MeshComponent.

auto GetMaterials(std::vector<ApiHandle<Microsoft::Azure::RemoteRendering::Material>> & out) const noexcept -> void;

Type

The exact type of this resource.

auto GetType() const noexcept -> Microsoft::Azure::RemoteRendering::ObjectType;

Valid

Whether this resource is still valid.

A resource is invalid if it has been destroyed or if the connection has been lost. It is an error to call any other function on an invalid object.

auto GetValid() const noexcept -> bool;

See also