|
@ -2,15 +2,15 @@ |
|
|
|
|
|
|
|
|
int main() { |
|
|
int main() { |
|
|
|
|
|
|
|
|
GLine l(GPoint3(0.0f, 0.0f, 0.0f), GVector3(1.0, 0.0f, 0.0f)); |
|
|
|
|
|
|
|
|
|
|
|
GPoint3 p = l(2.0f); |
|
|
|
|
|
|
|
|
GLine l(GPoint3(0.0f, 0.0f, 0.0f), GVector3(1.0f, 0.0f, 0.0f)); |
|
|
|
|
|
GPoint3 q(0.0f, 0.0f, 1.0f); |
|
|
|
|
|
|
|
|
l.SetPt(GPoint3(0.0f, 0.0f, 1.0f)); |
|
|
|
|
|
l.SetDir(GVector3(1.0f, 0.0f, 0.0f)); |
|
|
|
|
|
|
|
|
float d = dist(q, l); |
|
|
|
|
|
|
|
|
GPoint3 q = l(1.0f); |
|
|
|
|
|
|
|
|
cout << d << endl; |
|
|
|
|
|
|
|
|
cout << q << 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; |
|
|
return 0; |
|
|
} |
|
|
} |