All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codeandweb.physicseditor.BodyDefNode Maven / Gradle / Ivy

package com.codeandweb.physicseditor;

import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.XmlReader;

class BodyDefNode {

  final ObjectMap bodies;
  final MetadataNode metadata;


  BodyDefNode(XmlReader.Element data) {
    // load  elements
    Array bodyElements = data.getChildrenByName("body");
    bodies = new ObjectMap(bodyElements.size * 2);
    for (XmlReader.Element elem : bodyElements) {
      BodyNode body = new BodyNode(elem);
      bodies.put(body.name, body);
    }
    // load 
    metadata = new MetadataNode(data.getChildByName("metadata"));
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy