1 /** 2 * Copyright (C) 2009-2012 Klaus Reimer <k@ailis.de> 3 * See LICENSE.txt for licensing information 4 * 5 * @require threedee.js 6 */ 7 8 /** 9 * Constructs a new plane. 10 * 11 * @param {!threedee.Vector} normal 12 * The plane normal. 13 * @param {number} distance 14 * The plane distance. 15 * @constructor 16 * @class 17 * A plane is an infinite two-dimensional object in space. It is defined by 18 * a normal vector and a distance. If is used to specify the clipping planes 19 * in the view frustum. 20 */ 21 threedee.Plane = function(normal, distance) 22 { 23 this.normal = normal; 24 this.distance = distance; 25 }; 26 27 /** 28 * The plane normal. 29 * @private 30 * @type {!threedee.Vector} 31 */ 32 threedee.Plane.prototype.normal; 33 34 /** 35 * The plane distance. 36 * @private 37 * @type {number} 38 */ 39 threedee.Plane.prototype.distance; 40 41 /** 42 * Returns the plane normal. 43 * 44 * @return {!threedee.Vector} 45 * The plane normal 46 */ 47 threedee.Plane.prototype.getNormal = function() 48 { 49 return this.normal; 50 }; 51 52 /** 53 * Returns the plane distance 54 * 55 * @return {number} 56 * The plane distance 57 */ 58 threedee.Plane.prototype.getDistance = function() 59 { 60 return this.distance; 61 }; 62