Function addHierarchyInstance
-
Parameters
- pool: HierarchyInstancePool
Pool created by createHierarchyInstancePool.
- matrix: Mat4
World-space transform applied on top of the template hierarchy.
Returns number
- pool: HierarchyInstancePool
Pool created by createHierarchyInstancePool.
World-space transform applied on top of the template hierarchy.
Add one logical hierarchy instance and return its slot index.
The same root matrix is expanded into each descendant mesh's thin-instance buffer so child offsets, rotations, and scales are preserved. It composes with the template hierarchy rather than replacing the root world matrix, so the identity matrix draws the template where it already is.