当前位置:网站首页>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)边栏推荐
- [AUTOSAR II appl overview]
- Telephone network problems
- The arm core board / development board of Feiling equipped with Ti am62x made its debut in embedded world 2022
- [AUTOSAR + IO Architecture]
- 瑞萨RZ/G2L ARM开发板存储读写速度与网络实测
- Esp32 simple speed message test of ros2 (limit frequency)
- Mongodb common commands of mongodb series
- leetcode:871. 最低加油次数【以前pat做过 + 最大堆 +贪心】
- Data analysis, thinking, law breaking and professional knowledge -- analysis method (I)
- Key wizard hit strange learning - automatic path finding back to hit strange points
猜你喜欢

Data analysis, thinking, law breaking and professional knowledge -- analysis method (I)

无向图的割点

Draw love with go+ to express love to her beloved

2022.2.14 resumption

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

数据分析思维分析犯法和业务知识——分析方法(一)
![[shutter] image component (configure local GIF image resources | load placeholder with local resources)](/img/73/19e2e0fc5ea6f05e34584ba40a452d.jpg)
[shutter] image component (configure local GIF image resources | load placeholder with local resources)

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

RISA rz/g2l processor introduction | frame diagram | power consumption | schematic diagram and hardware design guide

1696C. Fishingprince Plays With Array【思维题 + 中间状态 + 优化存储】
随机推荐
按键精灵打怪学习-回城买药加血
KingbaseES ALTER TABLE 中 USING 子句的用法
【FPGA教程案例6】基于vivado核的双口RAM设计与实现
FPGA - 7系列 FPGA内部结构之Clocking -04- 多区域时钟
12_微信小程序之微信视频号滚动自动播放视频效果实现
leetcode:701. 二叉搜索树中的插入操作【bst的插入】
matlab 多普勒效应产生振动信号和处理
[C language] branch and loop statements (Part 1)
18_ The wechat video number of wechat applet scrolls and automatically plays the video effect to achieve 2.0
What is needed to develop a domestic arm intelligent edge computing gateway
kivy教程之在 Kivy App 中使用 matplotlib 的示例
Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
[case sharing] let the development of education in the new era advance with "number"
ROS2之ESP32简单速度消息测试(极限频率)
合并K个已排序的链表
数学建模之线性规划(含MATLAB代码)
按键精灵打怪学习-自动寻路回打怪点
[AUTOSAR twelve mode management]
【FPGA教程案例5】基于vivado核的ROM设计与实现
Kivy教程大全之 创建您的第一个kivy程序 hello word(教程含源码)