Share via


PerceptionColorFrameSource.TryGetTransformTo(String, Matrix4x4) Method

Definition

This method returns the transform from the color frame source to the target entity and sets hasResult to true, if a correlation exists. If a correlation does not exist, hasResult is set to false and result is not modified.

public:
 virtual bool TryGetTransformTo(Platform::String ^ targetId, [Out] float4x4 & result) = TryGetTransformTo;
bool TryGetTransformTo(winrt::hstring const& targetId, [Out] float4x4 & result);
/// [Windows.Foundation.Metadata.Deprecated("PerceptionColorFrameSource may be unavailable after Windows Creator Update.  Use Windows.Media.Capture.Frames.MediaFrameSource instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
bool TryGetTransformTo(winrt::hstring const& targetId, [Out] float4x4 & result);
public bool TryGetTransformTo(string targetId, out Matrix4x4 result);
[Windows.Foundation.Metadata.Deprecated("PerceptionColorFrameSource may be unavailable after Windows Creator Update.  Use Windows.Media.Capture.Frames.MediaFrameSource instead.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 262144, "Windows.Foundation.UniversalApiContract")]
public bool TryGetTransformTo(string targetId, out Matrix4x4 result);
Public Function TryGetTransformTo (targetId As String, ByRef result As Matrix4x4) As Boolean

Parameters

targetId
String

Platform::String

winrt::hstring

The unique ID of the target entity.

result
Matrix4x4

float4x4

If a correlation exists, this will be set to a 4x4 transform matrix that changes basis from the color frame source coordinate system to the target entity coordinate system.

Returns

Boolean

bool

Returns true if a correlation exists, otherwise false.

Attributes

Applies to