MeshPalettizer / src /mesh /context.md
dylanebert's picture
initial commit
346b70f
# Mesh Module
Apply texture atlases to 3D meshes
## Purpose
- Remap mesh UVs to atlas coordinates
- Transform meshes with new textures
## Layout
```
mesh/
β”œβ”€β”€ context.md # This file
β”œβ”€β”€ __init__.py # API: apply_atlas()
└── uvmapper.py # UV remapping logic
```
## Scope
- In-scope: UV remapping, mesh transformation, vertex duplication
- Out-of-scope: Mesh loading, color extraction
## Entrypoints
- `apply_atlas(mesh, atlas, color_to_uv, mapper, face_colors)` - Main application
- `apply_atlas_to_mesh(mesh, atlas, color_to_uv, mapper, face_colors)` - Detailed UV remapping with cached colors
## Dependencies
- Internal: extraction.reader (for get_face_colors)
- External: NumPy, trimesh