Skip to content

Commit

Permalink
Remove Quaternion
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklockwood committed Aug 7, 2024
1 parent 71efd5f commit 375515d
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 825 deletions.
14 changes: 3 additions & 11 deletions Euclid.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
0148ECA62783796A00B3F836 /* PathPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0148ECA52783796A00B3F836 /* PathPoint.swift */; };
014AC60E2505963800F54349 /* SceneKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 014AC60D2505963800F54349 /* SceneKitTests.swift */; };
0157FEC42B63B1BE009033D1 /* Mesh+IO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0157FEC32B63B1BE009033D1 /* Mesh+IO.swift */; };
0162A09623795E260078AE84 /* Euclid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAB2921BFE78100AF60DC /* Euclid.framework */; platformFilters = (ios, maccatalyst, ); };
01593CCB297C39180058A35C /* Direction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01593CCA297C39180058A35C /* Direction.swift */; };
01593CCD297CB5AF0058A35C /* Position.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01593CCC297CB5AF0058A35C /* Position.swift */; };
0162A09623795E260078AE84 /* Euclid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAB2921BFE78100AF60DC /* Euclid.framework */; platformFilters = (ios, maccatalyst, ); };
0162A09923795EB30078AE84 /* Euclid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAB2921BFE78100AF60DC /* Euclid.framework */; };
016A77F82B2F7C7800B7AB73 /* MeshImportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016A77F72B2F7C7800B7AB73 /* MeshImportTests.swift */; };
016A77FA2B32184A00B7AB73 /* RealityKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016A77F92B32184A00B7AB73 /* RealityKitTests.swift */; };
Expand Down Expand Up @@ -68,12 +68,10 @@
01BA297A2235E34C0088D36B /* CGPathTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01BA29792235E34C0088D36B /* CGPathTests.swift */; };
01BA297C2235E3590088D36B /* Euclid+CoreGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01BA297B2235E3580088D36B /* Euclid+CoreGraphics.swift */; };
01CBE2682775E3EE00B7ED45 /* MeshTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01CBE2672775E3EE00B7ED45 /* MeshTests.swift */; };
01CF789326EBE0C70097907A /* Quaternion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01CF789226EBE0C70097907A /* Quaternion.swift */; };
01D2F9F82AADBB1400C201D9 /* Mesh+Texcoords.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D2F9F72AADBB1400C201D9 /* Mesh+Texcoords.swift */; };
01D96AB523D8E36A00D0D267 /* BoundsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D96AB423D8E36A00D0D267 /* BoundsTests.swift */; };
01E5F54923D59BF100717D58 /* BSP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E5F54823D59BF100717D58 /* BSP.swift */; };
01F2382023BF4160005EC9DB /* LineSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2381F23BF4160005EC9DB /* LineSegment.swift */; };
01F2465428FD4A020071AE64 /* QuaternionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2465228FD499F0071AE64 /* QuaternionTests.swift */; };
01FAE7BD29744E08008DB288 /* PathCSGTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01FAE7BB29744C22008DB288 /* PathCSGTests.swift */; };
0A240137256A64FB00C1535C /* AngleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A240136256A64FB00C1535C /* AngleTests.swift */; };
0A24013F256A671600C1535C /* Angle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A24013E256A671600C1535C /* Angle.swift */; };
Expand Down Expand Up @@ -160,10 +158,10 @@
0148ECA52783796A00B3F836 /* PathPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PathPoint.swift; sourceTree = "<group>"; };
014AC60D2505963800F54349 /* SceneKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneKitTests.swift; sourceTree = "<group>"; };
0157FEC32B63B1BE009033D1 /* Mesh+IO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Mesh+IO.swift"; sourceTree = "<group>"; };
016A77F72B2F7C7800B7AB73 /* MeshImportTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshImportTests.swift; sourceTree = "<group>"; };
016A77F92B32184A00B7AB73 /* RealityKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealityKitTests.swift; sourceTree = "<group>"; };
01593CCA297C39180058A35C /* Direction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Direction.swift; sourceTree = "<group>"; };
01593CCC297CB5AF0058A35C /* Position.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Position.swift; sourceTree = "<group>"; };
016A77F72B2F7C7800B7AB73 /* MeshImportTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshImportTests.swift; sourceTree = "<group>"; };
016A77F92B32184A00B7AB73 /* RealityKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealityKitTests.swift; sourceTree = "<group>"; };
016FAB2921BFE78100AF60DC /* Euclid.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Euclid.framework; sourceTree = BUILT_PRODUCTS_DIR; };
016FAB2C21BFE78100AF60DC /* Euclid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Euclid.h; sourceTree = "<group>"; };
016FAB2D21BFE78100AF60DC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -206,12 +204,10 @@
01BA29792235E34C0088D36B /* CGPathTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGPathTests.swift; sourceTree = "<group>"; };
01BA297B2235E3580088D36B /* Euclid+CoreGraphics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Euclid+CoreGraphics.swift"; sourceTree = "<group>"; };
01CBE2672775E3EE00B7ED45 /* MeshTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeshTests.swift; sourceTree = "<group>"; };
01CF789226EBE0C70097907A /* Quaternion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Quaternion.swift; sourceTree = "<group>"; };
01D2F9F72AADBB1400C201D9 /* Mesh+Texcoords.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Mesh+Texcoords.swift"; sourceTree = "<group>"; };
01D96AB423D8E36A00D0D267 /* BoundsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoundsTests.swift; sourceTree = "<group>"; };
01E5F54823D59BF100717D58 /* BSP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BSP.swift; sourceTree = "<group>"; };
01F2381F23BF4160005EC9DB /* LineSegment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineSegment.swift; sourceTree = "<group>"; };
01F2465228FD499F0071AE64 /* QuaternionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuaternionTests.swift; sourceTree = "<group>"; };
01FAE7BB29744C22008DB288 /* PathCSGTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PathCSGTests.swift; sourceTree = "<group>"; };
0A240136256A64FB00C1535C /* AngleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AngleTests.swift; sourceTree = "<group>"; };
0A24013E256A671600C1535C /* Angle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Angle.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -327,7 +323,6 @@
52A663A023857D5300FACF9D /* Line.swift */,
01F2381F23BF4160005EC9DB /* LineSegment.swift */,
013ED08E23C0E60900FEEE5C /* Rotation.swift */,
01CF789226EBE0C70097907A /* Quaternion.swift */,
01B9F60D292BCE57002CC3EB /* Stretchable.swift */,
016FAB4B21BFE7C200AF60DC /* Transforms.swift */,
016FAB4A21BFE7C200AF60DC /* Euclid+SceneKit.swift */,
Expand Down Expand Up @@ -371,7 +366,6 @@
01B9F60F292BD7FE002CC3EB /* StretchableTests.swift */,
016FAB5D21BFE7CE00AF60DC /* UtilityTests.swift */,
52C844E023854C87009C0A73 /* VectorTests.swift */,
01F2465228FD499F0071AE64 /* QuaternionTests.swift */,
0141CAEE2857DBF4006ADFDB /* Euclid+Testing.swift */,
016FAB3921BFE78100AF60DC /* Info.plist */,
);
Expand Down Expand Up @@ -643,7 +637,6 @@
0188525826D951490079C602 /* Color.swift in Sources */,
010A63392A951165000E3306 /* Mesh+OBJ.swift in Sources */,
016FAB5421BFE7C200AF60DC /* Mesh.swift in Sources */,
01CF789326EBE0C70097907A /* Quaternion.swift in Sources */,
0112D5C928EE29BB00A1C085 /* Euclid+RealityKit.swift in Sources */,
01593CCD297CB5AF0058A35C /* Position.swift in Sources */,
EA6F2219296C5A9000B530BE /* Polygon+CSG.swift in Sources */,
Expand Down Expand Up @@ -683,7 +676,6 @@
buildActionMask = 2147483647;
files = (
01FAE7BD29744E08008DB288 /* PathCSGTests.swift in Sources */,
01F2465428FD4A020071AE64 /* QuaternionTests.swift in Sources */,
01A429FA2237A85C00C251A6 /* TextTests.swift in Sources */,
0188E98326ACA0040029C253 /* LineSegmentTests.swift in Sources */,
0A240137256A64FB00C1535C /* AngleTests.swift in Sources */,
Expand Down
29 changes: 0 additions & 29 deletions Sources/Euclid+SIMD.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ public extension simd_quatd {
init(_ rotation: Rotation) {
self = rotation.storage
}

/// Creates a simd quaternion from a Euclid `Quaternion`.
/// - Parameter quaternion: A Euclid quaternion.
@available(*, deprecated)
init(_ quaternion: Quaternion) {
self = quaternion.storage
}
}

public extension simd_quatf {
Expand All @@ -133,13 +126,6 @@ public extension simd_quatf {
init(_ rotation: Rotation) {
self.init(vector: simd_float4(rotation.storage.vector))
}

/// Creates a simd float quaternion from a Euclid `Quaternion`.
/// - Parameter quaternion: A Euclid quaternion.
@available(*, deprecated)
init(_ quaternion: Quaternion) {
self.init(vector: simd_float4(quaternion.storage.vector))
}
}

public extension Rotation {
Expand All @@ -156,19 +142,4 @@ public extension Rotation {
}
}

@available(*, deprecated)
public extension Quaternion {
/// Creates a `Quaternion` from a simd quaternion.
/// - Parameter quaternion: A simd quaternion.
init(_ quaternion: simd_quatd) {
self.init(storage: quaternion)
}

/// Creates a `Quaternion` from a simd quaternion.
/// - Parameter quaternion: A simd quaternion.
init(_ quaternion: simd_quatf) {
self.init(simd_quatd(vector: simd_double4(quaternion.vector)))
}
}

#endif
19 changes: 0 additions & 19 deletions Sources/Euclid+SceneKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,6 @@ public extension SCNQuaternion {
init(_ rotation: Rotation) {
self.init(rotation.x, rotation.y, rotation.z, rotation.w)
}

/// Creates a new SceneKit quaternion from a Euclid `Quaternion`
/// - Parameter quaternion: The quaternion to convert.
///
/// > Note: ``SCNQuaternion`` is actually just a typealias for ``SCNVector4`` so be
/// careful to avoid type ambiguity when using this value.
@available(*, deprecated)
init(_ quaternion: Quaternion) {
self.init(quaternion.x, quaternion.y, quaternion.z, quaternion.w)
}
}

public extension SCNMatrix4 {
Expand Down Expand Up @@ -525,15 +515,6 @@ public extension Rotation {
}
}

@available(*, deprecated)
public extension Quaternion {
/// Creates a Euclid `Quaternion` from a SceneKit quaternion.
/// - Parameter q: The `SCNQuaternion` to convert.
init(_ q: SCNQuaternion) {
self.init(Double(q.x), Double(q.y), Double(q.z), Double(q.w))
}
}

public extension Transform {
/// Creates a transform from a SceneKit transform matrix.
/// - Parameter scnMatrix: The `SCNMatrix4` from which to determine the transform.
Expand Down
Loading

0 comments on commit 375515d

Please sign in to comment.