当前位置:网站首页>SwiftUI 组件大全之使用 SceneKit 和 SwiftUI 构建交互式 3D 饼图(教程含源码)
SwiftUI 组件大全之使用 SceneKit 和 SwiftUI 构建交互式 3D 饼图(教程含源码)
2022-07-03 00:51:00 【知识大胖】
本月对使用 SceneKit 构建 3D 饼图进行同样的处理是非常有意义的。除此之外,这也是仔细研究 SceneKit 框架的其他一些方面的一个很好的机会。
编码
我开始如此…当然,搜索一个很好的SCNShape实现示例。第一个目标是使用此处说明的基本代码构建切片。

请注意,尽管 Apple 称这是一条贝塞尔路径——它似乎只不过是一条路径。
let coreNode = SCNNode()
coreNode.simdPosition = SIMD3(x:0,y:0,z:0)
scene?.rootNode.addChildNode(coreNode)
coreNode.simdPivot.columns.3.z = 1
bezierPath3.move(to: CGPoint(x: 0, y: 0))
let radians = Double(startAngle) * Double.pi / 180.0
let x = Double(center.x) + Double(radius.width) * Double(cos(radians))
let y = Double(center.y) + Double(radius.height) * sin(radians)
bezierPath3.addLine(to: CGPoint(x: x, y: y))
let radians3 = Double(endAngle/2) * Double.pi / 180.0
let x3 = Double(center.x) + Double(radius.width) * Double(cos(radians3))
let y3 = Double(center.y) + Double(radius.height)边栏推荐
- Cut point of undirected graph
- [AUTOSAR nine c/s principle Architecture]
- 详解RDD基本概念、RDD五大属性
- Draw love with go+ to express love to her beloved
- [case sharing] let the development of education in the new era advance with "number"
- RK3568开发板评测篇(二):开发环境搭建
- Telephone network problems
- Excel if formula determines whether the two columns are the same
- Several cases of recursive processing organization
- Basic remote connection tool xshell
猜你喜欢

Embrace the safety concept of platform delivery

Deep analysis of data storage in memory
![[AUTOSAR 11 communication related mechanism]](/img/bf/834b0fad3a3e5bd9c1be04ba150f98.png)
[AUTOSAR 11 communication related mechanism]

基本远程连接工具Xshell
![[untitled]](/img/fd/f6b90536f10325a6fdeb68dc49c72d.png)
[untitled]

Trois tâches principales: asynchrone, courrier et timing

(C语言)数据的存储

Key detection and sinusoidal signal output developed by Arduino

Machine learning terminology

攻克哈希的基本概念与实现
随机推荐
【爱死机】《吉巴罗》被忽略的细节
[AUTOSAR twelve mode management]
详解RDD基本概念、RDD五大属性
Data analysis, thinking, law breaking and professional knowledge -- analysis method (I)
按鍵精靈打怪學習-多線程後臺坐標識別
RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide
leetcode:871. Minimum refueling times [Pat has done before + maximum stacking + greed]
Leetcode-241: designing priorities for operational expressions
Strongly connected components of digraph
Every k nodes in the linked list are flipped
比较版本号
[AUTOSAR eight OS]
[case sharing] let the development of education in the new era advance with "number"
kivy教程之在 Kivy App 中使用 matplotlib 的示例
数据分析思维分析犯法和业务知识——分析方法(一)
Deep analysis of data storage in memory
465. 最优账单平衡 DFS 回溯
1038 Recover the Smallest Number
12_ Implementation of rolling automatic video playback effect of wechat video number of wechat applet
Merge K sorted linked lists