Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/math_geom.c
| Context not available. | |||||
| * | * | ||||
| * \param axis_ref used when v1,v2,v3 form a line and to check if the corner is concave/convex. | * \param axis_ref used when v1,v2,v3 form a line and to check if the corner is concave/convex. | ||||
| * | * | ||||
| * \note the distance from \a v1 & \a v3 to \a v2 doesnt matter | * \note the distance from \a v1 & \a v3 to \a v2 doesn't matter | ||||
| * (it just defines the planes). | * (it just defines the planes). | ||||
| * | * | ||||
| * \return the lowest squared distance to either of the planes. | * \return the lowest squared distance to either of the planes. | ||||
| Context not available. | |||||
| } | } | ||||
| /*---test edges---*/ | /*---test edges---*/ | ||||
| sub_v3_v3v3(e3, v2, v1); /* wasnt yet calculated */ | sub_v3_v3v3(e3, v2, v1); /* wasn't yet calculated */ | ||||
| /*e1*/ | /*e1*/ | ||||
| Context not available. | |||||
| mul_v3_fl(a, dot_v3v3(cb, ab) / dot_v3v3(ab, ab)); | mul_v3_fl(a, dot_v3v3(cb, ab) / dot_v3v3(ab, ab)); | ||||
| add_v3_v3v3(r_i1, v1, a); | add_v3_v3v3(r_i1, v1, a); | ||||
| /* for the second line, just substract the offset from the first intersection point */ | /* for the second line, just subtract the offset from the first intersection point */ | ||||
| sub_v3_v3v3(r_i2, r_i1, t); | sub_v3_v3v3(r_i2, r_i1, t); | ||||
| return 2; /* two nearest points */ | return 2; /* two nearest points */ | ||||
| Context not available. | |||||