Skip to main content

Crate he3d_core

Crate he3d_core 

Source
Expand description

HE3D core. HE3D 核心。

Owns the scene graph, resources (meshes, textures, materials), and stable generational IDs. 拥有场景图、资源(网格、纹理、材质)以及稳定的代际 ID。 A Scene owns its resources directly through Arenas; IDs are cheap handles that never dangle. 一个 Scene 直接通过 Arena 拥有其资源;ID 是永不悬垂的廉价句柄。

Everything here is no_std + alloc. The optional std feature only adds convenience impls (e.g. std::error::Error); it never enables std for any dependency by default. 此处所有内容都是 no_std + alloc。可选的 std 特性仅添加便捷实现(例如 std::error::Error);它永远不会默认启用任何依赖的 std。

Structs§

Arena
A generational arena: dense storage with reuse of freed slots and stale-handle detection. 代际 arena:密集存储,支持空闲槽位复用与过期句柄检测。
Camera
A pinhole camera. A plain value type; it is never stored inside a renderer. 针孔相机。一个普通的数值类型;它从不被存放在渲染器内部。
ColorRgba8
A packed 8-bit RGBA color, laid out in RGBA byte order. 一个打包的 8 位 RGBA 颜色,按 RGBA 字节顺序排列。
DirectionalLight
A directional light: a parallel light ray direction plus color/strength. 方向光:一条平行光线方向加上颜色/强度。
Id
A stable generational handle into an Arena<T>. 指向 Arena<T> 的稳定代际句柄。
Material
Per-object shading parameters. 每个对象的着色参数。
Mesh
A triangle mesh owning its vertices, UVs, and per-triangle normals. 一个拥有顶点、UV 和逐三角形法线的三角形网格。
RenderObject
A renderable instance: a mesh, optional texture, transform, and material. 一个可渲染实例:一个网格、可选纹理、变换和材质。
Rgb
A linear-light RGB color with f32 components. 一个使用 f32 分量的线性光 RGB 颜色。
Scene
Owns meshes, textures, render objects, and the scene light. 拥有网格、纹理、渲染对象和场景光。
Texture
A 2D texture owning an RGBA8 pixel buffer, with nearest-neighbor wrap sampling. 一个拥有 RGBA8 像素缓冲的 2D 纹理,支持最近邻环绕采样。
Transform
A world-space placement: position, orientation, and (optionally) scale. 一个世界空间中的放置:位置、朝向和(可选的)缩放。

Enums§

Error
Errors produced by core construction and validation paths. 核心构造与校验路径产生的错误。

Constants§

MAX_VERTEX_COUNT
Maximum number of vertices a mesh may declare. 一个网格可声明的最大顶点数。

Type Aliases§

MeshId
Stable handle to a Mesh. 指向 Mesh 的稳定句柄。
ObjectId
Stable handle to a RenderObject. 指向 RenderObject 的稳定句柄。
TextureId
Stable handle to a Texture. 指向 Texture 的稳定句柄。