ObjectInstanceState Class
Declaration
struct winrt::Microsoft::Azure::ObjectAnchors::ObjectInstanceState
Description
State of an object instance.
Methods
TryCreatePlacement
Initializes an object which maps coordinates in the model's coordinate space onto their corresponding locations in the Spatial Graph. The placement of the center of the model depends on where it is being viewed from, and will be computed by weighting each control point by its proximity to the view. This enables large models to smoothly span across the large physical space they occupy as the user moves around, despite non-rigid correspondence between the spaces, e.g. due to head tracking error, or imperfections in the model. A reference coordinate system must be provided to enable efficient per-frame computation of the pose of the object. The view pose provided each frame must be expressed in this reference coordinate system, though for convenience this may be moderated through a separate "world" coordinate system if necessary (for example, the native coordinate system used by the application versus the interop coordinate system used to initialize the placement). Returns null if the reference coordinate system cannot be located.
winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialGraphPlacement TryCreatePlacement(winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialGraphCoordinateSystem const& referenceCoordinateSystem);
Parameters
referenceCoordinateSystem
- The Spatial Graph coordinate system which will be used to compute view-dependent poses.
Returns
winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialGraphPlacement
Properties
Center
Center of this object instance in the coordinate frame of a spatial graph node.
winrt::Microsoft::Azure::ObjectAnchors::SpatialGraph::SpatialGraphLocation Center();
LastUpdatedTime
Last updated time.
winrt::Windows::Foundation::DateTime LastUpdatedTime();
ScaleChange
Scale changes applied to object model in centered coordinate system.
Windows::Foundation::Numerics::float3 ScaleChange();
SurfaceCoverage
Percentage of surface on object model that matches to real object at current pose, from 0 to 1. The higher the better.
float SurfaceCoverage();