Sha256: 15cb4d039e56f2e0c094b7512a0387fc6d449a7c8b6f5f7a4443ad0a1877882a
Contents?: true
Size: 1.87 KB
Versions: 3
Compression:
Stored size: 1.87 KB
Contents
o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1381798603.8001301:@value"{I" class:ETI"BundledAsset;FI"logical_path;TI" Core/pointInsideTriangle.js;TI" pathname;TI"Y/Users/bogumil/www/engines/cesium/app/assets/javascripts/Core/pointInsideTriangle.js;FI"content_type;TI"application/javascript;TI" mtime;TI"2013-10-15T02:54:58+02:00;TI"length;TiI"digest;TI"%43469adcbdfb4437150d37f9ab3eb106;FI"source;TI"/*global define*/ define(['Core/barycentricCoordinates', 'Core/Cartesian3', 'Core/DeveloperError'], function( barycentricCoordinates, Cartesian3, DeveloperError) { "use strict"; var coords = new Cartesian3(); /** * Determines if a point is inside a triangle. * * @exports pointInsideTriangle * * @param {Cartesian2|Cartesian3} point The point to test. * @param {Cartesian2|Cartesian3} p0 The first point of the triangle. * @param {Cartesian2|Cartesian3} p1 The second point of the triangle. * @param {Cartesian2|Cartesian3} p2 The third point of the triangle. * * @returns {Boolean} <code>true</code> if the point is inside the triangle; otherwise, <code>false</code>. * * @exception {DeveloperError} point, p0, p1, and p2 are required. * * @example * // Returns true * var p = new Cartesian2(0.25, 0.25); * var b = pointInsideTriangle(p, * new Cartesian2(0.0, 0.0), * new Cartesian2(1.0, 0.0), * new Cartesian2(0.0, 1.0)); */ var pointInsideTriangle = function(point, p0, p1, p2) { barycentricCoordinates(point, p0, p1, p2, coords); return (coords.x > 0.0) && (coords.y > 0.0) && (coords.z > 0); }; return pointInsideTriangle; }); ;TI"required_assets_digest;TI"%12884fa5b14c2c80c64b56046193e4b2;FI" _version;TI"%6776f581a4329e299531e1d52aa59832;F
Version data entries
3 entries across 3 versions & 1 rubygems