Esempio n. 1
0
 public Node(Int16 x, Int16 y, Int16 z, Int16 localid, Node mother, Int32 colour = -2180985)
 {
     this.x = x;
     this.y = y;
     this.z = z;
     this.mother = mother;
     this.localid = localid;
     this.speed = 0;
     this.colour = colour;
 }
Esempio n. 2
0
 private void Traverse(Node node, int depth)
 {
     if (depth == max_depth) return;
     this.vertices[counter].position.X = node.mother.x * this.scale;
     this.vertices[counter].position.Y = node.mother.y * this.scale;
     this.vertices[counter].position.Z = node.mother.z * this.scale;
     this.vertices[counter].color = trav_color;
     counter++;
     this.vertices[counter].position.X = node.x * this.scale;
     this.vertices[counter].position.Y = node.y * this.scale;
     this.vertices[counter].position.Z = node.z * this.scale;
     this.vertices[counter].color = trav_color;
     counter++;
     if (node.daughter == null)
     {
         return;
     }
     else
     {
         foreach (Node tmp in node.daughter)
         {
             Traverse(tmp, depth + 1);
         }
     }
 }