Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
315df87
4.1.3-stable
Makosai Nov 14, 2023
d0a13d3
Create a CI for Godot 4.x
Makosai Nov 14, 2023
d60f0c5
Update ci_4_x.yml
Makosai Nov 14, 2023
97e48dd
Update generate_headers.sh
Makosai Nov 14, 2023
fc06f15
Update CameraMatrix to Projection
Makosai Nov 14, 2023
732fbf8
Update arkit_interface
Makosai Nov 15, 2023
d311ad6
Update arkit
Makosai Nov 15, 2023
97e31c8
Update arkit
Makosai Nov 15, 2023
f91748c
Update arkit_interface.h
Makosai Nov 15, 2023
1f23c75
Merge branch 'master' of github.com:Makosai/godot-ios-plugins-4.x
Makosai Nov 15, 2023
00f5feb
Update arkit_interface.mm
Makosai Nov 15, 2023
d6da370
Update arkit_interface.mm
Makosai Nov 15, 2023
223383b
Update arkit_interface.h
Makosai Nov 15, 2023
b4abc3f
Update arkit_module.cpp
Makosai Nov 15, 2023
1f589a1
4.1.3-stable
Makosai Nov 14, 2023
78abe1e
Create a CI for Godot 4.x
Makosai Nov 14, 2023
6abe422
Update ci_4_x.yml
Makosai Nov 14, 2023
5fdcd02
Update CameraMatrix to Projection
Makosai Nov 14, 2023
c48d597
Update arkit
Makosai Nov 15, 2023
d5db217
Update arkit_interface.h
Makosai Nov 15, 2023
84fd93f
Update arkit_interface
Makosai Nov 15, 2023
4cc3998
Update arkit
Makosai Nov 15, 2023
1be861a
Update arkit_interface.mm
Makosai Nov 15, 2023
1de11b6
Update arkit_interface.mm
Makosai Nov 15, 2023
021e904
Update arkit_interface.h
Makosai Nov 15, 2023
25bfac9
Update arkit_module.cpp
Makosai Nov 15, 2023
7f95055
Update Godot submodule
celyk Feb 16, 2025
6456f8b
Remove unnecessary function overrides
celyk Feb 18, 2025
22dd88b
Update generate_headers.sh for Godot 4.3
celyk Feb 18, 2025
e89efb7
Fix CI
celyk Feb 19, 2025
3bb934d
Implement blit
celyk Feb 19, 2025
a4da8cd
Bugfix orientations
celyk Feb 19, 2025
c382e84
Bugfix anchor pose
celyk Feb 20, 2025
4f165f0
Added ARKitAnchorMesh
celyk Feb 22, 2025
857e7d2
Hook up interface with ARKitAnchorMesh
celyk Feb 22, 2025
4bdaf98
Attempt to expose the class to GDScript
celyk Feb 22, 2025
2c3da44
Fire the tracker_updated signal
celyk Feb 22, 2025
a496fcb
Fix indents
celyk Feb 22, 2025
b8a1da4
Add head tracker
celyk Feb 22, 2025
29d5f21
Add exposure offset
celyk Feb 24, 2025
bc208a2
Orient the ARKit raycast
celyk Feb 24, 2025
3cd7157
Allow ambient_color_temperature
celyk Feb 24, 2025
f39b23a
Prevent crashing. Memory is already freed
celyk Feb 24, 2025
f90a37b
Update all VERSION_MAJOR directives to support Godot 5
Makosai Apr 24, 2025
7112a78
Merge branch 'master' into master
Makosai Apr 24, 2025
fdd9a9c
Merge branch 'pr/74'
Makosai Apr 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci_4_x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Continuous integration 4.x
on: [push, pull_request]

jobs:
build:
name: Build (macOS)
runs-on: "macos-latest"

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: '3.x'
architecture: 'x64'

- name: Configuring Python
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python --version
scons --version

- name: Generate Headers
run: |
./scripts/generate_headers.sh 4.0 || true

- name: Compile Plugins
run: |
./scripts/release_xcframework.sh 4.0
ls -l bin/release

- uses: actions/upload-artifact@v2
with:
name: plugins
path: bin/release/*
retention-days: 4
if-no-files-found: error
2 changes: 1 addition & 1 deletion godot
Submodule godot updated 12537 files
58 changes: 44 additions & 14 deletions plugins/arkit/arkit_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ class ARKitInterface : public GodotBaseARInterface {
real_t ambient_intensity;
real_t ambient_color_temperature;

Transform transform;
CameraMatrix projection;
Transform3D transform;
Projection projection;
float eye_height, z_near, z_far;

Ref<CameraFeed> feed;
size_t image_width[2];
size_t image_height[2];
GodotUInt8Vector img_data[2];

#if VERSION_MAJOR == 4
XRInterface::TrackingStatus tracking_state;
#endif

struct anchor_map {
GodotARTracker *tracker;
unsigned char uuid[16];
Expand All @@ -112,10 +116,6 @@ class ARKitInterface : public GodotBaseARInterface {
void start_session();
void stop_session();

bool get_anchor_detection_is_enabled() const GODOT_ARKIT_OVERRIDE;
void set_anchor_detection_is_enabled(bool p_enable) GODOT_ARKIT_OVERRIDE;
virtual int get_camera_feed_id() GODOT_ARKIT_OVERRIDE;

bool get_light_estimation_is_enabled() const;
void set_light_estimation_is_enabled(bool p_enable);

Expand All @@ -125,22 +125,52 @@ class ARKitInterface : public GodotBaseARInterface {
/* while Godot has its own raycast logic this takes ARKits camera into account and hits on any ARAnchor */
Array raycast(Vector2 p_screen_coord);

