src/geometry.h

changeset 64
f99d52b1646b
parent 58
b7841cd31fb7
child 71
198d25fe4e21
equal deleted inserted replaced
63:f7dd937667a5 64:f99d52b1646b
28 using Triangle = Polygon<3>; 28 using Triangle = Polygon<3>;
29 29
30 Line lineFromPoints(const glm::vec3& point_1, const glm::vec3 point_2); 30 Line lineFromPoints(const glm::vec3& point_1, const glm::vec3 point_2);
31 Plane planeFromTriangle(const Triangle& triangle); 31 Plane planeFromTriangle(const Triangle& triangle);
32 glm::vec3 normalVector(const Triangle& triangle); 32 glm::vec3 normalVector(const Triangle& triangle);
33 std::optional<glm::vec3> linePlaneIntersection(const Line& line, const Plane& plane, const float epsilon = 1e-6); 33 std::optional<glm::vec3> linePlaneIntersection(const Line& line, const Plane& plane, const float epsilon = 1e-6f);
34 glm::vec3 scalingVector(const glm::mat4 matrix);
35 struct ScalingExtract
36 {
37 glm::vec3 scaling;
38 glm::mat4 unscaled;
39 };
40 ScalingExtract extractScaling(const glm::mat4& matrix);
34 } 41 }

mercurial