hoppla. Meinte z.B. einen Cone. Sonst wär's ja einfach
.
Im Moment mache ich es so:
Point A,B; Dir. Vector AB
1.) Rotation für jede Achse berechnen:
rot_x = acos(dotProduct(AB,Vector(1,0,0)))
rot_y = acos(dotProduct(AB,Vector(0,1,0)))
rot_z = acos(dotProduct(AB,Vector(0,0,1)))
2.) Rotatieren
3.) z.B. nach A translatieren.
Das funktioniert nur leider nicht immer, da das Dotproduct nur einen Winkel zw. 0-180° ausgibt.