SceneKit: 直線と平面の交点

p0dee
Jul 24, 2021

--

あるベクトルが平面と交わる際の、平面上の位置ベクトルを求めたく計算を試みた、、がてんでわからず。検索したら、同様のケースがヒットしたので参考にさせてもらった。

参考: [Unity] 任意の無限遠の平面とベクトルとの交点を求める

こちらはUnityだが、SceneKitでも計算することは同じ。

平面を成す任意の2ベクトルの外積が、平面の法線ベクトルに一致するというのは、勉強になった。

上記実装の内積外積などのoperatorは、ぜの記事を参考。

SCNVector3: ベクトル計算operator

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response