Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Vincent Dondain 85c955d0b2 [arkit] Update for Xcode 11 beta 2 and beta 3 (#6460) 2019-07-04 07:33:37 +02:00
Rolf Bjarne Kvinge 3484ebbf08
[monotouch-test] ARImageTrackingConfiguration is iOS 12+, so protect accordingly. (#5594) 2019-02-13 13:49:17 +01:00
Sebastien Pouliot 9baec99be2
[tests] Fix `ARCondigurationTest.GetSupportedVideoFormats` on older devices (#5409)
`ARImageTrackingConfiguration` requires iOS 12 (Xcode 10) so split it in
a separate test case.

Fixes https://github.com/xamarin/maccore/issues/1335
2019-01-15 13:43:52 -05:00
Sebastien Pouliot aa77c673c2
[arkit] Fix crash in ARConfiguration.SupportedVideoFormats. Fixes #5347 (#5348)
Even if 'supportedVideoFormats' is static the type is abstract.

> Important
> ARConfiguration is an abstract base class, so its implementation of
> this property always returns an empty array. Read this property from
> the configuration subclass you plan to use for your AR session, such
> as ARWorldTrackingConfiguration or ARFaceTrackingConfiguration.
https://developer.apple.com/documentation/arkit/arconfiguration/2942261-supportedvideoformats?language=objc

and this behave differently in Objective-C (than .net) as every (static)
method will be different (and not a single implementation like C#).

The existing implementation (as a property) calls `ARConfiguration`
implementation which simply throws a (native) exception

> NSInvalidArgumentException Reason: Supported video formats should be called on individual configuration class

The solution is to obsolete the property (can't be subclassed in .net
since it's static) and add, only on the subclasses, a method that
call the 'supportedVideoFormats' selector on the current (not base)
type.

Added unit test to detect the addition of newer subclasses - since they
will also need to expose this method.

reference: https://github.com/xamarin/xamarin-macios/issues/5347
2019-01-04 17:29:19 -05:00
Vincent Dondain 2f89775fc2 [arkit] Update to Xcode 10 beta 3 (#4406)
- Updated some ARReferenceObject APIs based on their (better) Swift names. Breaking changes but on new APIs.
- Update ARReferenceObjectTest for device (center and extent have real values on device).
- Reuploaded an arobject file from Beta 3 just in case because of: "ARReferenceObject and ARWorldMap data generated using iOS 12 beta 2 or earlier isn’t compatible with beta 3 or later. Please rescan your objects to generate new ARReferenceObject and ARWorldMap data."
2018-07-05 22:36:33 -04:00
Vincent Dondain 2f1859733d
[arkit] Update to Xcode 10 beta 1 (ARKit 2.0) (#4209)
I obsoleted `GetProjectPoint` in favor of `Project` because of the introduction of `Unproject` (which made me realize the naming was wrong) and based on the API doc https://developer.apple.com/documentation/arkit/arcamera/2923538-projectpoint?language=objc. 

The `CGPoint` returned is the projection of a point. An other naming option would have been `GetProjectedPoint` but I think `Project` is closer to the original and clear enough. You project/unproject something onto something else and you get the projection back.
2018-06-14 13:44:45 -04:00
Vincent Dondain 4c25aa94bd
[arkit] Update for Xcode 9.3 beta 1 (#3343)
- Obsolete `ARFaceAnchor`'s default constructor because it's marked as unavailable.
- Obsolete `CreateFaceGeometry` in `ARSCNFaceGeometry` in favor of `Create` (same as `ARSCNPlaneGeometry`).
2018-01-30 17:09:16 -05:00
Vincent Dondain 5cc720ff37
[backport][arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090) (#3342)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2018-01-29 11:07:52 -05:00
Rolf Bjarne Kvinge 7a674ec490 Tweak the Simd-compatible matrices and vectors (#2668)
* Rename them to be OpenTK.NMatrix# (instead of Simd.MatrixFloat#x#).
* Remove the Vector2 and Vector4 variants, we'll use the OpenTK types instead (but we'll keep the NVector3 variant, since it's not identical to the OpenTK version).
* Update the API to match their OpenTK counterparts better:
    * NMatrix2 and NMatrix3 have a 0-based R#C# scheme for their fields.
    * NMatrix4 has a 1-based M## scheme for its fields (i.e. no change).
2017-09-13 11:08:39 -04:00
Rolf Bjarne Kvinge 182c95e6bc Implement Simd vector types (VectorFloat2/3/4/VectorInt4). (#2622)
* Implement Simd vector types (VectorFloat2/3/4/VectorInt4).

* [ARKit/Vision] Use the new simd vector types instead of the OpenTK versions.

* [ModelIO] Use the new simd vectors in new API (MDLVoxelIndexExtent2).

This way we won't have to create a MDLVoxelIndexExtent3 in the future.

* [SpriteKit] Use the new simd vectors in new API.
2017-09-08 15:00:46 +02:00
Rolf Bjarne Kvinge 68f9908fd5 [ARKit] Fix marshalling for ARPointCloud.RawFeaturePoints. (#2565)
ARPointCloud.RawFeaturePoints is an array of Vector3, but each vector is
16-byte aligned (as if it were an array of Vector4).

This means we need to account for this when creating a managed array from
pointer to the native C-style array.
2017-08-30 13:32:46 -04:00
Vincent Dondain 302878b99b [arkit] Update for Xcode 9 beta 5 - Part 2 (#2505)
- Add last missing selector.
- Add tests for manual code.
2017-08-23 16:58:26 -04:00