MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / set_geometry

Function set_geometry

native/watchos/src/scene.rs:276–286  ·  view source on GitHub ↗

TS → native FFI layout: 12 f64s per vertex — xyz, nx ny nz, rgba, uv. Color is ignored (material color wins via bloom_scene_set_material_color). Directly install pre-decoded geometry (from a loaded model) into a scene node, bypassing the 12-f64-per-vertex TS FFI layout.

(handle: u32,
    positions: Vec<f32>, normals: Vec<f32>, uvs: Vec<f32>, indices: Vec<u32>,
)

Source from the content-addressed store, hash-verified

274/// Directly install pre-decoded geometry (from a loaded model) into a scene
275/// node, bypassing the 12-f64-per-vertex TS FFI layout.
276pub fn set_geometry(handle: u32,
277 positions: Vec<f32>, normals: Vec<f32>, uvs: Vec<f32>, indices: Vec<u32>,
278) {
279 mark_dirty(handle, DIRTY_GEOMETRY, |n| {
280 n.positions = positions;
281 n.normals = normals;
282 n.uvs = uvs;
283 n.indices = indices;
284 n.geometry_version = n.geometry_version.wrapping_add(1);
285 });
286}
287
288pub fn update_geometry_f64(handle: u32, verts: &[f64], indices: &[f64]) {
289 mark_dirty(handle, DIRTY_GEOMETRY, |n| {

Callers 1

apply_primitiveFunction · 0.85

Calls 1

mark_dirtyFunction · 0.85

Tested by

no test coverage detected