SpatialAnchor.TryCreateRelativeTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryCreateRelativeTo(SpatialCoordinateSystem) |
Creates an anchor at the origin of the specified coordinate system. |
TryCreateRelativeTo(SpatialCoordinateSystem, Vector3) |
Creates an anchor at a specific position within the specified coordinate system. |
TryCreateRelativeTo(SpatialCoordinateSystem, Vector3, Quaternion) |
Creates an anchor at a specific position and orientation within the specified coordinate system. This can return null if the system has reached its limit on spatial anchors. It may also return null if the specified coordinate system cannot be located this frame. |
TryCreateRelativeTo(SpatialCoordinateSystem)
Creates an anchor at the origin of the specified coordinate system.
public:
static SpatialAnchor ^ TryCreateRelativeTo(SpatialCoordinateSystem ^ coordinateSystem);
/// [Windows.Foundation.Metadata.Overload("TryCreateRelativeTo")]
static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem const& coordinateSystem);
[Windows.Foundation.Metadata.Overload("TryCreateRelativeTo")]
public static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem coordinateSystem);
function tryCreateRelativeTo(coordinateSystem)
Public Shared Function TryCreateRelativeTo (coordinateSystem As SpatialCoordinateSystem) As SpatialAnchor
Parameters
- coordinateSystem
- SpatialCoordinateSystem
The reference SpatialCoordinateSystem object.
Returns
The new anchor, if the creation attempt is successful; otherwise, null.
- Attributes
Remarks
This can return null if the system has reached its limit on spatial anchors. It may also return null if the specified coordinate system cannot be located this frame.
See also
- TryCreateRelativeTo(SpatialCoordinateSystem, Vector3)
- TryCreateRelativeTo(SpatialCoordinateSystem, Vector3, Quaternion)
Applies to
TryCreateRelativeTo(SpatialCoordinateSystem, Vector3)
Creates an anchor at a specific position within the specified coordinate system.
public:
static SpatialAnchor ^ TryCreateRelativeTo(SpatialCoordinateSystem ^ coordinateSystem, float3 position);
/// [Windows.Foundation.Metadata.Overload("TryCreateWithPositionRelativeTo")]
static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem const& coordinateSystem, float3 const& position);
[Windows.Foundation.Metadata.Overload("TryCreateWithPositionRelativeTo")]
public static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem coordinateSystem, Vector3 position);
function tryCreateRelativeTo(coordinateSystem, position)
Public Shared Function TryCreateRelativeTo (coordinateSystem As SpatialCoordinateSystem, position As Vector3) As SpatialAnchor
Parameters
- coordinateSystem
- SpatialCoordinateSystem
The reference SpatialCoordinateSystem object.
A point specified relative to the coordinate system of the source SpatialCoordinateSystem object.
Returns
The new anchor, if the creation attempt is successful; otherwise, null.
- Attributes
See also
- TryCreateRelativeTo(SpatialCoordinateSystem)
- TryCreateRelativeTo(SpatialCoordinateSystem, Vector3, Quaternion)
Applies to
TryCreateRelativeTo(SpatialCoordinateSystem, Vector3, Quaternion)
Creates an anchor at a specific position and orientation within the specified coordinate system.
This can return null if the system has reached its limit on spatial anchors. It may also return null if the specified coordinate system cannot be located this frame.
public:
static SpatialAnchor ^ TryCreateRelativeTo(SpatialCoordinateSystem ^ coordinateSystem, float3 position, quaternion orientation);
/// [Windows.Foundation.Metadata.Overload("TryCreateWithPositionAndOrientationRelativeTo")]
static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem const& coordinateSystem, float3 const& position, quaternion const& orientation);
[Windows.Foundation.Metadata.Overload("TryCreateWithPositionAndOrientationRelativeTo")]
public static SpatialAnchor TryCreateRelativeTo(SpatialCoordinateSystem coordinateSystem, Vector3 position, Quaternion orientation);
function tryCreateRelativeTo(coordinateSystem, position, orientation)
Public Shared Function TryCreateRelativeTo (coordinateSystem As SpatialCoordinateSystem, position As Vector3, orientation As Quaternion) As SpatialAnchor
Parameters
- coordinateSystem
- SpatialCoordinateSystem
The reference SpatialCoordinateSystem object.
A point specified relative to the coordinate system of the source SpatialCoordinateSystem object.
- orientation
-
Quaternion
Quaternion
quaternion
A rotation specified relative to the coordinate system of the source SpatialCoordinateSystem object. The orientation of the created anchor's coordinate system is offset by this rotation relative to the source coordinate system.
Returns
The new anchor, if the creation attempt is successful; otherwise, null.
- Attributes