本文整理汇总了C#中Frame.TransformedCopy方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.TransformedCopy方法的具体用法?C# Frame.TransformedCopy怎么用?C# Frame.TransformedCopy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame.TransformedCopy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createFrame
protected override Frame createFrame() {
_originalFrame = TestHandFactory.MakeTestFrame(0, true, true);
return _originalFrame.TransformedCopy(LeapTransform.Identity);
}
示例2: getTransformedFrame
protected Frame getTransformedFrame(Frame source)
{
LeapTransform leapTransform;
if (_temporalWarping != null) {
Vector3 warpedPosition;
Quaternion warpedRotation;
_temporalWarping.TryGetWarpedTransform(LeapVRTemporalWarping.WarpedAnchor.CENTER, out warpedPosition, out warpedRotation, source.Timestamp);
warpedRotation = warpedRotation * transform.localRotation;
leapTransform = new LeapTransform(warpedPosition.ToVector(), warpedRotation.ToLeapQuaternion(), transform.lossyScale.ToVector() * 1e-3f);
leapTransform.MirrorZ();
} else {
leapTransform = transform.GetLeapMatrix();
}
return source.TransformedCopy(leapTransform);
}
示例3: updateIfTransformMoved
protected void updateIfTransformMoved(Frame source, ref Frame toUpdate)
{
if (transform.hasChanged) {
_transformedFixedFrame = null;
_transformedUpdateFrame = null;
transform.hasChanged = false;
}
if (toUpdate == null) {
LeapTransform leapTransform;
if (_temporalWarping != null) {
Vector3 warpedPosition;
Quaternion warpedRotation;
_temporalWarping.TryGetWarpedTransform(LeapVRTemporalWarping.WarpedAnchor.CENTER, out warpedPosition, out warpedRotation, source.Timestamp);
warpedRotation = warpedRotation * transform.localRotation;
leapTransform = new LeapTransform(warpedPosition.ToVector(), warpedRotation.ToLeapQuaternion(), transform.lossyScale.ToVector() * 1e-3f);
leapTransform.MirrorZ();
} else {
leapTransform = transform.GetLeapMatrix();
}
toUpdate = source.TransformedCopy(leapTransform);
}
}