2D 引擎的场景图
对于我的实验性 2D 引擎,我希望包含一个场景图实现,以具有良好的性能确定必须渲染哪些对象(对相机可见)。
不幸的是,我不太了解其运作方式的更多细节。据我所知,场景图的核心是基于树的结构,可以用来更好地组织子父关系。
- 当想要确定应在单帧中渲染什么时,应该如何实现 2D 场景图?
For my experimental 2D engine, I want to include a scene graph implementation to, with good performance, determine which objects have to be rendered (are visible for the camera).
Unfortunately, I don't know much about the further details on how that would work. A scene graph, as far as I know, is at its core a tree-based structure which can be used to organize child-parent relationships better.
- How should one implement a 2D scene graph when aiming for the determination of what should be rendered in a single frame?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会推荐四叉树。要确定在帧中渲染什么,您将丢弃视图之外的树的任何分支。
I would recommend a quad tree. To determine what to render in a frame you would discard any branches of the tree which are outside the view.