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

/**
 * A Color element in a URDF.
 *
 * @constructor
 * @param options - object with following keys:
 *  * xml - the XML element to parse
 */
function UrdfColor(options) {
  // Parse the xml string
  var rgba = options.xml.getAttribute('rgba').split(' ');
  this.r = parseFloat(rgba[0]);
  this.g = parseFloat(rgba[1]);
  this.b = parseFloat(rgba[2]);
  this.a = parseFloat(rgba[3]);
}

module.exports = UrdfColor;