- 535 名前:デフォルトの名無しさん [2008/09/02(火) 23:54:16 ]
- 平面と線分との交点を求めるには以下のようにすれば求められるのですが、
平面が有限な場合はどうやって求めればよいのでしょうか? public static bool IntersectSegmentPlane(Vector3 a, Vector3 b, Plane p, ref float t, ref Vector3 q) { Vector3 ab = b - a; t = (p.D - Vector3.Dot(p.Normal, a)) / Vector3.Dot(p.Normal, ab); if (t >= 0.0f && t <= 1.0f) { q = a + t * ab; return true; } return false; }
|

|