Sha256: c0219072b6fb0959bffa0c0728f2b539bdeceaf7bc84275033db692150385fc3

Contents?: true

Size: 1.87 KB

Versions: 3

Compression:

Stored size: 1.87 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1380709792.623189:@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-02T12:16:28+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

Version Path
cesium-0.24.1 test/dummy/tmp/cache/assets/D03/290/sprockets%2F2721f08b1d68fe8614cb5181bd500ac7
cesium-0.21.1 test/dummy/tmp/cache/assets/D03/290/sprockets%2F2721f08b1d68fe8614cb5181bd500ac7
cesium-0.21 test/dummy/tmp/cache/assets/D03/290/sprockets%2F2721f08b1d68fe8614cb5181bd500ac7