当前位置:网站首页>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)边栏推荐
- Specified interval inversion in the linked list
- (C language) data storage
- Test shift right: Elk practice of online quality monitoring
- Lu Zhe, chief scientist of Shiping information: building data and personnel centered security capabilities
- 攻克哈希的基本概念与实现
- [自我管理]时间、精力与习惯管理
- 每日一题之干草堆的移动
- Basic remote connection tool xshell
- Telephone network problems
- Solve the cache problem of reactnative using WebView
猜你喜欢
![[AUTOSAR XIII NVM]](/img/38/805ab70f199e2cfad4d9dae0e2c1ff.png)
[AUTOSAR XIII NVM]

Explain the basic concepts and five attributes of RDD in detail

FPGA - 7 Series FPGA internal structure clocking -04- multi area clock

Excel if formula determines whether the two columns are the same

Matlab saves the digital matrix as geospatial data, and the display subscript index must be of positive integer type or logical type. Solve the problem

攻克哈希的基本概念与实现

leetcode:871. 最低加油次数【以前pat做过 + 最大堆 +贪心】
![[case sharing] let the development of education in the new era advance with](/img/11/af88d16dc66f00840cbfc5ba5d68bd.jpg)
[case sharing] let the development of education in the new era advance with "number"

12_ Implementation of rolling automatic video playback effect of wechat video number of wechat applet

Leetcode-849: maximum distance to the nearest person
随机推荐
用Go+绘制爱心给心爱的她表白
按键精灵打怪学习-自动回城路线的判断
链表中的节点每k个一组翻转
FPGA - 7 Series FPGA internal structure clocking -04- multi area clock
【无标题】
Leetcode-241: designing priorities for operational expressions
飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
465. 最优账单平衡 DFS 回溯
kivy教程之在 Kivy App 中使用 matplotlib 的示例
Deep analysis of data storage in memory
Leetcode-1964: find the longest effective obstacle race route to each position
[自我管理]时间、精力与习惯管理
Linear programming of mathematical modeling (including Matlab code)
全志A40i/T3如何通过SPI转CAN
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Embrace the safety concept of platform delivery
[AUTOSAR II appl overview]
Correctly distinguish the similarities and differences among API, rest API, restful API and web service
The arm core board / development board of Feiling equipped with Ti am62x made its debut in embedded world 2022
递归处理组织的几种情况