function Beam() {

  var model;
  
  var placeMark;
  var lineString;
  var coords;
  
  var targetLat;
  var targetLng;
  var targetAlt;

  var location;  
  var orientation;

  this.addToGE = 
    function(ge, lat, lng, alt) {
     
// create a placemark
      this.placeMark = ge.createPlacemark('');

// create a model and give it the location
      this.model = ge.createModel('');
      this.model.setAltitudeMode(ge.ALTITUDE_RELATIVE_TO_GROUND);

// create and init a location      
      this.loc = ge.createLocation('');
      this.loc.setLatitude(lat);
      this.loc.setLongitude(lng);
      this.loc.setAltitude(alt);
      this.model.setLocation(this.loc);
      
      this.orientation = ge.createOrientation('');
      this.orientation.set(0, 0, 0);
      this.model.setOrientation(this.orientation);
          
      var scale = ge.createScale('');
      scale.set(1,1,10);
      this.model.setScale(scale);
      
// give it the dae file      
      var link = ge.createLink('');
//    link.setHref('http://www.vectorialvancouver.net/models/beam_new_texture.dae');

      link.setHref('http://lozano-hemmer.com/vancouver/models/beam_new_texture.dae');
 
      this.model.setLink(link);
      
// give the model to the placemark
      this.placeMark.setGeometry(this.model);      
      
// add the placemark to google earth      
      ge.getFeatures().appendChild(this.placeMark); 
    };
    
  this.setTarget = 
    function(lat,lng) {

      this.targetLat = lat;
      this.targetLng = lng;
      
      this.coords.setLatLngAlt(1, lat, lng, targetAlt);
    } 
    
  this.setHeadingAndTilt = 
    function(heading,tilt) {
      this.orientation.setHeading(heading);
      this.orientation.setTilt(tilt);
    }  
    
   this.setHeadingAndRoll = 
    function(heading,roll) {
      this.orientation.setHeading(heading);
      this.orientation.setRoll(roll);
    }                  
}

