Skip to content

Commit 475caa7

Browse files
Merge branch 'v0.1.0'
2 parents c66d26d + 42181be commit 475caa7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4445
-1651
lines changed

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let package = Package(
3131
],
3232

3333
dependencies: [
34-
.package(url: "https://github.com/keyvariable/kvKit-Swift.git", from: "3.1.0-a.50"),
34+
.package(url: "https://github.com/keyvariable/kvKit-Swift.git", from: "3.1.0"),
3535
],
3636

3737
targets: [

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This package is completely crossplatform.
2525

2626
```swift
2727
dependencies: [
28-
.package(url: "https://github.com/keyvariable/kvGeometry.swift.git", from: "0.0.1"),
28+
.package(url: "https://github.com/keyvariable/kvGeometry.swift.git", from: "0.1.0"),
2929
]
3030
```
3131

Sources/kvCSG/KvCSG.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

Sources/kvCSG/KvCsgBSP.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

Sources/kvCSG/KvCsgBox.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

Sources/kvCSG/KvCsgBspHalfSpace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

Sources/kvCSG/KvCsgBspNode.swift

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at
@@ -371,14 +371,21 @@ where Math : KvMathScope, Vertex : KvVertex3Protocol, Vertex.Math == Math
371371

372372
// MARK: Operators
373373

374+
/// - Returns: A transformed deep copy of the receiver.
375+
@inlinable
376+
public static func *(lhs: KvAffineTransform3<Math>, rhs: Self) -> Self {
377+
KvTransform3<Math>(lhs) * rhs
378+
}
379+
380+
374381
/// - Returns: A transformed deep copy of the receiver.
375382
@inlinable
376383
public static func *(lhs: KvTransform3<Math>, rhs: Self) -> Self {
377384
let (t, scale) = Transform.from(lhs)
378385

379386
let (ccw, cw): ([Polygon2], [Polygon2]) = scale.map { scale in
380387

381-
func Scaled(_ polygons: [Polygon2], by scale: KvTransform3<Math>) -> [Polygon2] {
388+
func Scaled(_ polygons: [Polygon2], by scale: KvAffineTransform3<Math>) -> [Polygon2] {
382389
polygons.map { scale * $0 }
383390
}
384391

@@ -723,6 +730,15 @@ where Math : KvMathScope, Vertex : KvVertex3Protocol, Vertex.Math == Math
723730

724731
// MARK: Operators
725732

733+
/// - Returns: A copy of the receiver's subtree where all the nodes are transformed.
734+
@inlinable
735+
public static func *(lhs: KvAffineTransform3<Math>, rhs: Node) -> Node {
736+
Node(polygons: lhs * rhs._polygons,
737+
front: rhs._front.map { lhs * $0 },
738+
back: rhs._back.map { lhs * $0 })
739+
}
740+
741+
726742
/// - Returns: A copy of the receiver's subtree where all the nodes are transformed.
727743
@inlinable
728744
public static func *(lhs: KvTransform3<Math>, rhs: Node) -> Node {

Sources/kvCSG/KvCsgCylinder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

Sources/kvCSG/KvCsgPlane.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//===----------------------------------------------------------------------===//
22
//
3-
// Copyright (c) 2021 Svyatoslav Popov.
3+
// Copyright (c) 2022 Svyatoslav Popov ([email protected]).
44
//
55
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
66
// the License. You may obtain a copy of the License at

0 commit comments

Comments
 (0)