Skip to content

Commit

Permalink
Merge pull request #2 from philipturner/temp
Browse files Browse the repository at this point in the history
Update for recent change to ARHeadsetKit
  • Loading branch information
philipturner authored Oct 20, 2021
2 parents 4ced46e + 273425c commit 10bbb12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ extension PendulumInterface.Anchor: RayTraceable {

func trace(ray worldSpaceRay: RayTracing.Ray) -> Float? {
let testRay = worldSpaceRay.transformedIntoBoundingBox(boundingBox)
guard testRay.passesInitialBoundingBoxTest(), testRay.getCentralCubeProgress() != nil else {
guard testRay.passesInitialBoundingBoxTest(), testRay.getCubeProgress() != nil else {
return nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extension PendulumRenderer {
let inverseScale = simd_float3(diameterReciprocal, diameterReciprocal, pendulumWidthReciprocal)
let testRay = RayTracing.Ray(origin: modelSpaceOrigin * inverseScale, direction: modelSpaceDirection * inverseScale)

guard testRay.passesInitialBoundingBoxTest(), testRay.getCentralCylinderProgress() != nil else {
guard testRay.passesInitialBoundingBoxTest(), testRay.getCylinderProgress() != nil else {
return nil
}
}
Expand Down Expand Up @@ -219,7 +219,7 @@ extension PendulumRenderer {
func testBox(_ boundingBox: simd_float2x3) -> Bool {
let transformedRay = modelSpaceRay.transformedIntoBoundingBox(boundingBox)

if transformedRay.passesInitialBoundingBoxTest(), transformedRay.getCentralCubeProgress() != nil {
if transformedRay.passesInitialBoundingBoxTest(), transformedRay.getCubeProgress() != nil {
return true
} else {
return false
Expand Down Expand Up @@ -293,7 +293,7 @@ extension PendulumRenderer {
let inverseScale = simd_float3(.init(repeating: jointDiameterReciprocal), inverseScaleZ)
let testRay = flip(RayTracing.Ray(origin: testOrigin * inverseScale, direction: testDirection * inverseScale))

if testRay.passesInitialBoundingBoxTest(), let progress = testRay.getCentralCylinderProgress() {
if testRay.passesInitialBoundingBoxTest(), let progress = testRay.getCylinderProgress() {
return progress
} else {
return nil
Expand Down Expand Up @@ -334,7 +334,7 @@ extension PendulumRenderer {
let inverseScale = rectangleInverseScale
let testRay = RayTracing.Ray(origin: testOrigin * inverseScale, direction: testDirection * inverseScale)

if testRay.passesInitialBoundingBoxTest(), let progress = testRay.getCentralCubeProgress() {
if testRay.passesInitialBoundingBoxTest(), let progress = testRay.getCubeProgress() {
return progress
} else {
return nil
Expand Down

0 comments on commit 10bbb12

Please sign in to comment.