当前位置:网站首页>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)边栏推荐
- 链表内指定区间反转
- Test shift right: Elk practice of online quality monitoring
- MongoDB系列之MongoDB常用命令
- MySQL
- Machine learning terminology
- Button wizard play strange learning - go back to the city to buy medicine and add blood
- [AUTOSAR eight OS]
- Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
- 1696C. Fishingprince plays with array [thinking questions + intermediate state + optimized storage]
- [overview of AUTOSAR four BSW]
猜你喜欢

Basic concept and implementation of overcoming hash
![[AUTOSAR II appl overview]](/img/da/76ccc05e2199705b20d8304bfb86b2.png)
[AUTOSAR II appl overview]

有向图的强连通分量

Linear programming of mathematical modeling (including Matlab code)
![[AUTOSAR eight OS]](/img/ac/fbc84c077ff9c94c840e1871171d19.png)
[AUTOSAR eight OS]

Correctly distinguish the similarities and differences among API, rest API, restful API and web service

First hand evaluation of Reza electronics rz/g2l development board

【FH-GFSK】FH-GFSK信号分析与盲解调研究

ROS2之ESP32简单速度消息测试(极限频率)

Deep analysis of data storage in memory
随机推荐
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Merge K sorted linked lists
[shutter] image component (cached_network_image network image caching plug-in)
Win10 can't be installed in many ways Problems with NET3.5
1038 Recover the Smallest Number
MySQL
The difference between tail -f, tail -f and tail
The R language uses the ctree function in the party package to build conditional inference decision trees, uses the plot function to visualize the trained conditional inference decision tree, and the
比较版本号
按键精灵打怪学习-自动回城路线的判断
Deep analysis of data storage in memory
Correctly distinguish the similarities and differences among API, rest API, restful API and web service
matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
Basic remote connection tool xshell
基于ARM RK3568的红外热成像体温检测系统
Kivy教程大全之 创建您的第一个kivy程序 hello word(教程含源码)
Mongodb common commands of mongodb series
Excel if formula determines whether the two columns are the same
按键精灵打怪学习-前台和内网发送后台验证码
Usage of using clause in kingbases alter table