/**
* @fileOverview
* @author Benjamin Pitzer - ben.pitzer@gmail.com
* @author Russell Toris - rctoris@wpi.edu
*/
var Vector3 = require('../math/Vector3');
var UrdfTypes = require('./UrdfTypes');
/**
* A Mesh element in a URDF.
*
* @constructor
* @param options - object with following keys:
* * xml - the XML element to parse
*/
function UrdfMesh(options) {
this.scale = null;
this.type = UrdfTypes.URDF_MESH;
this.filename = options.xml.getAttribute('filename');
// Check for a scale
var scale = options.xml.getAttribute('scale');
if (scale) {
// Get the XYZ
var xyz = scale.split(' ');
this.scale = new Vector3({
x : parseFloat(xyz[0]),
y : parseFloat(xyz[1]),
z : parseFloat(xyz[2])
});
}
}
module.exports = UrdfMesh;