libageo · Punkt · Nachbarschaftsfunktionen |
point | point:: | nearest | (const line&) const | |||
point | point:: | nearest | (const plane&) const | |||
point | point:: | nearest | (const circle&) const | |||
point | point:: | nearest | (const cylinder&) const | |||
point | point:: | nearest | (const sphere&) const | |||
point | nearest | (const point&, const line&) | ||||
point | nearest | (const point&, const plane&) | ||||
point | nearest | (const point&, const circle&) | ||||
point | nearest | (const point&, const cylinder&) | ||||
point | nearest | (const point&, const sphere&) |
Die Methode, respektive Funktion, nearest liefert einen Punkt auf dem angegebenen Geometrieelement, der dem ursprünglichen Punkt am nächsten liegt. Eine aus dem ursprünglichen Punkt und dem gelieferten Nachbarschaftspunkt gebildete Gerade steht lotrecht auf dem Geometrieelement. Der Abstand zum Nachbarschaftspunkt entspricht dem mit distance bzw. sdistance berechneten Abstand. | |
· | Nächstliegender Punkt auf Gerade |
![]() |
|
· | Nächstliegender Punkt auf Ebene |
![]() |
|
· | Nächstliegender Punkt auf Kreis |
![]() |
|
· | Nächstliegender Punkt auf Zylinder |
![]() |
|
· | Nächstliegender Punkt auf Kugel |
![]() |
point p(10,20,30); line ln( point(0,0,0), vector(0.707,0.707,0) ); point q = p.nearest(ln); |
// q=point(15.000,15.000,0.000) |
||
point p(10,20,30); plane pl( point(0,0,0), vector(0,0,-1) ); point q = p.nearest(pl); |
// q=point(10.000,20.000,0.000) |
||
point p(5,5,5); circle cr( point(0,0,0), vector(0,0,1), 10 ); point q = p.nearest(cr); |
// q=point(7.071,7.071,0.000) |
||
point p(5,5,5); cylinder cl( point(0,0,0), vector(0,0,1), 10 ); point q = p.nearest(cl); |
// q=point(7.071,7.071,5.000) |
||
point p(5,5,5); sphere sp( point(0,0,0), 10 ); point q = p.nearest(sp); |
// q=point(5.774,5.774,5.774) |
Abstandsfunktionen, Richtungsfunktionen, alle Methoden und Operatoren, |