static List <Vector3> GetAllVertexs(fbxImporter.UPolygons polygons, fbxImporter.UGeometricTransform geo, out int vertexCount) { List <Vector3> vertexs = new List <Vector3>(); vertexCount = 0; if (polygons.polygon != null && polygons.polygon.Count > 0) { for (int i = 0; i < polygons.polygon.Count; ++i) { for (int j = 0; j < polygons.polygon[i].coordinates.Count; ++j) { Vector3 pos = FbxVector3ToVector3(polygons.polygon[i].coordinates[j]); pos.x *= geo.scaling.x; pos.y *= geo.scaling.y; pos.z *= geo.scaling.z; //pos = pos + Quaternion.Euler(FbxVector3ToVector3(geo.rotation)) * pos; pos += FbxVector3ToVector3(geo.translation); pos.x = -pos.x; vertexs.Add(pos); ++vertexCount; } } } //Debug.Log("GetAllVertexs " + count); return(vertexs); }
static List <Vector3> GetAllNormals(fbxImporter.UPolygons polygons, fbxImporter.UGeometricTransform geo) { List <Vector3> vertexs = new List <Vector3>(); if (polygons.polygon != null && polygons.polygon.Count > 0) { for (int i = 0; i < polygons.polygon.Count; ++i) { for (int j = 0; j < polygons.polygon[i].normal.Count; ++j) { Vector3 pos = FbxVector3ToVector3(polygons.polygon[i].normal[j]); //pos = Quaternion.Euler(FbxVector3ToVector3(geo.rotation)) * pos; pos.x = -pos.x; vertexs.Add(pos.normalized); } } } return(vertexs); }