virtual void notification(int p_what) GODOT_ARKIT_OVERRIDE;

virtual StringName get_name() const GODOT_ARKIT_OVERRIDE;
virtual int get_capabilities() const GODOT_ARKIT_OVERRIDE;
virtual uint32_t get_capabilities() const GODOT_ARKIT_OVERRIDE;

virtual bool is_initialized() const GODOT_ARKIT_OVERRIDE;
virtual bool initialize() GODOT_ARKIT_OVERRIDE;
virtual void uninitialize() GODOT_ARKIT_OVERRIDE;
virtual Dictionary get_system_info() GODOT_ARKIT_OVERRIDE;

virtual PackedStringArray get_suggested_tracker_names() const GODOT_ARKIT_OVERRIDE;
virtual PackedStringArray get_suggested_pose_names(const StringName &p_tracker_name) const GODOT_ARKIT_OVERRIDE;
virtual TrackingStatus get_tracking_status() const GODOT_ARKIT_OVERRIDE;
virtual void trigger_haptic_pulse(const String &p_action_name, const StringName &p_tracker_name, double p_frequency, double p_amplitude, double p_duration_sec, double p_delay_sec = 0) GODOT_ARKIT_OVERRIDE; /* trigger a haptic pulse */

virtual bool supports_play_area_mode(XRInterface::PlayAreaMode p_mode) GODOT_ARKIT_OVERRIDE;
virtual XRInterface::PlayAreaMode get_play_area_mode() const GODOT_ARKIT_OVERRIDE;
virtual bool set_play_area_mode(XRInterface::PlayAreaMode p_mode) GODOT_ARKIT_OVERRIDE;
virtual PackedVector3Array get_play_area() const GODOT_ARKIT_OVERRIDE;

virtual bool get_anchor_detection_is_enabled() const GODOT_ARKIT_OVERRIDE;
virtual void set_anchor_detection_is_enabled(bool p_enable) GODOT_ARKIT_OVERRIDE;
virtual int get_camera_feed_id() GODOT_ARKIT_OVERRIDE;

virtual Size2 get_render_target_size() GODOT_ARKIT_OVERRIDE;
virtual uint32_t get_view_count() GODOT_ARKIT_OVERRIDE;
virtual Transform3D get_camera_transform() GODOT_ARKIT_OVERRIDE;
virtual Transform3D get_transform_for_view(uint32_t p_view, const Transform3D &p_cam_transform) GODOT_ARKIT_OVERRIDE;
virtual Projection get_projection_for_view(uint32_t p_view, double p_aspect, double p_z_near, double p_z_far) GODOT_ARKIT_OVERRIDE;

virtual Size2 get_render_targetsize() GODOT_ARKIT_OVERRIDE;
virtual bool is_stereo() GODOT_ARKIT_OVERRIDE;
virtual Transform get_transform_for_eye(GodotBaseARInterface::Eyes p_eye, const Transform &p_cam_transform) GODOT_ARKIT_OVERRIDE;
virtual CameraMatrix get_projection_for_eye(GodotBaseARInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far) GODOT_ARKIT_OVERRIDE;
virtual void commit_for_eye(GodotBaseARInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) GODOT_ARKIT_OVERRIDE;
virtual RID get_vrs_texture() GODOT_ARKIT_OVERRIDE;
virtual RID get_color_texture() GODOT_ARKIT_OVERRIDE;
virtual RID get_depth_texture() GODOT_ARKIT_OVERRIDE;
virtual RID get_velocity_texture() GODOT_ARKIT_OVERRIDE;

virtual void process() GODOT_ARKIT_OVERRIDE;
virtual void pre_render() GODOT_ARKIT_OVERRIDE;
virtual bool pre_draw_viewport(RID p_render_target) GODOT_ARKIT_OVERRIDE;
virtual Vector<BlitToScreen> post_draw_viewport(RID p_render_target, const Rect2 &p_screen_rect) GODOT_ARKIT_OVERRIDE;
virtual void end_frame() GODOT_ARKIT_OVERRIDE;

virtual bool is_passthrough_supported() GODOT_ARKIT_OVERRIDE;
virtual bool is_passthrough_enabled() GODOT_ARKIT_OVERRIDE;
virtual bool start_passthrough() GODOT_ARKIT_OVERRIDE;
virtual void stop_passthrough() GODOT_ARKIT_OVERRIDE;

virtual Array get_supported_environment_blend_modes() GODOT_ARKIT_OVERRIDE;
virtual bool set_environment_blend_mode(EnvironmentBlendMode mode) GODOT_ARKIT_OVERRIDE;

// called by delegate (void * because C++ and Obj-C don't always mix, should really change all platform/ios/*.cpp files to .mm)
void _add_or_update_anchor(GodotARAnchor *p_anchor);
Expand Down
Loading