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,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PlaneAlignment.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (PlaneAlignment).
|
|
30
|
+
*/
|
|
31
|
+
enum class PlaneAlignment {
|
|
32
|
+
HORIZONTAL SWIFT_NAME(horizontal) = 0,
|
|
33
|
+
VERTICAL SWIFT_NAME(vertical) = 1,
|
|
34
|
+
} CLOSED_ENUM;
|
|
35
|
+
|
|
36
|
+
} // namespace margelo::nitro::ar
|
|
37
|
+
|
|
38
|
+
namespace margelo::nitro {
|
|
39
|
+
|
|
40
|
+
// C++ PlaneAlignment <> JS PlaneAlignment (union)
|
|
41
|
+
template <>
|
|
42
|
+
struct JSIConverter<margelo::nitro::ar::PlaneAlignment> final {
|
|
43
|
+
static inline margelo::nitro::ar::PlaneAlignment fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
44
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
45
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
46
|
+
case hashString("horizontal"): return margelo::nitro::ar::PlaneAlignment::HORIZONTAL;
|
|
47
|
+
case hashString("vertical"): return margelo::nitro::ar::PlaneAlignment::VERTICAL;
|
|
48
|
+
default: [[unlikely]]
|
|
49
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum PlaneAlignment - invalid value!");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::PlaneAlignment arg) {
|
|
53
|
+
switch (arg) {
|
|
54
|
+
case margelo::nitro::ar::PlaneAlignment::HORIZONTAL: return JSIConverter<std::string>::toJSI(runtime, "horizontal");
|
|
55
|
+
case margelo::nitro::ar::PlaneAlignment::VERTICAL: return JSIConverter<std::string>::toJSI(runtime, "vertical");
|
|
56
|
+
default: [[unlikely]]
|
|
57
|
+
throw std::invalid_argument("Cannot convert PlaneAlignment to JS - invalid value: "
|
|
58
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
62
|
+
if (!value.isString()) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
66
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
67
|
+
case hashString("horizontal"):
|
|
68
|
+
case hashString("vertical"):
|
|
69
|
+
return true;
|
|
70
|
+
default:
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PlaneClassification.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (PlaneClassification).
|
|
30
|
+
*/
|
|
31
|
+
enum class PlaneClassification {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
WALL SWIFT_NAME(wall) = 1,
|
|
34
|
+
FLOOR SWIFT_NAME(floor) = 2,
|
|
35
|
+
CEILING SWIFT_NAME(ceiling) = 3,
|
|
36
|
+
TABLE SWIFT_NAME(table) = 4,
|
|
37
|
+
SEAT SWIFT_NAME(seat) = 5,
|
|
38
|
+
WINDOW SWIFT_NAME(window) = 6,
|
|
39
|
+
DOOR SWIFT_NAME(door) = 7,
|
|
40
|
+
} CLOSED_ENUM;
|
|
41
|
+
|
|
42
|
+
} // namespace margelo::nitro::ar
|
|
43
|
+
|
|
44
|
+
namespace margelo::nitro {
|
|
45
|
+
|
|
46
|
+
// C++ PlaneClassification <> JS PlaneClassification (union)
|
|
47
|
+
template <>
|
|
48
|
+
struct JSIConverter<margelo::nitro::ar::PlaneClassification> final {
|
|
49
|
+
static inline margelo::nitro::ar::PlaneClassification fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
50
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
51
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
52
|
+
case hashString("none"): return margelo::nitro::ar::PlaneClassification::NONE;
|
|
53
|
+
case hashString("wall"): return margelo::nitro::ar::PlaneClassification::WALL;
|
|
54
|
+
case hashString("floor"): return margelo::nitro::ar::PlaneClassification::FLOOR;
|
|
55
|
+
case hashString("ceiling"): return margelo::nitro::ar::PlaneClassification::CEILING;
|
|
56
|
+
case hashString("table"): return margelo::nitro::ar::PlaneClassification::TABLE;
|
|
57
|
+
case hashString("seat"): return margelo::nitro::ar::PlaneClassification::SEAT;
|
|
58
|
+
case hashString("window"): return margelo::nitro::ar::PlaneClassification::WINDOW;
|
|
59
|
+
case hashString("door"): return margelo::nitro::ar::PlaneClassification::DOOR;
|
|
60
|
+
default: [[unlikely]]
|
|
61
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum PlaneClassification - invalid value!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::PlaneClassification arg) {
|
|
65
|
+
switch (arg) {
|
|
66
|
+
case margelo::nitro::ar::PlaneClassification::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
67
|
+
case margelo::nitro::ar::PlaneClassification::WALL: return JSIConverter<std::string>::toJSI(runtime, "wall");
|
|
68
|
+
case margelo::nitro::ar::PlaneClassification::FLOOR: return JSIConverter<std::string>::toJSI(runtime, "floor");
|
|
69
|
+
case margelo::nitro::ar::PlaneClassification::CEILING: return JSIConverter<std::string>::toJSI(runtime, "ceiling");
|
|
70
|
+
case margelo::nitro::ar::PlaneClassification::TABLE: return JSIConverter<std::string>::toJSI(runtime, "table");
|
|
71
|
+
case margelo::nitro::ar::PlaneClassification::SEAT: return JSIConverter<std::string>::toJSI(runtime, "seat");
|
|
72
|
+
case margelo::nitro::ar::PlaneClassification::WINDOW: return JSIConverter<std::string>::toJSI(runtime, "window");
|
|
73
|
+
case margelo::nitro::ar::PlaneClassification::DOOR: return JSIConverter<std::string>::toJSI(runtime, "door");
|
|
74
|
+
default: [[unlikely]]
|
|
75
|
+
throw std::invalid_argument("Cannot convert PlaneClassification to JS - invalid value: "
|
|
76
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
80
|
+
if (!value.isString()) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
84
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
85
|
+
case hashString("none"):
|
|
86
|
+
case hashString("wall"):
|
|
87
|
+
case hashString("floor"):
|
|
88
|
+
case hashString("ceiling"):
|
|
89
|
+
case hashString("table"):
|
|
90
|
+
case hashString("seat"):
|
|
91
|
+
case hashString("window"):
|
|
92
|
+
case hashString("door"):
|
|
93
|
+
return true;
|
|
94
|
+
default:
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PlaneDetectionMode.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (PlaneDetectionMode).
|
|
30
|
+
*/
|
|
31
|
+
enum class PlaneDetectionMode {
|
|
32
|
+
HORIZONTAL SWIFT_NAME(horizontal) = 0,
|
|
33
|
+
VERTICAL SWIFT_NAME(vertical) = 1,
|
|
34
|
+
} CLOSED_ENUM;
|
|
35
|
+
|
|
36
|
+
} // namespace margelo::nitro::ar
|
|
37
|
+
|
|
38
|
+
namespace margelo::nitro {
|
|
39
|
+
|
|
40
|
+
// C++ PlaneDetectionMode <> JS PlaneDetectionMode (union)
|
|
41
|
+
template <>
|
|
42
|
+
struct JSIConverter<margelo::nitro::ar::PlaneDetectionMode> final {
|
|
43
|
+
static inline margelo::nitro::ar::PlaneDetectionMode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
44
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
45
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
46
|
+
case hashString("horizontal"): return margelo::nitro::ar::PlaneDetectionMode::HORIZONTAL;
|
|
47
|
+
case hashString("vertical"): return margelo::nitro::ar::PlaneDetectionMode::VERTICAL;
|
|
48
|
+
default: [[unlikely]]
|
|
49
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum PlaneDetectionMode - invalid value!");
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::PlaneDetectionMode arg) {
|
|
53
|
+
switch (arg) {
|
|
54
|
+
case margelo::nitro::ar::PlaneDetectionMode::HORIZONTAL: return JSIConverter<std::string>::toJSI(runtime, "horizontal");
|
|
55
|
+
case margelo::nitro::ar::PlaneDetectionMode::VERTICAL: return JSIConverter<std::string>::toJSI(runtime, "vertical");
|
|
56
|
+
default: [[unlikely]]
|
|
57
|
+
throw std::invalid_argument("Cannot convert PlaneDetectionMode to JS - invalid value: "
|
|
58
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
62
|
+
if (!value.isString()) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
66
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
67
|
+
case hashString("horizontal"):
|
|
68
|
+
case hashString("vertical"):
|
|
69
|
+
return true;
|
|
70
|
+
default:
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastAlignment.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (RaycastAlignment).
|
|
30
|
+
*/
|
|
31
|
+
enum class RaycastAlignment {
|
|
32
|
+
HORIZONTAL SWIFT_NAME(horizontal) = 0,
|
|
33
|
+
VERTICAL SWIFT_NAME(vertical) = 1,
|
|
34
|
+
ANY SWIFT_NAME(any) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::ar
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ RaycastAlignment <> JS RaycastAlignment (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::ar::RaycastAlignment> final {
|
|
44
|
+
static inline margelo::nitro::ar::RaycastAlignment fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("horizontal"): return margelo::nitro::ar::RaycastAlignment::HORIZONTAL;
|
|
48
|
+
case hashString("vertical"): return margelo::nitro::ar::RaycastAlignment::VERTICAL;
|
|
49
|
+
case hashString("any"): return margelo::nitro::ar::RaycastAlignment::ANY;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RaycastAlignment - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::RaycastAlignment arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::ar::RaycastAlignment::HORIZONTAL: return JSIConverter<std::string>::toJSI(runtime, "horizontal");
|
|
57
|
+
case margelo::nitro::ar::RaycastAlignment::VERTICAL: return JSIConverter<std::string>::toJSI(runtime, "vertical");
|
|
58
|
+
case margelo::nitro::ar::RaycastAlignment::ANY: return JSIConverter<std::string>::toJSI(runtime, "any");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert RaycastAlignment to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("horizontal"):
|
|
71
|
+
case hashString("vertical"):
|
|
72
|
+
case hashString("any"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastQuery.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 `RaycastTarget` to properly resolve imports.
|
|
32
|
+
namespace margelo::nitro::ar { enum class RaycastTarget; }
|
|
33
|
+
// Forward declaration of `RaycastAlignment` to properly resolve imports.
|
|
34
|
+
namespace margelo::nitro::ar { enum class RaycastAlignment; }
|
|
35
|
+
|
|
36
|
+
#include "RaycastTarget.hpp"
|
|
37
|
+
#include "RaycastAlignment.hpp"
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro::ar {
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* A struct which can be represented as a JavaScript object (RaycastQuery).
|
|
43
|
+
*/
|
|
44
|
+
struct RaycastQuery final {
|
|
45
|
+
public:
|
|
46
|
+
double x SWIFT_PRIVATE;
|
|
47
|
+
double y SWIFT_PRIVATE;
|
|
48
|
+
RaycastTarget target SWIFT_PRIVATE;
|
|
49
|
+
RaycastAlignment alignment SWIFT_PRIVATE;
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
RaycastQuery() = default;
|
|
53
|
+
explicit RaycastQuery(double x, double y, RaycastTarget target, RaycastAlignment alignment): x(x), y(y), target(target), alignment(alignment) {}
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
friend bool operator==(const RaycastQuery& lhs, const RaycastQuery& rhs) = default;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
} // namespace margelo::nitro::ar
|
|
60
|
+
|
|
61
|
+
namespace margelo::nitro {
|
|
62
|
+
|
|
63
|
+
// C++ RaycastQuery <> JS RaycastQuery (object)
|
|
64
|
+
template <>
|
|
65
|
+
struct JSIConverter<margelo::nitro::ar::RaycastQuery> final {
|
|
66
|
+
static inline margelo::nitro::ar::RaycastQuery fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
67
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
68
|
+
return margelo::nitro::ar::RaycastQuery(
|
|
69
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x"))),
|
|
70
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y"))),
|
|
71
|
+
JSIConverter<margelo::nitro::ar::RaycastTarget>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "target"))),
|
|
72
|
+
JSIConverter<margelo::nitro::ar::RaycastAlignment>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "alignment")))
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::ar::RaycastQuery& arg) {
|
|
76
|
+
jsi::Object obj(runtime);
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "x"), JSIConverter<double>::toJSI(runtime, arg.x));
|
|
78
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "y"), JSIConverter<double>::toJSI(runtime, arg.y));
|
|
79
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "target"), JSIConverter<margelo::nitro::ar::RaycastTarget>::toJSI(runtime, arg.target));
|
|
80
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "alignment"), JSIConverter<margelo::nitro::ar::RaycastAlignment>::toJSI(runtime, arg.alignment));
|
|
81
|
+
return obj;
|
|
82
|
+
}
|
|
83
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
84
|
+
if (!value.isObject()) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
jsi::Object obj = value.getObject(runtime);
|
|
88
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "x")))) return false;
|
|
92
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "y")))) return false;
|
|
93
|
+
if (!JSIConverter<margelo::nitro::ar::RaycastTarget>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "target")))) return false;
|
|
94
|
+
if (!JSIConverter<margelo::nitro::ar::RaycastAlignment>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "alignment")))) return false;
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RaycastTarget.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (RaycastTarget).
|
|
30
|
+
*/
|
|
31
|
+
enum class RaycastTarget {
|
|
32
|
+
EXISTINGPLANEGEOMETRY SWIFT_NAME(existingplanegeometry) = 0,
|
|
33
|
+
EXISTINGPLANEINFINITE SWIFT_NAME(existingplaneinfinite) = 1,
|
|
34
|
+
ESTIMATEDPLANE SWIFT_NAME(estimatedplane) = 2,
|
|
35
|
+
ANY SWIFT_NAME(any) = 3,
|
|
36
|
+
} CLOSED_ENUM;
|
|
37
|
+
|
|
38
|
+
} // namespace margelo::nitro::ar
|
|
39
|
+
|
|
40
|
+
namespace margelo::nitro {
|
|
41
|
+
|
|
42
|
+
// C++ RaycastTarget <> JS RaycastTarget (union)
|
|
43
|
+
template <>
|
|
44
|
+
struct JSIConverter<margelo::nitro::ar::RaycastTarget> final {
|
|
45
|
+
static inline margelo::nitro::ar::RaycastTarget fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
46
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
47
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
48
|
+
case hashString("existingPlaneGeometry"): return margelo::nitro::ar::RaycastTarget::EXISTINGPLANEGEOMETRY;
|
|
49
|
+
case hashString("existingPlaneInfinite"): return margelo::nitro::ar::RaycastTarget::EXISTINGPLANEINFINITE;
|
|
50
|
+
case hashString("estimatedPlane"): return margelo::nitro::ar::RaycastTarget::ESTIMATEDPLANE;
|
|
51
|
+
case hashString("any"): return margelo::nitro::ar::RaycastTarget::ANY;
|
|
52
|
+
default: [[unlikely]]
|
|
53
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum RaycastTarget - invalid value!");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::RaycastTarget arg) {
|
|
57
|
+
switch (arg) {
|
|
58
|
+
case margelo::nitro::ar::RaycastTarget::EXISTINGPLANEGEOMETRY: return JSIConverter<std::string>::toJSI(runtime, "existingPlaneGeometry");
|
|
59
|
+
case margelo::nitro::ar::RaycastTarget::EXISTINGPLANEINFINITE: return JSIConverter<std::string>::toJSI(runtime, "existingPlaneInfinite");
|
|
60
|
+
case margelo::nitro::ar::RaycastTarget::ESTIMATEDPLANE: return JSIConverter<std::string>::toJSI(runtime, "estimatedPlane");
|
|
61
|
+
case margelo::nitro::ar::RaycastTarget::ANY: return JSIConverter<std::string>::toJSI(runtime, "any");
|
|
62
|
+
default: [[unlikely]]
|
|
63
|
+
throw std::invalid_argument("Cannot convert RaycastTarget to JS - invalid value: "
|
|
64
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
68
|
+
if (!value.isString()) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
72
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
73
|
+
case hashString("existingPlaneGeometry"):
|
|
74
|
+
case hashString("existingPlaneInfinite"):
|
|
75
|
+
case hashString("estimatedPlane"):
|
|
76
|
+
case hashString("any"):
|
|
77
|
+
return true;
|
|
78
|
+
default:
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// SceneReconstructionMode.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (SceneReconstructionMode).
|
|
30
|
+
*/
|
|
31
|
+
enum class SceneReconstructionMode {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
MESH SWIFT_NAME(mesh) = 1,
|
|
34
|
+
MESHWITHCLASSIFICATION SWIFT_NAME(meshwithclassification) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::ar
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ SceneReconstructionMode <> JS SceneReconstructionMode (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::ar::SceneReconstructionMode> final {
|
|
44
|
+
static inline margelo::nitro::ar::SceneReconstructionMode fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("none"): return margelo::nitro::ar::SceneReconstructionMode::NONE;
|
|
48
|
+
case hashString("mesh"): return margelo::nitro::ar::SceneReconstructionMode::MESH;
|
|
49
|
+
case hashString("meshWithClassification"): return margelo::nitro::ar::SceneReconstructionMode::MESHWITHCLASSIFICATION;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum SceneReconstructionMode - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::SceneReconstructionMode arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::ar::SceneReconstructionMode::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
57
|
+
case margelo::nitro::ar::SceneReconstructionMode::MESH: return JSIConverter<std::string>::toJSI(runtime, "mesh");
|
|
58
|
+
case margelo::nitro::ar::SceneReconstructionMode::MESHWITHCLASSIFICATION: return JSIConverter<std::string>::toJSI(runtime, "meshWithClassification");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert SceneReconstructionMode to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("none"):
|
|
71
|
+
case hashString("mesh"):
|
|
72
|
+
case hashString("meshWithClassification"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// TrackingState.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/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::ar {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (TrackingState).
|
|
30
|
+
*/
|
|
31
|
+
enum class TrackingState {
|
|
32
|
+
NOTAVAILABLE SWIFT_NAME(notavailable) = 0,
|
|
33
|
+
LIMITED SWIFT_NAME(limited) = 1,
|
|
34
|
+
NORMAL SWIFT_NAME(normal) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::ar
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ TrackingState <> JS TrackingState (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::ar::TrackingState> final {
|
|
44
|
+
static inline margelo::nitro::ar::TrackingState fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("notAvailable"): return margelo::nitro::ar::TrackingState::NOTAVAILABLE;
|
|
48
|
+
case hashString("limited"): return margelo::nitro::ar::TrackingState::LIMITED;
|
|
49
|
+
case hashString("normal"): return margelo::nitro::ar::TrackingState::NORMAL;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum TrackingState - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::ar::TrackingState arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::ar::TrackingState::NOTAVAILABLE: return JSIConverter<std::string>::toJSI(runtime, "notAvailable");
|
|
57
|
+
case margelo::nitro::ar::TrackingState::LIMITED: return JSIConverter<std::string>::toJSI(runtime, "limited");
|
|
58
|
+
case margelo::nitro::ar::TrackingState::NORMAL: return JSIConverter<std::string>::toJSI(runtime, "normal");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert TrackingState to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("notAvailable"):
|
|
71
|
+
case hashString("limited"):
|
|
72
|
+
case hashString("normal"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|