나는 4 점을 가지고 있는데 그 중 3 점은 V 또는 < 또는>와 같은 두 줄을 만들고 아이디어를 얻는다. 이제 그 원뿔에있는 점을 얻는다. V) 그리고 맨 위 왼쪽 하단, 그리고 오른쪽 하단까지 dist를 얻을 수 있습니다.두 줄 사이에 한 점의 거리를 얻는다
아마도 도움이 될 것입니다.
그리고 나는이 문제와 함께 갈 코드가 있습니다
public float GetDist(Vector3f one, Vector3f two, Vector3f three, Vector3f p){
Vector3f one_to_point = new Vector3f(0,0,0);
Vector3f.sub(p,one,one_to_point); //Storing vector A->P
Vector3f one_to_two = new Vector3f(0,0,0);
Vector3f.sub(two, one, one_to_two); //Storing vector A->B
Vector3f one_to_three = new Vector3f(0,0,0);
Vector3f.sub(three, one, one_to_three); //Storing vector A->C
float q1 = Vector3f.dot(one_to_point, one_to_two)/one_to_two.lengthSquared(); // The normalized "distance" from a to b
float q2 = Vector3f.dot(one_to_point, one_to_three)/one_to_three.lengthSquared(); // The normalized "distance" from a to c
가 지금은 이미 POS 벡터 콘에 있음을 알고를, 그래서 같이 내가 POS를 얻으려면 어떻게해야합니까 이미지에서 녹색 원의 위치로?
에 B와에 대한 사이 // 각도인가? –
B와 C의 끝 부분에 있지만 B에서 C까지의 길이가 다릅니다. – CyanPrime