Skip to content

Commit

Permalink
write handles property writer pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
EliCDavis committed Dec 22, 2024
1 parent deda2f8 commit ef8193e
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions formats/ply/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ func (mw MeshWriter) Write(mesh modeling.Mesh, writer io.Writer) error {
claimedV2[v.ModelAttribute] = true
case Vector1PropertyWriter:
claimedV1[v.ModelAttribute] = true
case *Vector4PropertyWriter:
claimedV4[v.ModelAttribute] = true
case *Vector3PropertyWriter:
claimedV3[v.ModelAttribute] = true
case *Vector2PropertyWriter:
claimedV2[v.ModelAttribute] = true
case *Vector1PropertyWriter:
claimedV1[v.ModelAttribute] = true
default:
panic("what is this type")
}
Expand Down Expand Up @@ -115,19 +123,6 @@ func (mw MeshWriter) Write(mesh modeling.Mesh, writer io.Writer) error {
for _, prop := range writers {
builtWriters = append(builtWriters, prop.build(mesh, mw.Format))
properties = append(properties, prop.Properties()...)

switch v := prop.(type) {
case Vector4PropertyWriter:
claimedV4[v.ModelAttribute] = true
case Vector3PropertyWriter:
claimedV3[v.ModelAttribute] = true
case Vector2PropertyWriter:
claimedV2[v.ModelAttribute] = true
case Vector1PropertyWriter:
claimedV1[v.ModelAttribute] = true
default:
panic("what is this type")
}
}

attributeLength := mesh.AttributeLength()
Expand Down

0 comments on commit ef8193e

Please sign in to comment.