<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Collision</id>
	<title>Collision - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Collision"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Collision&amp;action=history"/>
	<updated>2026-04-22T00:28:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=Collision&amp;diff=39&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;{{:CollisionExampleCode}}  ==Static functions== {| class=&quot;wikitable&quot; !|return !|function !|description |- |bool, Vec2 |lineSegmentLineSegmentIntersection(Line2D line1, Line2D line2) |Return true if the two segmented line intersect each other. if return true second output is the intersection position. |- |float |linePointLength2(L...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Collision&amp;diff=39&amp;oldid=prev"/>
		<updated>2025-07-05T13:36:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{:CollisionExampleCode}}  ==Static functions== {| class=&amp;quot;wikitable&amp;quot; !|return !|function !|description |- |bool, &lt;a href=&quot;/index.php/Vec2&quot; title=&quot;Vec2&quot;&gt;Vec2&lt;/a&gt; |&lt;a href=&quot;/index.php?title=Collision:lineSegmentLineSegmentIntersection(Line2D_line1,_Line2D_line2)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Collision:lineSegmentLineSegmentIntersection(Line2D line1, Line2D line2) (page does not exist)&quot;&gt;lineSegmentLineSegmentIntersection&lt;/a&gt;(&lt;a href=&quot;/index.php/Line2D&quot; title=&quot;Line2D&quot;&gt;Line2D&lt;/a&gt; line1, &lt;a href=&quot;/index.php/Line2D&quot; title=&quot;Line2D&quot;&gt;Line2D&lt;/a&gt; line2) |Return true if the two segmented line intersect each other. if return true second output is the intersection position. |- |float |&lt;a href=&quot;/index.php?title=Collision:linePointLength2(Lin3D_line,_Vec3_point)&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Collision:linePointLength2(Lin3D line, Vec3 point) (page does not exist)&quot;&gt;linePointLength2&lt;/a&gt;(L...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{:CollisionExampleCode}}&lt;br /&gt;
&lt;br /&gt;
==Static functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|bool, [[Vec2]]&lt;br /&gt;
|[[Collision:lineSegmentLineSegmentIntersection(Line2D line1, Line2D line2)|lineSegmentLineSegmentIntersection]]([[Line2D]] line1, [[Line2D]] line2)&lt;br /&gt;
|Return true if the two segmented line intersect each other. if return true second output is the intersection position.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Collision:linePointLength2(Lin3D line, Vec3 point)|linePointLength2]](Lin3D line, [[Vec3]] point)&lt;br /&gt;
|returs the shortest distance from point to the line&lt;br /&gt;
|-&lt;br /&gt;
|bool, [[Vec3]], [[Vec3]]&lt;br /&gt;
|[[Collision:intersect_RayTriangle(Ray aRay, Vec3 t1, Vec3 t2, Vec3 t3)|intersect_RayTriangle]](Ray aRay, [[Vec3]] t1, [[Vec3]] t2, [[Vec3]] t3)&lt;br /&gt;
|Return true if the Ray intersect the triangle. second return is the collisionPosition and the third return is the collisionPosNormal.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Collision:lineSegmentPointLength2(Line2D line, Vec2 point)|lineSegmentPointLength2]]([[Line2D]] line, [[Vec2]] point)&lt;br /&gt;
|Return The minimum distance between the segmented line and the point.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Collision:lineSegmentPointLength2(Line3D line, Vec3 point)|lineSegmentPointLength2]]([[Line3D]] line, [[Vec3]] point)&lt;br /&gt;
|Return The minimum distance between the segmented line and the point.&lt;br /&gt;
|-&lt;br /&gt;
|float, [[Vec2]], [[Vec2]]&lt;br /&gt;
|[[Collision:lineSegmentLineSegmentLength2(Line2D line1, Line2D line2)|lineSegmentLineSegmentLength2]]([[Line2D]] line1, [[Line2D]] line2)&lt;br /&gt;
|Return The minimum distance between the two segmented lines. second out parameter is collision position on line1, third return is collision position on line2&lt;br /&gt;
|-&lt;br /&gt;
|float, [[Vec3]], [[Vec3]]&lt;br /&gt;
|[[Collision:lineSegmentLineSegmentLength2(Line3D line1, Line3D line2)|lineSegmentLineSegmentLength2]]([[Line3D]] line1, [[Line3D]] line2)&lt;br /&gt;
|Return The minimum distance between the two segmented lines. second out parameter is collision position on line1, third return is collision position on line2&lt;br /&gt;
|-&lt;br /&gt;
|bool, [[Vec2]], [[Vec2]]&lt;br /&gt;
|[[Collision:lineSegmentCircleIntersection(Line2D line, Sphere aCircle, Vec2 outCollisionPos)|lineSegmentCircleIntersection]]([[Line2D]] line, [[Sphere]] aCircle)&lt;br /&gt;
|Return true if the line intersect the circle. When return true  the two collision point on the circle is returned.&lt;br /&gt;
|-&lt;br /&gt;
|bool, [[Vec3]]&lt;br /&gt;
|[[Collision:lineSegmentSphereIntersection(Line3D line, Sphere aCircle)|lineSegmentSphereIntersection]]([[Line3D]] line, [[Sphere]] aCircle)&lt;br /&gt;
|Return true if the line intersect the sphere, second return value is the first intersection position if the function return true. outCollisionPos is the collision point on the sphere&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Collision:lineSegmentTriangleIntersection(Line3D line, Vec3 v1, Vec3 v2, Vec3 v3)|lineSegmentTriangleIntersection]]([[Line3D]] line, [[Vec3]] v1, [[Vec3]] v2, [[Vec3]] v3)&lt;br /&gt;
|Return true if the line intersect the triangle.&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Collision:lineSegmentPlaneIntersection(Vec3 outCollisionPos, Line3D line, Vec3 planeNormal, Vec3 pointInPlane)|lineSegmentPlaneIntersection]]([[Vec3]] outCollisionPos, [[Line3D]] line, [[Vec3]] planeNormal, [[Vec3]] pointInPlane)&lt;br /&gt;
|Return true if the line intersect the plane.&lt;br /&gt;
|-&lt;br /&gt;
|bool, [[Vec3]]&lt;br /&gt;
|[[Collision:line3DSegmentBoxIntersection(Line3D line, Box box)|line3DSegmentBoxIntersection]]([[Line3D]] line, [[Box]] box)&lt;br /&gt;
|Return true if the line intersect the box. if returned true the second return variable is the intersection position on the box&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>