|
![](/i/fill.gif) |
Wasn't it Raf256 who wrote:
>Hi,
>how can I calculate ROTATE so that point <0,1,0> after rotation by
>vrotate(<0,1,0> , ROTATE) will be equal to some given <XX,YY,ZZ> ?
In general it can't be done. When you rotate the point with vrotate, the
distance from the origin will always be 1. If <XX,YY,ZZ> is at a
different distance from the origin then you can't get there with just a
vrotate().
The Point_At_Trans() macro in transforms.inc will rotate <0,1,0> into
vnormalize(XX,YY,ZZ). If you must have a vrotate(), then you might be
able to reverse engineer that macro to convert it from a matrix
transform to a rotation.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |