示例#1
0
 public Collision(XElement node)
 {
     Name     = (string)node.Attribute("name");                                               // optional
     Origin   = (node.Element("origin") != null) ? new Origin(node.Element("origin")) : null; // optional
     Geometry = new Geometry(node.Element("geometry"));                                       // required
 }
示例#2
0
 public Inertial(XElement node)
 {
     Origin  = (node.Element("origin") != null) ? new Origin(node.Element("origin")) : null; // optional
     Mass    = (double)node.Element("mass").Attribute("value");                              // required
     Inertia = new Inertia(node.Element("inertia"));                                         // required
 }