feat(文件拆分): 拆分几何三维基础能力
build.yaml / build (push) Successful in 48s

This commit is contained in:
xiaoqidun committed 2026-10-14 00:44:44 +08:00
1 parent 64f9ec4241
commit 0be872691d
76 files changed
+1926 -1307

No files matched your search

+3 -2
View File
@@ -18,6 +18,7 @@ import (
"bytes"
"context"
"fmt"
basegeom "github.com/xiaoqidun/ofdgo/internal/base/geom"
"maps"
"slices"
@@ -165,7 +166,7 @@ func (m CompositeMember) Shape() (ShapeKind, Box) {
if lineShapeKind(kind) {
return kind, transformLineBox(box, parent)
}
if !axisAlignedMatrix(parent) {
if !basegeom.AxisAligned(basegeom.MatrixFromValues(parent.Values())) {
return "", Box{}
}
return kind, parent.TransformBox(box)
@@ -303,7 +304,7 @@ func (m CompositeMember) shapeParent() (Matrix, bool) {
// 返回: Box 变换后的端点
func transformLineBox(box Box, matrix Matrix) Box {
x, y := matrix.Transform(box.X, box.Y)
w, h := matrixVector(matrix, box.W, box.H)
w, h := basegeom.Vector(basegeom.MatrixFromValues(matrix.Values()), box.W, box.H)
return Box{X: x, Y: y, W: w, H: h}
}