Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interact with location nodes #197

Merged
merged 11 commits into from
Oct 10, 2019

Conversation

matsoftware
Copy link
Contributor

Background

This PR enables the interaction with the direction boxes added to the scene.

Breaking Changes

The LNToucheDelegate interfaces has been modified to notify the touch event of both an AnnotationNode and a LocationNode, that's represented by the parent of the SCNBox rendered.
The PolylineNode class is enriched with a tag attribute that can be used to identify the touched element.

Meta

  • Tied to Version Release(s):

Checklist

  • Appropriate label has been added to this PR (i.e., Bug, Enhancement, etc.).
  • Documentation has been added to all open, and public scoped methods and properties.
  • Changelog has been updated
  • Tests have have been added to all new features. (not a requirement, but helpful)
  • Image/GIFs have been added for all UI related changed.

Screenshots

@matsoftware
Copy link
Contributor Author

(Closing the PR for now to do extra local tests)

@matsoftware matsoftware reopened this Jun 19, 2019
@Pilot-Marc
Copy link
Collaborator

SCNnode already has a name property that appears to be designed for the very purpose of your tag property.

@matsoftware
Copy link
Contributor Author

Hi @Pilot-Marc, I'm reusing the existing tag property of LocationNode for that. In the delegate method, to interact with the selected node, I'm doing something like this:

    func locationNodeTouched(node: LocationNode) {
        guard let name = node.tag else { return }
        guard let selectedNode = node.childNodes.first(where: { $0.geometry is SCNBox }) else { return }
...

The goal of this PR is to basically pass the identifier when generating multiple polylines.

@Pilot-Marc
Copy link
Collaborator

@matsoftware I was working on the same issue, detecting what node I was tapping on, but you beat me to it.

@matsoftware
Copy link
Contributor Author

@aaronbrethorst / @Pilot-Marc Changelog and README updated

…cation into enable-direction-nodes-touch

# Conflicts:
#	Pods/Pods.xcodeproj/project.pbxproj
@intere intere self-requested a review July 15, 2019 05:07
@intere
Copy link
Collaborator

intere commented Sep 6, 2019

@matsoftware - could you resolve the merge conflicts, please?

changelog.md Outdated
@@ -7,6 +7,7 @@
- [PR #203 - InfoLabel includes additional heading data](https://github.com/ProjectDent/ARKit-CoreLocation/pull/203)
- [PR #198 - Adds support for AR Orientation Tracking](https://github.com/ProjectDent/ARKit-CoreLocation/pull/198)
- [PR #193 - Adds support for Swift Package Manager](https://github.com/ProjectDent/ARKit-CoreLocation/pull/193)
- [PR #197 - Interact with location nodes](https://github.com/ProjectDent/ARKit-CoreLocation/pull/197)
Copy link
Collaborator

@intere intere Sep 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this line to the 1.2.2 section (1.2.1 has been released). That section will be visible after you merge with the develop branch.

…cation into enable-direction-nodes-touch

# Conflicts:
#	Pods/Pods.xcodeproj/project.pbxproj
#	Sources/ARKit-CoreLocation/Nodes/LocationNode.swift
@matsoftware
Copy link
Contributor Author

Changes pushed @intere

@intere intere merged commit 89fa804 into AndrewHartAR:develop Oct 10, 2019
@matsoftware matsoftware deleted the enable-direction-nodes-touch branch October 26, 2019 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants