static BoundedPlane ToBoundedPlane(ARPlane plane) { TrackableId subsumedById = plane.subsumedBy == null ? default(TrackableId) : (TrackableId)plane.subsumedBy.trackableId; return(new BoundedPlane() { trackableId = plane.trackableId, subsumedById = subsumedById, center = plane.centerInPlaneSpace, pose = Internal.Pose.FromTransform(plane.transform), size = plane.size, alignment = plane.alignment, trackingState = plane.trackingState, nativePtr = plane.nativePtr, classification = plane.classification, }); }
public NativeArray <ARKitBlendShapeCoefficient> GetBlendShapeCoefficients(TrackableId faceId, Allocator allocator) { var face = ARKitReceiver.Instance?.Face; if (face == null) { Debug.LogWarning("face not found"); return(default(NativeArray <ARKitBlendShapeCoefficient>)); } var mesh = face.meshes.FirstOrDefault(f => f.id.Equals(faceId)); if (mesh == null) { Debug.LogWarning("face not found"); return(default(NativeArray <ARKitBlendShapeCoefficient>)); } return(NativeArrayExtension.FromRawBytes <ARKitBlendShapeCoefficient>(mesh.coefficients, allocator)); }