scripts/modelCreation.js
/**
 * Display a Collada Model on Google Earth
 * @param {ModelSimulator} simulator The simulator to create a model for
 */
Display a Collada Model on Google Earth
@param {ModelSimulator} simulator The simulator to create a model for
Display a Collada Model on Google Earth @param { ModelSimulator } simulator The simulator to create a model for
function createColladaKmlModel(simulator) {
	simulator.kmzModelPlacemark = simulator.ge.createPlacemark('');
	var model = simulator.ge.createModel('');
	var link = simulator.ge.createLink('');
	link.setHref(simulator.modelURL);
	model.setLink(link);
	simulator.kmzModelPlacemark.setGeometry(model);
	simulator.ge.getFeatures().appendChild(simulator.kmzModelPlacemark);
	setModelScale(model);
	simulationStartingTasks(simulator, model);
}
function createColladaKmlModel ( simulator ) { simulator . kmzModelPlacemark = simulator . ge . createPlacemark ( '' ) ; var model = simulator . ge . createModel ( '' ) ; var link = simulator . ge . createLink ( '' ) ; link . setHref ( simulator . modelURL ) ; model . setLink ( link ) ; simulator . kmzModelPlacemark . setGeometry ( model ) ; simulator . ge . getFeatures ( ) . appendChild ( simulator . kmzModelPlacemark ) ; setModelScale ( model ) ; simulationStartingTasks ( simulator , model ) ; }
Display a Collada Model on Google Earth
 @param {ModelSimulator} simulator The simulator to create a model for
Display a Collada Model on Google Earth @param { ModelSimulator } simulator The simulator to create a model for
//Create a new KmlPlacemark //Create a new KmlModel to store the model in //Create a new KmlLink to associate the model URL with the KmlModel //Associate the URL for the model with the KmlLink //Bind the KmlLink to the KmlModel //Associate the KmlModel with the KmlPlacemark, allowing the model to be placed on Google Earth //Append the KmlPlacemark to Google Earth //Set the scale of the model //Begin the simulation animation