简体   繁体   中英

Tango / Unity: is Tango3DRExtractWholeMesh() not actually implemented yet?

Playing with TangoDynamicMesh.cs and I'm looking for a more efficient way to get a single mesh out of the SDK. I can walk through the children and grab data out of each of their MeshFilter components but I was hoping that the Tango3DRExtractWholeMesh() function might be a better way to grab a snapshot of the current DynamicMesh. However, the docs on this one are pretty slim, does anyone know how to call this function properly? Or is this a case of a yet-to-be-implemented feature?

Yes you call it like:

private TangoApplication m_tangoApplication;
Tango3DReconstruction.Status status =
                m_tangoApplication.Tango3DRExtractWholeMesh(vertices, normals, colors, triangles, out numV, out numT);

But first you must have initiated the vec3[] vertices, vec3[] normals int[] triangles, Color32[] colors and int numV, numT

I have no idea how you are supposed to know which size they are to be... and sometimes the number of triangles you get back (numT) isnt divisible by 3 which means you cannot use that data to create mesh in unity if you would want that... So I guess the function is not correct or that I am missing something...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM