Esempio n. 1
0
 public static void CollectInstances(Assimp.Node node, Matrix4x4 transform, List <VimInstanceData> r)
 {
     transform *= ToMath3d(node.Transform);
     foreach (var i in node.MeshIndices)
     {
         var inst = new VimInstanceData {
             WorldTransform = transform,
             MeshIndex      = i
         };
         r.Add(inst);
     }
     foreach (var c in node.Children)
     {
         CollectInstances(c, transform, r);
     }
 }
Esempio n. 2
0
 public static void CollectInstances(Va3cObject obj, Dictionary <string, int> geoLookup, Matrix4x4 transform, List <VimInstanceData> r)
 {
     transform *= ToMath3d(obj.matrix);
     if (geoLookup.ContainsKey(obj.geometry))
     {
         var inst = new VimInstanceData
         {
             WorldTransform = transform,
             MeshIndex      = geoLookup[obj.geometry]
         };
         r.Add(inst);
     }
     foreach (var c in obj.children)
     {
         CollectInstances(c, geoLookup, transform, r);
     }
 }