INNER CODE UNIT · JavaScript

max

MageStudio/Mage · src/physics/index.js:341

                    max = [Math.max(max[0], x), Math.max(max[1], y), Math.max(max[2], z)];
                }

                // A hull needs at least a tetrahedron; anything less cannot be
                // built and would otherwise degrade silently into a unit box.
                if (points.length < 12) return null;

                return {
                    // Every leaf carries the ELEMENT's uuid, so contact
                    // attribution resolves to the model however it was split.
                    childUuid: uuid,
                    colliderType: COLLIDER_TYPES.MODEL_SHAPE,
                    points,
                    // The measured box still travels with each leaf: it sizes
                    // CCD and drives the childMap region test.
                    width: max[0] - min[0],
                    height: max[1] - min[1],
                    length: max[2] - min[2],

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…