|
|
@ -2,15 +2,11 @@ |
|
|
|
|
|
|
|
int main() { |
|
|
|
|
|
|
|
GLine l(GPoint3(0.0f, 0.0f, 0.0f), GVector3(1.0f, 0.0f, 0.0f)); |
|
|
|
GPoint3 q(0.0f, 0.0f, 1.0f); |
|
|
|
GPlane PI1(GVector3(0.0f, 0.0f, 1.0f), GPoint3(0.0f, 0.0f, 0.0f)); |
|
|
|
GPlane PI2(GPoint3(1.0,0.0f,0.0f), GPoint3(0.0, 1.0f, 0.0f), GPoint3(0.0, 0.0f, 1.0f)); |
|
|
|
|
|
|
|
float d = dist(q, l); |
|
|
|
GPlane PI = PI1; |
|
|
|
cout << PI.GetNormal() << endl; |
|
|
|
|
|
|
|
cout << d << endl; |
|
|
|
|
|
|
|
bool b = l.IsOnLine(GPoint3(0.0f, 0.0f, 0.0f)); |
|
|
|
bool b2 = l.IsOnLine(GPoint3(0.5f, 0.0f, 0.0f)); |
|
|
|
bool b3 = l.IsOnLine(GPoint3(0.5f, 0.5f, 0.0f)); |
|
|
|
return 0; |
|
|
|
} |