egret-docs-master/Engine3D/Egret3DDisp/3DBaseConcept/README.md

13 lines
1021 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

如果你熟悉Egret 2D那么你应该对DisplayObject非常的熟悉在Egret 2D中所有的显示对象均继承自DisplayObject。Egret 3D引擎中也包含显示对象的概念但于2D有很大的不同。本小节针对3D中的显示对象做整体讲解。
Egret 3D中所有能够被用户看到的物体被称之为**显示对象**。在引擎内部,显示对象可被添加到渲染队列当中,通过一系列操作,讲你的显示对象渲染到场景当中。
Egret 3D包含多种显示对象你可以根据自己的需要来选择不同的类型。但所有的显示对象均继承自`Object3D`类。`Object3D`类会在下一节中进行详细讲解。
`Object3D`也实现其`egret3d.IRender`,该接口定义场景中的可见物体,可渲染的对象。在渲染之前会将渲染树中对象进行筛选.只有IRender对象才会进入渲染管线。
在制作游戏时,我们通常会使用`Mesh`来渲染物体,同时使用`Object3D`来作为可视化物体的容器。