ObjectModel Class
Declaration
struct winrt::Microsoft::Azure::ObjectAnchors::ObjectModel
Description
An object model exposes visual and geometrics information about a physical object to be detected, as well as parameters to determine how that object can be detected by the object observer.
Methods
Dispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
void Dispose();
GetTriangleIndices
Returns triangle indices on object model surface.
void GetTriangleIndices(winrt::array_view<uint32_t> indices);
Parameters
indices
- Buffer to store triangle indices, allocated by the caller.
GetVertexNormals
Returns normals on object model surface in centered coordinate system.
void GetVertexNormals(winrt::array_view<Windows::Foundation::Numerics::float3> normals);
Parameters
normals
- Buffer to store the normals, allocated by the caller.
GetVertexPositions
Returns vertices on object model surface in centered coordinate system.
void GetVertexPositions(winrt::array_view<Windows::Foundation::Numerics::float3> vertices);
Parameters
vertices
- Buffer to store the vertexes, allocated by the caller.
LoadAsync
Load an object model from a byte array for offline inspection. Note that the returned model cannot be used to create an ObjectQuery, otherwise an will be thrown.
static Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectModel> LoadAsync(winrt::array_view<unsigned char const> buffer);
Parameters
buffer
- Byte array of an object model blob.
Returns
Windows::Foundation::IAsyncOperation<::winrt::Microsoft::Azure::ObjectAnchors::ObjectModel>
- System.Threading.Tasks.Task`1.
Properties
BoundingBox
Bounding box aligned to object's principle axii, with size in meters.
winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialOrientedBox BoundingBox();
Id
Unique id of an object model.
winrt::guid Id();
OriginToCenterTransform
Transform from the model origin to centered coordinate system.
Windows::Foundation::Numerics::float4x4 OriginToCenterTransform();
TriangleIndexCount
Index list length of triangles on object model surface.
uint32_t TriangleIndexCount();
VertexCount
Number of vertices on object model surface.
uint32_t VertexCount();