hash by rbx_mesh VertexId2
This commit is contained in:
parent
9b131ee857
commit
1b196dc831
@ -21,7 +21,7 @@ fn ingest_vertices2<
|
||||
mut acquire_normal_id:AcquireNormalId,
|
||||
mut acquire_color_id:AcquireColorId,
|
||||
mut acquire_vertex_id:AcquireVertexId,
|
||||
)->Result<HashMap<VertexId,VertexId>,Error>
|
||||
)->Result<HashMap<rbx_mesh::mesh::VertexId2,VertexId>,Error>
|
||||
where
|
||||
AcquirePosId:FnMut([f32;3])->Result<PositionId,Error>,
|
||||
AcquireTexId:FnMut([f32;2])->TextureCoordinateId,
|
||||
@ -32,7 +32,7 @@ where
|
||||
//this monster is collecting a map of old_vertices_index -> unique_vertices_index
|
||||
//while also doing the inserting unique entries into lists simultaneously
|
||||
Ok(vertices.into_iter().enumerate().map(|(vertex_id,vertex)|Ok((
|
||||
VertexId::new(vertex_id as u32),
|
||||
rbx_mesh::mesh::VertexId2(vertex_id as u32),
|
||||
acquire_vertex_id(IndexedVertex{
|
||||
pos:acquire_pos_id(vertex.pos)?,
|
||||
tex:acquire_tex_id(vertex.tex),
|
||||
@ -53,7 +53,7 @@ fn ingest_vertices_truncated2<
|
||||
mut acquire_normal_id:AcquireNormalId,
|
||||
static_color_id:ColorId,//pick one color and fill everything with it
|
||||
mut acquire_vertex_id:AcquireVertexId,
|
||||
)->Result<HashMap<VertexId,VertexId>,Error>
|
||||
)->Result<HashMap<rbx_mesh::mesh::VertexId2,VertexId>,Error>
|
||||
where
|
||||
AcquirePosId:FnMut([f32;3])->Result<PositionId,Error>,
|
||||
AcquireTexId:FnMut([f32;2])->TextureCoordinateId,
|
||||
@ -63,7 +63,7 @@ where
|
||||
//this monster is collecting a map of old_vertices_index -> unique_vertices_index
|
||||
//while also doing the inserting unique entries into lists simultaneously
|
||||
Ok(vertices.into_iter().enumerate().map(|(vertex_id,vertex)|Ok((
|
||||
VertexId::new(vertex_id as u32),
|
||||
rbx_mesh::mesh::VertexId2(vertex_id as u32),
|
||||
acquire_vertex_id(IndexedVertex{
|
||||
pos:acquire_pos_id(vertex.pos)?,
|
||||
tex:acquire_tex_id(vertex.tex),
|
||||
|
Loading…
Reference in New Issue
Block a user