| 1 | 
 using System; | 
 
 
 
 
 
 | 2 | 
 using System.Collections.Generic; | 
 
 
 
 
 
 | 3 | 
  | 
 
 
 
 
 
 | 4 | 
 namespace Oni.Dae | 
 
 
 
 
 
 | 5 | 
 { | 
 
 
 
 
 
 | 6 | 
     internal class Node : Entity | 
 
 
 
 
 
 | 7 | 
     { | 
 
 
 
 
 
 | 8 | 
         private TransformCollection transforms; | 
 
 
 
 
 
 | 9 | 
         private List<Instance> instances; | 
 
 
 
 
 
 | 10 | 
         private List<Node> nodes; | 
 
 
 
 
 
 | 11 | 
  | 
 
 
 
 
 
 | 12 | 
         public TransformCollection Transforms | 
 
 
 
 
 
 | 13 | 
         { | 
 
 
 
 
 
 | 14 | 
             get | 
 
 
 
 
 
 | 15 | 
             { | 
 
 
 
 
 
 | 16 | 
                 if (transforms == null) | 
 
 
 
 
 
 | 17 | 
                     transforms = new TransformCollection(); | 
 
 
 
 
 
 | 18 | 
  | 
 
 
 
 
 
 | 19 | 
                 return transforms; | 
 
 
 
 
 
 | 20 | 
             } | 
 
 
 
 
 
 | 21 | 
         } | 
 
 
 
 
 
 | 22 | 
  | 
 
 
 
 
 
 | 23 | 
         public List<Instance> Instances | 
 
 
 
 
 
 | 24 | 
         { | 
 
 
 
 
 
 | 25 | 
             get | 
 
 
 
 
 
 | 26 | 
             { | 
 
 
 
 
 
 | 27 | 
                 if (instances == null) | 
 
 
 
 
 
 | 28 | 
                     instances = new List<Instance>(); | 
 
 
 
 
 
 | 29 | 
  | 
 
 
 
 
 
 | 30 | 
                 return instances; | 
 
 
 
 
 
 | 31 | 
             } | 
 
 
 
 
 
 | 32 | 
         } | 
 
 
 
 
 
 | 33 | 
  | 
 
 
 
 
 
 | 34 | 
         public IEnumerable<GeometryInstance> GeometryInstances | 
 
 
 
 
 
 | 35 | 
         { | 
 
 
 
 
 
 | 36 | 
             get | 
 
 
 
 
 
 | 37 | 
             { | 
 
 
 
 
 
 | 38 | 
                 if (instances == null) | 
 
 
 
 
 
 | 39 | 
                     return new GeometryInstance[0]; | 
 
 
 
 
 
 | 40 | 
  | 
 
 
 
 
 
 | 41 | 
                 return instances.OfType<GeometryInstance>(); | 
 
 
 
 
 
 | 42 | 
             } | 
 
 
 
 
 
 | 43 | 
         } | 
 
 
 
 
 
 | 44 | 
  | 
 
 
 
 
 
 | 45 | 
         public List<Node> Nodes | 
 
 
 
 
 
 | 46 | 
         { | 
 
 
 
 
 
 | 47 | 
             get | 
 
 
 
 
 
 | 48 | 
             { | 
 
 
 
 
 
 | 49 | 
                 if (nodes == null) | 
 
 
 
 
 
 | 50 | 
                     nodes = new List<Node>(); | 
 
 
 
 
 
 | 51 | 
  | 
 
 
 
 
 
 | 52 | 
                 return nodes; | 
 
 
 
 
 
 | 53 | 
             } | 
 
 
 
 
 
 | 54 | 
         } | 
 
 
 
 
 
 | 55 | 
     } | 
 
 
 
 
 
 | 56 | 
 } |