Skip to main content

Module render3d

Module render3d 

Source
Expand description

Drawing loaded meshes: a camera, a mesh library, and one instanced draw call per mesh.

Re-exports§

pub use crate::sceneobjects::cameras::Camera;
pub use crate::sceneobjects::cameras::OrbitCamera;
pub use crate::sceneobjects::cameras::Ray;

Structs§

MaterialId
A surface registered with the renderer, as MeshId is a mesh.
MeshHandles
Where the meshes loaded from an asset ended up, by node name.
MeshId
A mesh uploaded to the GPU. Cheap to copy; see crate::AppState::mesh.
MeshInstance
The mesh an entity draws, the color to draw it in, and how it takes light.
MeshRenderer
Draws ModelDrawList with one instanced draw call per mesh.
Model
Builder for a model in the world, spawned with crate::AppState::spawn_model.
ModelDrawList
The models to draw this frame, sorted by mesh so each is one instanced draw call.
ModelInstance
One model as the GPU sees it.
Render3dPlugin
Registers the 3D resources and the per-frame draw-list system.
ShadowFit
How the shadow map was fitted around the scene this frame.
Targets
The images a frame is drawn into, shared by every 3D pass.
Transform
Placement of a model in the world: position, orientation, and scale.

Constants§

DEPTH_FORMAT
MAX_MATERIALS
SAMPLES

Functions§

collect_models_system
fit_light
Fits an orthographic light view around min..max, sized to the bounding sphere so it does not change as the light swings.
scene_bounds
The world-space bounds of everything being drawn, or None if nothing is.