mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-20 11:42:49 +00:00
feat(ugc): one shape per transparent brick, as LU Toolbox leaves them
LU Toolbox's Combine Transparent is off by default, so each transparent brick is its own object and shape (the client can sort them). combine_transparent=1 joins them as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,7 @@ namespace UgcModel {
|
||||
Mesh opaque;
|
||||
Mesh transparent;
|
||||
std::vector<uint32_t> missingDesigns; // designs without geometry in the client, skipped
|
||||
std::vector<size_t> transparentBricks; // where each transparent brick's triangles start in transparent.indices
|
||||
size_t bricks{};
|
||||
|
||||
bool Empty() const { return opaque.Empty() && transparent.Empty(); }
|
||||
@@ -99,6 +100,9 @@ namespace UgcModel {
|
||||
// A client .nif's meshes as one model (vertex colors times material color; transparent when blended)
|
||||
Model FromNif(const NifFile::Model& nif);
|
||||
|
||||
// The mesh cut into pieces at these index offsets (each piece's triangles start at one), e.g. one per brick
|
||||
std::vector<Mesh> SplitAt(const Mesh& mesh, const std::vector<size_t>& starts);
|
||||
|
||||
// Keeps the triangles whose flag is set (and the vertices they use)
|
||||
void KeepTriangles(Mesh& mesh, const std::vector<bool>& keep);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user