1 /** 2 * Copyright (C) 2009-2012 Klaus Reimer <k@ailis.de> 3 * See LICENSE.txt for licensing information 4 * 5 * @require threedee.js 6 * @use threedee/Vector.js 7 */ 8 9 /** 10 * Constructs a new transformed light 11 * 12 * @param {!threedee.Light} light 13 * The light 14 * @param {!threedee.Matrix} transform 15 * The transformation matrix 16 * 17 * @constructor 18 * @class A transformed light 19 */ 20 threedee.TransformedLight = function(light, transform) 21 { 22 this.light = light; 23 this.position = new threedee.Vector().transform(transform); 24 }; 25 26 /** 27 * The light. 28 * @private 29 * @type {!threedee.Light} 30 */ 31 threedee.TransformedLight.prototype.light; 32 33 /** 34 * The light position. 35 * @private 36 * @type {!threedee.Vector} 37 */ 38 threedee.TransformedLight.prototype.position; 39 40 /** 41 * Returns the light. 42 * 43 * @return {!threedee.Light} light 44 * The light 45 */ 46 threedee.TransformedLight.prototype.getLight = function() 47 { 48 return this.light; 49 }; 50 51 /** 52 * Returns the position 53 * 54 * @return {!threedee.Vector} 55 * The light position 56 */ 57 threedee.TransformedLight.prototype.getPosition = function() 58 { 59 return this.position; 60 }; 61