MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / plane_from_points

Function plane_from_points

StereoKitC/sk_math.cpp:484–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482///////////////////////////////////////////
483
484plane_t plane_from_points(vec3 p1, vec3 p2, vec3 p3) {
485 vec3 dir1 = p2 - p1;
486 vec3 dir2 = p2 - p3;
487 vec3 normal = vec3_cross(dir1, dir2);
488 return { normal, -vec3_dot(p2, normal) };
489}
490
491///////////////////////////////////////////
492

Callers 1

tex_gen_cubemap_shFunction · 0.85

Calls 2

vec3_crossFunction · 0.85
vec3_dotFunction · 0.85

Tested by

no test coverage detected