XAtlasDotNet
XAtlasDotNet copied to clipboard
XAtlas.Run doesn't work
if (input_mesh.PositionsCount != 0)
ObjLoader.SetMeshPositions(0, input_mesh.Positions, input_mesh.PositionsCount);
if (input_mesh.NormalsCount != 0)
ObjLoader.SetMeshNormals(0, input_mesh.Normals, input_mesh.NormalsCount);
if (input_mesh.TexcoordsCount != 0)
ObjLoader.SetMeshIndices(0, input_mesh.Indices, input_mesh.IndicesCount);
Why set indices with detection of texcoords count? if I already have texcoords, why should I use this?
ObjLoader.GetShape(0, out Shape shape);
output_mesh = new MeshDes();
input_mesh.Positions = new float[shape.Mesh.Positions];
ObjLoader.GetMeshPositions(0, input_mesh.Positions, input_mesh.Positions.Length);
input_mesh.Normals = new float[shape.Mesh.Normals];
ObjLoader.GetMeshNormals(0, input_mesh.Normals, input_mesh.Normals.Length);
input_mesh.Texcoords = new float[shape.Mesh.Texcoords];
ObjLoader.GetMeshTexcoords(0, input_mesh.Texcoords, input_mesh.Texcoords.Length);
input_mesh.Indices = new uint[shape.Mesh.Indices];
ObjLoader.GetMeshIndices(0, input_mesh.Indices, input_mesh.Indices.Length);
Why get mesh by this way? Is it generated mesh?