Skip to content

Commit

Permalink
Removes flicker (AndrewHartAR#201)
Browse files Browse the repository at this point in the history
* App Store 1024x1024 Icon

This eliminates an xcode compile warning

* Fix CLHeading.headingAccuracy variable definition

Was CLLocationDegrees, now CLLocationDirection.  Worth noting that both are doubles so the code compiled w/o error, but it's now correct.

* Camera tracking mechanism sync to device orientation better, especially after pause/resume

Was ARWorldTracdkingConfiguration, now AROrientationTrackingConfiguration.  Heading (Euler.y) now tracks soley to AHRS, before it tried to sense and track to planes - which doesn't make sense for an outside environment.

* Added a configuration option for World Tracking versus Orientation Tracking.  The default is World Tracking.

* Updated the changelog.

* Added more (defaulted) parameters to the convenience initializer and re-commented it.  Also addressed an issue Marc found in the PR.

* Comments on how to use the new aRTrackingType option

* Revert "Comments on how to use the new aRTrackingType option"

This reverts commit 95d4ca0.

* Remove flicker by assigning non-conflicting z-order values to each node

* Convert TAB -> Space

* Convert TAB -> Space

* InfoLabel includes additional heading data (AndrewHartAR#203)

* App Store 1024x1024 Icon

This eliminates an xcode compile warning

* Fix CLHeading.headingAccuracy variable definition

Was CLLocationDegrees, now CLLocationDirection.  Worth noting that both are doubles so the code compiled w/o error, but it's now correct.

* Camera tracking mechanism sync to device orientation better, especially after pause/resume

Was ARWorldTracdkingConfiguration, now AROrientationTrackingConfiguration.  Heading (Euler.y) now tracks soley to AHRS, before it tried to sense and track to planes - which doesn't make sense for an outside environment.

* Added a configuration option for World Tracking versus Orientation Tracking.  The default is World Tracking.

* Updated the changelog.

* Added more (defaulted) parameters to the convenience initializer and re-commented it.  Also addressed an issue Marc found in the PR.

* Comments on how to use the new aRTrackingType option

* Revert "Comments on how to use the new aRTrackingType option"

This reverts commit 95d4ca0.

* InfoLabel displays ARKit.EulerAngles.y, CLHeading.heading, and CLHeading.headingAccuracy to help debug heading issues
Also infoLabel uses a monospaced font to reduce jitter

* Update ChangeLog for PR 203
  • Loading branch information
Pilot-Marc authored and intere committed Jun 23, 2019
1 parent f8476d9 commit a4de2e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
import SceneKit

extension SCNNode {
/// Overlapping nodes require unique renderingOrder values to avoid flicker
/// This method will select random values if you don't care which node is in front of the other,
/// or you can specify a particular z-order value
func removeFlicker (withRenderingOrder renderingOrder: Int = Int.random(in: 1..<Int.max)) {
self.renderingOrder = renderingOrder
if let geom = geometry {
geom.materials.forEach { $0.readsFromDepthBuffer = false }
}
}
class func axesNode(quiverLength: CGFloat, quiverThickness: CGFloat) -> SCNNode {
let quiverThickness = (quiverLength / 50.0) * quiverThickness
let chamferRadius = quiverThickness / 2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ open class LocationAnnotationNode: LocationNode {

annotationNode = AnnotationNode(view: nil, image: image)
annotationNode.geometry = plane
annotationNode.removeFlicker()

super.init(location: location)

Expand Down
1 change: 1 addition & 0 deletions Sources/ARKit-CoreLocation/Nodes/PolylineNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private extension PolylineNode {

let box = boxBuilder(CGFloat(distance))
let boxNode = SCNNode(geometry: box)
boxNode.removeFlicker()

let bearing = -currentLocation.bearing(between: nextLocation)

Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog
- 1.2.1
- [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)
- 1.2.0
Expand Down

0 comments on commit a4de2e2

Please sign in to comment.