All files / engine/Source/Shaders/Builtin/Functions planeDistance.js

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31                                                             
//This file is automatically rebuilt by the Cesium build process.
export default "/**\n\
 * Computes distance from a point to a plane.\n\
 *\n\
 * @name czm_planeDistance\n\
 * @glslFunction\n\
 *\n\
 * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n\
 * param {vec3} point A point in the same space as the plane.\n\
 * returns {float} The distance from the point to the plane.\n\
 */\n\
float czm_planeDistance(vec4 plane, vec3 point) {\n\
    return (dot(plane.xyz, point) + plane.w);\n\
}\n\
\n\
/**\n\
 * Computes distance from a point to a plane.\n\
 *\n\
 * @name czm_planeDistance\n\
 * @glslFunction\n\
 *\n\
 * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n\
 * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n\
 * param {vec3} point A point in the same space as the plane.\n\
 * returns {float} The distance from the point to the plane.\n\
 */\n\
float czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n\
    return (dot(planeNormal, point) + planeDistance);\n\
}\n\
";