react-native-nitro-ar 2026.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +347 -0
- package/app.plugin.js +24 -0
- package/ios/Bridge.h +8 -0
- package/ios/HybridARAnchor.swift +58 -0
- package/ios/HybridARBoundingBoxBuilder.swift +142 -0
- package/ios/HybridARDepthData.swift +138 -0
- package/ios/HybridARFrame.swift +121 -0
- package/ios/HybridARLightEstimate.swift +58 -0
- package/ios/HybridARMeasurement.swift +33 -0
- package/ios/HybridARMeshAnchor.swift +108 -0
- package/ios/HybridARPlaneAnchor.swift +114 -0
- package/ios/HybridARRaycastResult.swift +53 -0
- package/ios/HybridARSession.swift +505 -0
- package/ios/HybridARView.swift +725 -0
- package/ios/HybridARVolume.swift +52 -0
- package/ios/HybridARWorldMap.swift +55 -0
- package/lib/commonjs/index.js +24 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +3 -0
- package/lib/commonjs/specs/ARAnchor.nitro.js +6 -0
- package/lib/commonjs/specs/ARAnchor.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARBoundingBoxBuilder.nitro.js +6 -0
- package/lib/commonjs/specs/ARBoundingBoxBuilder.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARDepthData.nitro.js +6 -0
- package/lib/commonjs/specs/ARDepthData.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARFrame.nitro.js +6 -0
- package/lib/commonjs/specs/ARFrame.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARLightEstimate.nitro.js +6 -0
- package/lib/commonjs/specs/ARLightEstimate.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARMeasurement.nitro.js +6 -0
- package/lib/commonjs/specs/ARMeasurement.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARPlaneAnchor.nitro.js +6 -0
- package/lib/commonjs/specs/ARPlaneAnchor.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARRaycastResult.nitro.js +6 -0
- package/lib/commonjs/specs/ARRaycastResult.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARSceneMesh.nitro.js +6 -0
- package/lib/commonjs/specs/ARSceneMesh.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARSession.nitro.js +6 -0
- package/lib/commonjs/specs/ARSession.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARView.nitro.js +6 -0
- package/lib/commonjs/specs/ARView.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARVolume.nitro.js +6 -0
- package/lib/commonjs/specs/ARVolume.nitro.js.map +1 -0
- package/lib/commonjs/specs/ARWorldMap.nitro.js +6 -0
- package/lib/commonjs/specs/ARWorldMap.nitro.js.map +1 -0
- package/lib/module/index.js +18 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/specs/ARAnchor.nitro.js +4 -0
- package/lib/module/specs/ARAnchor.nitro.js.map +1 -0
- package/lib/module/specs/ARBoundingBoxBuilder.nitro.js +4 -0
- package/lib/module/specs/ARBoundingBoxBuilder.nitro.js.map +1 -0
- package/lib/module/specs/ARDepthData.nitro.js +4 -0
- package/lib/module/specs/ARDepthData.nitro.js.map +1 -0
- package/lib/module/specs/ARFrame.nitro.js +4 -0
- package/lib/module/specs/ARFrame.nitro.js.map +1 -0
- package/lib/module/specs/ARLightEstimate.nitro.js +4 -0
- package/lib/module/specs/ARLightEstimate.nitro.js.map +1 -0
- package/lib/module/specs/ARMeasurement.nitro.js +4 -0
- package/lib/module/specs/ARMeasurement.nitro.js.map +1 -0
- package/lib/module/specs/ARPlaneAnchor.nitro.js +4 -0
- package/lib/module/specs/ARPlaneAnchor.nitro.js.map +1 -0
- package/lib/module/specs/ARRaycastResult.nitro.js +4 -0
- package/lib/module/specs/ARRaycastResult.nitro.js.map +1 -0
- package/lib/module/specs/ARSceneMesh.nitro.js +4 -0
- package/lib/module/specs/ARSceneMesh.nitro.js.map +1 -0
- package/lib/module/specs/ARSession.nitro.js +4 -0
- package/lib/module/specs/ARSession.nitro.js.map +1 -0
- package/lib/module/specs/ARView.nitro.js +4 -0
- package/lib/module/specs/ARView.nitro.js.map +1 -0
- package/lib/module/specs/ARVolume.nitro.js +4 -0
- package/lib/module/specs/ARVolume.nitro.js.map +1 -0
- package/lib/module/specs/ARWorldMap.nitro.js +4 -0
- package/lib/module/specs/ARWorldMap.nitro.js.map +1 -0
- package/lib/typescript/src/index.d.ts +20 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARAnchor.nitro.d.ts +18 -0
- package/lib/typescript/src/specs/ARAnchor.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARBoundingBoxBuilder.nitro.d.ts +11 -0
- package/lib/typescript/src/specs/ARBoundingBoxBuilder.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARDepthData.nitro.d.ts +26 -0
- package/lib/typescript/src/specs/ARDepthData.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARFrame.nitro.d.ts +32 -0
- package/lib/typescript/src/specs/ARFrame.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARLightEstimate.nitro.d.ts +18 -0
- package/lib/typescript/src/specs/ARLightEstimate.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARMeasurement.nitro.d.ts +11 -0
- package/lib/typescript/src/specs/ARMeasurement.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARPlaneAnchor.nitro.d.ts +32 -0
- package/lib/typescript/src/specs/ARPlaneAnchor.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARRaycastResult.nitro.d.ts +26 -0
- package/lib/typescript/src/specs/ARRaycastResult.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARSceneMesh.nitro.d.ts +47 -0
- package/lib/typescript/src/specs/ARSceneMesh.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARSession.nitro.d.ts +75 -0
- package/lib/typescript/src/specs/ARSession.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARView.nitro.d.ts +51 -0
- package/lib/typescript/src/specs/ARView.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARVolume.nitro.d.ts +14 -0
- package/lib/typescript/src/specs/ARVolume.nitro.d.ts.map +1 -0
- package/lib/typescript/src/specs/ARWorldMap.nitro.d.ts +17 -0
- package/lib/typescript/src/specs/ARWorldMap.nitro.d.ts.map +1 -0
- package/nitro.json +23 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/ios/NitroAR+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroAR-Swift-Cxx-Bridge.cpp +335 -0
- package/nitrogen/generated/ios/NitroAR-Swift-Cxx-Bridge.hpp +934 -0
- package/nitrogen/generated/ios/NitroAR-Swift-Cxx-Umbrella.hpp +169 -0
- package/nitrogen/generated/ios/NitroARAutolinking.mm +49 -0
- package/nitrogen/generated/ios/NitroARAutolinking.swift +50 -0
- package/nitrogen/generated/ios/c++/HybridARAnchorSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARAnchorSpecSwift.hpp +99 -0
- package/nitrogen/generated/ios/c++/HybridARBoundingBoxBuilderSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARBoundingBoxBuilderSpecSwift.hpp +95 -0
- package/nitrogen/generated/ios/c++/HybridARDepthDataSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARDepthDataSpecSwift.hpp +103 -0
- package/nitrogen/generated/ios/c++/HybridARDirectionalLightEstimateSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARDirectionalLightEstimateSpecSwift.hpp +88 -0
- package/nitrogen/generated/ios/c++/HybridARFrameSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARFrameSpecSwift.hpp +135 -0
- package/nitrogen/generated/ios/c++/HybridARLightEstimateSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARLightEstimateSpecSwift.hpp +80 -0
- package/nitrogen/generated/ios/c++/HybridARMeasurementSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARMeasurementSpecSwift.hpp +90 -0
- package/nitrogen/generated/ios/c++/HybridARMeshAnchorSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARMeshAnchorSpecSwift.hpp +107 -0
- package/nitrogen/generated/ios/c++/HybridARPlaneAnchorSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARPlaneAnchorSpecSwift.hpp +116 -0
- package/nitrogen/generated/ios/c++/HybridARPlaneGeometrySpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARPlaneGeometrySpecSwift.hpp +90 -0
- package/nitrogen/generated/ios/c++/HybridARRaycastResultSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARRaycastResultSpecSwift.hpp +97 -0
- package/nitrogen/generated/ios/c++/HybridARSessionSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARSessionSpecSwift.hpp +296 -0
- package/nitrogen/generated/ios/c++/HybridARViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARViewSpecSwift.hpp +243 -0
- package/nitrogen/generated/ios/c++/HybridARVolumeSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARVolumeSpecSwift.hpp +94 -0
- package/nitrogen/generated/ios/c++/HybridARWorldMapSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridARWorldMapSpecSwift.hpp +97 -0
- package/nitrogen/generated/ios/c++/views/HybridARViewComponent.mm +152 -0
- package/nitrogen/generated/ios/swift/ARSessionConfiguration.swift +189 -0
- package/nitrogen/generated/ios/swift/ARViewHitResult.swift +39 -0
- package/nitrogen/generated/ios/swift/CameraPose.swift +46 -0
- package/nitrogen/generated/ios/swift/EnvironmentTexturing.swift +44 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_TrackingState_TrackingStateReason.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_HybridARFrameSpec_.swift +50 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_HybridARWorldMapSpec_.swift +50 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridARAnchorSpec___std__vector_std__shared_ptr_HybridARAnchorSpec___std__vector_std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridARMeshAnchorSpec___std__vector_std__shared_ptr_HybridARMeshAnchorSpec___std__vector_std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__shared_ptr_HybridARPlaneAnchorSpec___std__vector_std__shared_ptr_HybridARPlaneAnchorSpec___std__vector_std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridARAnchorSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridARAnchorSpec_cxx.swift +192 -0
- package/nitrogen/generated/ios/swift/HybridARBoundingBoxBuilderSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridARBoundingBoxBuilderSpec_cxx.swift +161 -0
- package/nitrogen/generated/ios/swift/HybridARDepthDataSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridARDepthDataSpec_cxx.swift +188 -0
- package/nitrogen/generated/ios/swift/HybridARDirectionalLightEstimateSpec.swift +57 -0
- package/nitrogen/generated/ios/swift/HybridARDirectionalLightEstimateSpec_cxx.swift +162 -0
- package/nitrogen/generated/ios/swift/HybridARFrameSpec.swift +65 -0
- package/nitrogen/generated/ios/swift/HybridARFrameSpec_cxx.swift +285 -0
- package/nitrogen/generated/ios/swift/HybridARLightEstimateSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridARLightEstimateSpec_cxx.swift +140 -0
- package/nitrogen/generated/ios/swift/HybridARMeasurementSpec.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridARMeasurementSpec_cxx.swift +160 -0
- package/nitrogen/generated/ios/swift/HybridARMeshAnchorSpec.swift +62 -0
- package/nitrogen/generated/ios/swift/HybridARMeshAnchorSpec_cxx.swift +212 -0
- package/nitrogen/generated/ios/swift/HybridARPlaneAnchorSpec.swift +62 -0
- package/nitrogen/generated/ios/swift/HybridARPlaneAnchorSpec_cxx.swift +209 -0
- package/nitrogen/generated/ios/swift/HybridARPlaneGeometrySpec.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridARPlaneGeometrySpec_cxx.swift +178 -0
- package/nitrogen/generated/ios/swift/HybridARRaycastResultSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridARRaycastResultSpec_cxx.swift +179 -0
- package/nitrogen/generated/ios/swift/HybridARSessionSpec.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridARSessionSpec_cxx.swift +591 -0
- package/nitrogen/generated/ios/swift/HybridARViewSpec.swift +78 -0
- package/nitrogen/generated/ios/swift/HybridARViewSpec_cxx.swift +561 -0
- package/nitrogen/generated/ios/swift/HybridARVolumeSpec.swift +60 -0
- package/nitrogen/generated/ios/swift/HybridARVolumeSpec_cxx.swift +180 -0
- package/nitrogen/generated/ios/swift/HybridARWorldMapSpec.swift +58 -0
- package/nitrogen/generated/ios/swift/HybridARWorldMapSpec_cxx.swift +176 -0
- package/nitrogen/generated/ios/swift/LiDARCapabilities.swift +39 -0
- package/nitrogen/generated/ios/swift/MeshClassification.swift +64 -0
- package/nitrogen/generated/ios/swift/PlaneAlignment.swift +40 -0
- package/nitrogen/generated/ios/swift/PlaneClassification.swift +64 -0
- package/nitrogen/generated/ios/swift/PlaneDetectionMode.swift +40 -0
- package/nitrogen/generated/ios/swift/RaycastAlignment.swift +44 -0
- package/nitrogen/generated/ios/swift/RaycastQuery.swift +44 -0
- package/nitrogen/generated/ios/swift/RaycastTarget.swift +48 -0
- package/nitrogen/generated/ios/swift/SceneReconstructionMode.swift +44 -0
- package/nitrogen/generated/ios/swift/TrackingState.swift +44 -0
- package/nitrogen/generated/ios/swift/TrackingStateReason.swift +52 -0
- package/nitrogen/generated/ios/swift/WorldAlignment.swift +44 -0
- package/nitrogen/generated/ios/swift/WorldMappingStatus.swift +48 -0
- package/nitrogen/generated/shared/c++/ARSessionConfiguration.hpp +132 -0
- package/nitrogen/generated/shared/c++/ARViewHitResult.hpp +91 -0
- package/nitrogen/generated/shared/c++/CameraPose.hpp +87 -0
- package/nitrogen/generated/shared/c++/EnvironmentTexturing.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridARAnchorSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridARAnchorSpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridARBoundingBoxBuilderSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridARBoundingBoxBuilderSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridARDepthDataSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridARDepthDataSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridARDirectionalLightEstimateSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridARDirectionalLightEstimateSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridARFrameSpec.cpp +32 -0
- package/nitrogen/generated/shared/c++/HybridARFrameSpec.hpp +83 -0
- package/nitrogen/generated/shared/c++/HybridARLightEstimateSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridARLightEstimateSpec.hpp +63 -0
- package/nitrogen/generated/shared/c++/HybridARMeasurementSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridARMeasurementSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridARMeshAnchorSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridARMeshAnchorSpec.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridARPlaneAnchorSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridARPlaneAnchorSpec.hpp +79 -0
- package/nitrogen/generated/shared/c++/HybridARPlaneGeometrySpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridARPlaneGeometrySpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridARRaycastResultSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridARRaycastResultSpec.hpp +70 -0
- package/nitrogen/generated/shared/c++/HybridARSessionSpec.cpp +45 -0
- package/nitrogen/generated/shared/c++/HybridARSessionSpec.hpp +131 -0
- package/nitrogen/generated/shared/c++/HybridARViewSpec.cpp +55 -0
- package/nitrogen/generated/shared/c++/HybridARViewSpec.hpp +101 -0
- package/nitrogen/generated/shared/c++/HybridARVolumeSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridARVolumeSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridARWorldMapSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridARWorldMapSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/LiDARCapabilities.hpp +91 -0
- package/nitrogen/generated/shared/c++/MeshClassification.hpp +100 -0
- package/nitrogen/generated/shared/c++/PlaneAlignment.hpp +76 -0
- package/nitrogen/generated/shared/c++/PlaneClassification.hpp +100 -0
- package/nitrogen/generated/shared/c++/PlaneDetectionMode.hpp +76 -0
- package/nitrogen/generated/shared/c++/RaycastAlignment.hpp +80 -0
- package/nitrogen/generated/shared/c++/RaycastQuery.hpp +99 -0
- package/nitrogen/generated/shared/c++/RaycastTarget.hpp +84 -0
- package/nitrogen/generated/shared/c++/SceneReconstructionMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/TrackingState.hpp +80 -0
- package/nitrogen/generated/shared/c++/TrackingStateReason.hpp +88 -0
- package/nitrogen/generated/shared/c++/WorldAlignment.hpp +80 -0
- package/nitrogen/generated/shared/c++/WorldMappingStatus.hpp +84 -0
- package/nitrogen/generated/shared/c++/views/HybridARViewComponent.cpp +182 -0
- package/nitrogen/generated/shared/c++/views/HybridARViewComponent.hpp +120 -0
- package/nitrogen/generated/shared/json/ARViewConfig.json +19 -0
- package/package.json +98 -0
- package/react-native-nitro-ar.podspec +40 -0
- package/src/index.ts +60 -0
- package/src/specs/ARAnchor.nitro.ts +21 -0
- package/src/specs/ARBoundingBoxBuilder.nitro.ts +11 -0
- package/src/specs/ARDepthData.nitro.ts +29 -0
- package/src/specs/ARFrame.nitro.ts +41 -0
- package/src/specs/ARLightEstimate.nitro.ts +20 -0
- package/src/specs/ARMeasurement.nitro.ts +10 -0
- package/src/specs/ARPlaneAnchor.nitro.ts +46 -0
- package/src/specs/ARRaycastResult.nitro.ts +32 -0
- package/src/specs/ARSceneMesh.nitro.ts +63 -0
- package/src/specs/ARSession.nitro.ts +112 -0
- package/src/specs/ARView.nitro.ts +84 -0
- package/src/specs/ARVolume.nitro.ts +15 -0
- package/src/specs/ARWorldMap.nitro.ts +20 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastAlignment.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `RaycastAlignment`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias RaycastAlignment = margelo.nitro.ar.RaycastAlignment
|
|
12
|
+
|
|
13
|
+
public extension RaycastAlignment {
|
|
14
|
+
/**
|
|
15
|
+
* Get a RaycastAlignment for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "horizontal":
|
|
21
|
+
self = .horizontal
|
|
22
|
+
case "vertical":
|
|
23
|
+
self = .vertical
|
|
24
|
+
case "any":
|
|
25
|
+
self = .any
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this RaycastAlignment represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .horizontal:
|
|
37
|
+
return "horizontal"
|
|
38
|
+
case .vertical:
|
|
39
|
+
return "vertical"
|
|
40
|
+
case .any:
|
|
41
|
+
return "any"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastQuery.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `RaycastQuery`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias RaycastQuery = margelo.nitro.ar.RaycastQuery
|
|
14
|
+
|
|
15
|
+
public extension RaycastQuery {
|
|
16
|
+
private typealias bridge = margelo.nitro.ar.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `RaycastQuery`.
|
|
20
|
+
*/
|
|
21
|
+
init(x: Double, y: Double, target: RaycastTarget, alignment: RaycastAlignment) {
|
|
22
|
+
self.init(x, y, target, alignment)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@inline(__always)
|
|
26
|
+
var x: Double {
|
|
27
|
+
return self.__x
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@inline(__always)
|
|
31
|
+
var y: Double {
|
|
32
|
+
return self.__y
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@inline(__always)
|
|
36
|
+
var target: RaycastTarget {
|
|
37
|
+
return self.__target
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@inline(__always)
|
|
41
|
+
var alignment: RaycastAlignment {
|
|
42
|
+
return self.__alignment
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastTarget.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `RaycastTarget`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias RaycastTarget = margelo.nitro.ar.RaycastTarget
|
|
12
|
+
|
|
13
|
+
public extension RaycastTarget {
|
|
14
|
+
/**
|
|
15
|
+
* Get a RaycastTarget for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "existingPlaneGeometry":
|
|
21
|
+
self = .existingplanegeometry
|
|
22
|
+
case "existingPlaneInfinite":
|
|
23
|
+
self = .existingplaneinfinite
|
|
24
|
+
case "estimatedPlane":
|
|
25
|
+
self = .estimatedplane
|
|
26
|
+
case "any":
|
|
27
|
+
self = .any
|
|
28
|
+
default:
|
|
29
|
+
return nil
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the String value this RaycastTarget represents.
|
|
35
|
+
*/
|
|
36
|
+
var stringValue: String {
|
|
37
|
+
switch self {
|
|
38
|
+
case .existingplanegeometry:
|
|
39
|
+
return "existingPlaneGeometry"
|
|
40
|
+
case .existingplaneinfinite:
|
|
41
|
+
return "existingPlaneInfinite"
|
|
42
|
+
case .estimatedplane:
|
|
43
|
+
return "estimatedPlane"
|
|
44
|
+
case .any:
|
|
45
|
+
return "any"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SceneReconstructionMode.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `SceneReconstructionMode`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias SceneReconstructionMode = margelo.nitro.ar.SceneReconstructionMode
|
|
12
|
+
|
|
13
|
+
public extension SceneReconstructionMode {
|
|
14
|
+
/**
|
|
15
|
+
* Get a SceneReconstructionMode for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "none":
|
|
21
|
+
self = .none
|
|
22
|
+
case "mesh":
|
|
23
|
+
self = .mesh
|
|
24
|
+
case "meshWithClassification":
|
|
25
|
+
self = .meshwithclassification
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this SceneReconstructionMode represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .none:
|
|
37
|
+
return "none"
|
|
38
|
+
case .mesh:
|
|
39
|
+
return "mesh"
|
|
40
|
+
case .meshwithclassification:
|
|
41
|
+
return "meshWithClassification"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// TrackingState.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `TrackingState`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias TrackingState = margelo.nitro.ar.TrackingState
|
|
12
|
+
|
|
13
|
+
public extension TrackingState {
|
|
14
|
+
/**
|
|
15
|
+
* Get a TrackingState for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "notAvailable":
|
|
21
|
+
self = .notavailable
|
|
22
|
+
case "limited":
|
|
23
|
+
self = .limited
|
|
24
|
+
case "normal":
|
|
25
|
+
self = .normal
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this TrackingState represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .notavailable:
|
|
37
|
+
return "notAvailable"
|
|
38
|
+
case .limited:
|
|
39
|
+
return "limited"
|
|
40
|
+
case .normal:
|
|
41
|
+
return "normal"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// TrackingStateReason.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `TrackingStateReason`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias TrackingStateReason = margelo.nitro.ar.TrackingStateReason
|
|
12
|
+
|
|
13
|
+
public extension TrackingStateReason {
|
|
14
|
+
/**
|
|
15
|
+
* Get a TrackingStateReason for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "none":
|
|
21
|
+
self = .none
|
|
22
|
+
case "initializing":
|
|
23
|
+
self = .initializing
|
|
24
|
+
case "excessiveMotion":
|
|
25
|
+
self = .excessivemotion
|
|
26
|
+
case "insufficientFeatures":
|
|
27
|
+
self = .insufficientfeatures
|
|
28
|
+
case "relocalizing":
|
|
29
|
+
self = .relocalizing
|
|
30
|
+
default:
|
|
31
|
+
return nil
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get the String value this TrackingStateReason represents.
|
|
37
|
+
*/
|
|
38
|
+
var stringValue: String {
|
|
39
|
+
switch self {
|
|
40
|
+
case .none:
|
|
41
|
+
return "none"
|
|
42
|
+
case .initializing:
|
|
43
|
+
return "initializing"
|
|
44
|
+
case .excessivemotion:
|
|
45
|
+
return "excessiveMotion"
|
|
46
|
+
case .insufficientfeatures:
|
|
47
|
+
return "insufficientFeatures"
|
|
48
|
+
case .relocalizing:
|
|
49
|
+
return "relocalizing"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorldAlignment.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `WorldAlignment`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias WorldAlignment = margelo.nitro.ar.WorldAlignment
|
|
12
|
+
|
|
13
|
+
public extension WorldAlignment {
|
|
14
|
+
/**
|
|
15
|
+
* Get a WorldAlignment for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "gravity":
|
|
21
|
+
self = .gravity
|
|
22
|
+
case "gravityAndHeading":
|
|
23
|
+
self = .gravityandheading
|
|
24
|
+
case "camera":
|
|
25
|
+
self = .camera
|
|
26
|
+
default:
|
|
27
|
+
return nil
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Get the String value this WorldAlignment represents.
|
|
33
|
+
*/
|
|
34
|
+
var stringValue: String {
|
|
35
|
+
switch self {
|
|
36
|
+
case .gravity:
|
|
37
|
+
return "gravity"
|
|
38
|
+
case .gravityandheading:
|
|
39
|
+
return "gravityAndHeading"
|
|
40
|
+
case .camera:
|
|
41
|
+
return "camera"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// WorldMappingStatus.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `WorldMappingStatus`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias WorldMappingStatus = margelo.nitro.ar.WorldMappingStatus
|
|
12
|
+
|
|
13
|
+
public extension WorldMappingStatus {
|
|
14
|
+
/**
|
|
15
|
+
* Get a WorldMappingStatus for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "notAvailable":
|
|
21
|
+
self = .notavailable
|
|
22
|
+
case "limited":
|
|
23
|
+
self = .limited
|
|
24
|
+
case "extending":
|
|
25
|
+
self = .extending
|
|
26
|
+
case "mapped":
|
|
27
|
+
self = .mapped
|
|
28
|
+
default:
|
|
29
|
+
return nil
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get the String value this WorldMappingStatus represents.
|
|
35
|
+
*/
|
|
36
|
+
var stringValue: String {
|
|
37
|
+
switch self {
|
|
38
|
+
case .notavailable:
|
|
39
|
+
return "notAvailable"
|
|
40
|
+
case .limited:
|
|
41
|
+
return "limited"
|
|
42
|
+
case .extending:
|
|
43
|
+
return "extending"
|
|
44
|
+
case .mapped:
|
|
45
|
+
return "mapped"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ARSessionConfiguration.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
// Forward declaration of `PlaneDetectionMode` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::ar { enum class PlaneDetectionMode; }
|
|
33
|
+
// Forward declaration of `EnvironmentTexturing` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::ar { enum class EnvironmentTexturing; }
|
|
35
|
+
// Forward declaration of `WorldAlignment` to properly resolve imports.
|
|
36
|
+
namespace margelo::nitro::ar { enum class WorldAlignment; }
|
|
37
|
+
// Forward declaration of `SceneReconstructionMode` to properly resolve imports.
|
|
38
|
+
namespace margelo::nitro::ar { enum class SceneReconstructionMode; }
|
|
39
|
+
|
|
40
|
+
#include "PlaneDetectionMode.hpp"
|
|
41
|
+
#include <vector>
|
|
42
|
+
#include <optional>
|
|
43
|
+
#include "EnvironmentTexturing.hpp"
|
|
44
|
+
#include "WorldAlignment.hpp"
|
|
45
|
+
#include <string>
|
|
46
|
+
#include "SceneReconstructionMode.hpp"
|
|
47
|
+
|
|
48
|
+
namespace margelo::nitro::ar {
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A struct which can be represented as a JavaScript object (ARSessionConfiguration).
|
|
52
|
+
*/
|
|
53
|
+
struct ARSessionConfiguration final {
|
|
54
|
+
public:
|
|
55
|
+
std::optional<std::vector<PlaneDetectionMode>> planeDetection SWIFT_PRIVATE;
|
|
56
|
+
std::optional<bool> lightEstimation SWIFT_PRIVATE;
|
|
57
|
+
std::optional<bool> sceneDepth SWIFT_PRIVATE;
|
|
58
|
+
std::optional<bool> smoothedSceneDepth SWIFT_PRIVATE;
|
|
59
|
+
std::optional<EnvironmentTexturing> environmentTexturing SWIFT_PRIVATE;
|
|
60
|
+
std::optional<WorldAlignment> worldAlignment SWIFT_PRIVATE;
|
|
61
|
+
std::optional<std::string> initialWorldMap SWIFT_PRIVATE;
|
|
62
|
+
std::optional<SceneReconstructionMode> sceneReconstruction SWIFT_PRIVATE;
|
|
63
|
+
std::optional<bool> peopleOcclusion SWIFT_PRIVATE;
|
|
64
|
+
std::optional<bool> objectOcclusion SWIFT_PRIVATE;
|
|
65
|
+
|
|
66
|
+
public:
|
|
67
|
+
ARSessionConfiguration() = default;
|
|
68
|
+
explicit ARSessionConfiguration(std::optional<std::vector<PlaneDetectionMode>> planeDetection, std::optional<bool> lightEstimation, std::optional<bool> sceneDepth, std::optional<bool> smoothedSceneDepth, std::optional<EnvironmentTexturing> environmentTexturing, std::optional<WorldAlignment> worldAlignment, std::optional<std::string> initialWorldMap, std::optional<SceneReconstructionMode> sceneReconstruction, std::optional<bool> peopleOcclusion, std::optional<bool> objectOcclusion): planeDetection(planeDetection), lightEstimation(lightEstimation), sceneDepth(sceneDepth), smoothedSceneDepth(smoothedSceneDepth), environmentTexturing(environmentTexturing), worldAlignment(worldAlignment), initialWorldMap(initialWorldMap), sceneReconstruction(sceneReconstruction), peopleOcclusion(peopleOcclusion), objectOcclusion(objectOcclusion) {}
|
|
69
|
+
|
|
70
|
+
public:
|
|
71
|
+
friend bool operator==(const ARSessionConfiguration& lhs, const ARSessionConfiguration& rhs) = default;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
} // namespace margelo::nitro::ar
|
|
75
|
+
|
|
76
|
+
namespace margelo::nitro {
|
|
77
|
+
|
|
78
|
+
// C++ ARSessionConfiguration <> JS ARSessionConfiguration (object)
|
|
79
|
+
template <>
|
|
80
|
+
struct JSIConverter<margelo::nitro::ar::ARSessionConfiguration> final {
|
|
81
|
+
static inline margelo::nitro::ar::ARSessionConfiguration fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
82
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
83
|
+
return margelo::nitro::ar::ARSessionConfiguration(
|
|
84
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::ar::PlaneDetectionMode>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "planeDetection"))),
|
|
85
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lightEstimation"))),
|
|
86
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sceneDepth"))),
|
|
87
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "smoothedSceneDepth"))),
|
|
88
|
+
JSIConverter<std::optional<margelo::nitro::ar::EnvironmentTexturing>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "environmentTexturing"))),
|
|
89
|
+
JSIConverter<std::optional<margelo::nitro::ar::WorldAlignment>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "worldAlignment"))),
|
|
90
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "initialWorldMap"))),
|
|
91
|
+
JSIConverter<std::optional<margelo::nitro::ar::SceneReconstructionMode>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sceneReconstruction"))),
|
|
92
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "peopleOcclusion"))),
|
|
93
|
+
JSIConverter<std::optional<bool>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "objectOcclusion")))
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::ar::ARSessionConfiguration& arg) {
|
|
97
|
+
jsi::Object obj(runtime);
|
|
98
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "planeDetection"), JSIConverter<std::optional<std::vector<margelo::nitro::ar::PlaneDetectionMode>>>::toJSI(runtime, arg.planeDetection));
|
|
99
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "lightEstimation"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.lightEstimation));
|
|
100
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sceneDepth"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.sceneDepth));
|
|
101
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "smoothedSceneDepth"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.smoothedSceneDepth));
|
|
102
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "environmentTexturing"), JSIConverter<std::optional<margelo::nitro::ar::EnvironmentTexturing>>::toJSI(runtime, arg.environmentTexturing));
|
|
103
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "worldAlignment"), JSIConverter<std::optional<margelo::nitro::ar::WorldAlignment>>::toJSI(runtime, arg.worldAlignment));
|
|
104
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "initialWorldMap"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.initialWorldMap));
|
|
105
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "sceneReconstruction"), JSIConverter<std::optional<margelo::nitro::ar::SceneReconstructionMode>>::toJSI(runtime, arg.sceneReconstruction));
|
|
106
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "peopleOcclusion"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.peopleOcclusion));
|
|
107
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "objectOcclusion"), JSIConverter<std::optional<bool>>::toJSI(runtime, arg.objectOcclusion));
|
|
108
|
+
return obj;
|
|
109
|
+
}
|
|
110
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
111
|
+
if (!value.isObject()) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
jsi::Object obj = value.getObject(runtime);
|
|
115
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::ar::PlaneDetectionMode>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "planeDetection")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "lightEstimation")))) return false;
|
|
120
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sceneDepth")))) return false;
|
|
121
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "smoothedSceneDepth")))) return false;
|
|
122
|
+
if (!JSIConverter<std::optional<margelo::nitro::ar::EnvironmentTexturing>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "environmentTexturing")))) return false;
|
|
123
|
+
if (!JSIConverter<std::optional<margelo::nitro::ar::WorldAlignment>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "worldAlignment")))) return false;
|
|
124
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "initialWorldMap")))) return false;
|
|
125
|
+
if (!JSIConverter<std::optional<margelo::nitro::ar::SceneReconstructionMode>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "sceneReconstruction")))) return false;
|
|
126
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "peopleOcclusion")))) return false;
|
|
127
|
+
if (!JSIConverter<std::optional<bool>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "objectOcclusion")))) return false;
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ARViewHitResult.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
namespace margelo::nitro::ar {
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A struct which can be represented as a JavaScript object (ARViewHitResult).
|
|
39
|
+
*/
|
|
40
|
+
struct ARViewHitResult final {
|
|
41
|
+
public:
|
|
42
|
+
double x SWIFT_PRIVATE;
|
|
43
|
+
double y SWIFT_PRIVATE;
|
|
44
|
+
double z SWIFT_PRIVATE;
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
ARViewHitResult() = default;
|
|
48
|
+
explicit ARViewHitResult(double x, double y, double z): x(x), y(y), z(z) {}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
friend bool operator==(const ARViewHitResult& lhs, const ARViewHitResult& rhs) = default;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
} // namespace margelo::nitro::ar
|
|
55
|
+
|
|
56
|
+
namespace margelo::nitro {
|
|
57
|
+
|
|
58
|
+
// C++ ARViewHitResult <> JS ARViewHitResult (object)
|
|
59
|
+
template <>
|
|
60
|
+
struct JSIConverter<margelo::nitro::ar::ARViewHitResult> final {
|
|
61
|
+
static inline margelo::nitro::ar::ARViewHitResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
62
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
63
|
+
return margelo::nitro::ar::ARViewHitResult(
|
|
64
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x"))),
|
|
65
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y"))),
|
|
66
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "z")))
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::ar::ARViewHitResult& arg) {
|
|
70
|
+
jsi::Object obj(runtime);
|
|
71
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "x"), JSIConverter<double>::toJSI(runtime, arg.x));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "y"), JSIConverter<double>::toJSI(runtime, arg.y));
|
|
73
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "z"), JSIConverter<double>::toJSI(runtime, arg.z));
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
77
|
+
if (!value.isObject()) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
jsi::Object obj = value.getObject(runtime);
|
|
81
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x")))) return false;
|
|
85
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y")))) return false;
|
|
86
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "z")))) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
} // namespace margelo::nitro
|