mirror of
https://github.com/bloeys/assimp-go.git
synced 2025-12-29 08:28:20 +00:00
29 lines
574 B
Go
Executable File
29 lines
574 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/bloeys/assimp-go/aig"
|
|
)
|
|
|
|
func main() {
|
|
|
|
scene := aig.AiImportFile("obj.obj", uint(0))
|
|
meshes := scene.MMeshes()
|
|
|
|
verts := meshes.Get(0).MVertices()
|
|
for i := 0; i < int(verts.Size()); i++ {
|
|
v := verts.Get(i)
|
|
fmt.Printf("V%v: (%v, %v, %v)\n", i, v.GetX(), v.GetY(), v.GetZ())
|
|
}
|
|
|
|
scene = aig.AiImportFile("obj.fbx", uint(0))
|
|
meshes = scene.MMeshes()
|
|
|
|
verts = meshes.Get(0).MVertices()
|
|
for i := 0; i < int(verts.Size()); i++ {
|
|
v := verts.Get(i)
|
|
fmt.Printf("V%v: (%v, %v, %v)\n", i, v.GetX(), v.GetY(), v.GetZ())
|
|
}
|
|
}
|