<reponame>OrangeSodahub/RMMDet<filename>src/roslibjs/src/urdf/UrdfLink.js<gh_stars>0/**
 * @fileOverview 
 * @author Benjamin Pitzer - efpyi@example.com
 * @author Russell Toris - upchh@example.com
 */

var UrdfVisual = require('./UrdfVisual');

/**
 * A Link element in a URDF.
 *
 * @constructor
 * @param options - object with following keys:
 *  * xml - the XML element to parse
 */
function UrdfLink(options) {
  this.name = options.xml.getAttribute('name');
  this.visuals = [];
  var visuals = options.xml.getElementsByTagName('visual');

  for( var i=0; i<visuals.length; i++ ) {
    this.visuals.push( new UrdfVisual({
      xml : visuals[i]
    }) );
  }
}

module.exports = UrdfLink;