|
From: Keith W. <kw...@cs...> - 2005-02-24 22:08:18
|
Works beautifully. Thanks. I guess I should have been able to find that on my own. Sorry, but thanks. On Wed, 23 Feb 2005, James W. Walker wrote: > On Feb 23, 2005, at 11:02 PM, Keith Wiley wrote: > >> I have an object that has not been rotated at all yet, so its starting >> quaternion Q is (1,0,0,0). I have a vector V (x,y,z) that specifies a 3D >> pointing or facing direction. I would like to take the object's facing >> direction, which starts out (0,0,1), straight down the z axis, and orient >> it such that it faces in the same direction as the vector V. I realize >> this doesn't entirely specify an orientation since there is still the >> question of how the object is "rolled" around the facing vector, but I am >> not concerned with that right now. For this specific application it >> doesn't even matter because the object in question is perfectly >> cylindrical around the z axis so rolling doesn't mean anything. I just >> want to make it point in the direction of the vector V. >> >> How do I do this? Any ideas? > > How about using Q3Quaternion_SetRotateVectorToVector? > -- > <http://www.jwwalker.com/> > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Quesa-develop mailing list > Que...@li... > https://lists.sourceforge.net/lists/listinfo/quesa-develop > ________________________________________________________________________ Keith Wiley kw...@cs... http://www.unm.edu/~keithw "Yet mark his perfect self-contentment, and hence learn his lesson, that to be self-contented is to be vile and ignorant, and that to aspire is better than to be blindly and impotently happy." -- Edwin A. Abbott, Flatland ________________________________________________________________________ |