Initial implementation without using swig

This commit is contained in:
bloeys
2021-11-18 17:58:48 +04:00
parent 6b6255d4a3
commit e7e81afc7c
9 changed files with 61 additions and 30674 deletions

31
main.go
View File

@ -1,28 +1,27 @@
package main
import (
"fmt"
"github.com/bloeys/assimp-go/asig"
)
func main() {
scene := asig.AiImportFile("obj.obj", uint(0))
meshes := scene.MMeshes()
scene := asig.ImportFile("obj.obj", 0)
println(scene)
// 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())
}
// 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 = asig.AiImportFile("obj.fbx", uint(0))
meshes = scene.MMeshes()
// scene = asig.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())
}
// 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())
// }
}