|
From: <ba...@in...> - 2004-07-23 20:14:52
|
Well, what I want is to rotate Axis
component of AxisAngle, but only
around one axis.
something like this:
//rotate around Z axis
gmtl::AxisAnglef aa;
float oldx = aa[1], oldy = aa[2];
aa[1] = oldx*cos(theta) -
oldy*sin(theta);
aa[2] = oldx*sin(theta) +
oldy*sin(theta);
It would be simpler and more
readable to write
gmtl::setRotZ(aa, theta);
kevin meinert wrote:
> If you have come code (or pseudo
code) in mind, post it to the list,
we'll
> take a look to see what specific
functionality you need, and if it is
> something that we forgot in gmtl,
we'd be happy to include it.
>
>
> For an AxisAngle, isn't rotation
about one axis simply setting the axis
> and the angle? I'm not sure what
more you could want. Maybe when you
> post the code I'll understand better.
>
>
*--*---*---*----*-----*------*------*-----*----*---*---*--*
> Kevin Meinert
/_/
> home -
http://www.vrsource.org/~kevin
\ /
> music -
http://www.subatomicglue.com
\/ __ \/
>
\__
>
\_\
>
>
>> kevin meinert wrote:
>>
>>> can't you set the angle/axis
directly on the AxisAngle class? I
don't
>>> have the code handy to look at
so I'm guessing...
>>>
>>> there's probably a setter or a
constructor for this...
>>
>>
>> yes, there is operator[] and I can
>> do it by hand.
>> But I think it would be simpler for
>> the programmer to have separate
>> functions to do rotation around one
>> axis.
>> I can contribute these, if you want.
>>
>>
>>>
*--*---*---*----*-----*------*------*-----*----*---*---*--*
>>> Kevin Meinert
/_/
>>> home -
http://www.vrsource.org/~kevin
\ /
>>> music -
http://www.subatomicglue.com
\/ __ \/
>>>
\__
>>>
\_\
>>>
>>>
>>>
>>>> Hello,
>>>> I'm using gmtl(specifically, your
>>>> AxisAngle class).
>>>> Currently, I find gmtl's method of
>>>> rotating axis component of
AxisAngle
>>>> representation inconvenient.
>>>> I have to extract Vec from
>>>> AxisAngle, build a rotation
matrix,
>>>> multiply Vec by it and use setAxis
>>>> to set the axis component. I
have to
>>>> do it even if I need rotation only
>>>> around one axis.
>>>> It would be nice if I could write
>>>> like this:
>>>> AxisAngle aa; float
xangle;
>>>> gmtl::setRotX(aa, xangle);
>>>> Or maybe I just don't understand
>>>> something about Axis-Angle
>>>> representation?
>>>>
>>>>
>>>>
>>>>
-------------------------------------------------------
>>>> This SF.Net email is sponsored
by BEA Weblogic Workshop
>>>> FREE Java Enterprise J2EE
developer tools!
>>>> Get your free copy of BEA
WebLogic Workshop 8.1 today.
>>>>
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>>>>
_______________________________________________
>>>> ggt-devel mailing list
>>>> ggt...@li...
>>>>
https://lists.sourceforge.net/lists/listinfo/ggt-devel
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
-------------------------------------------------------
>> This SF.Net email is sponsored
by BEA Weblogic Workshop
>> FREE Java Enterprise J2EE
developer tools!
>> Get your free copy of BEA
WebLogic Workshop 8.1 today.
>>
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>>
_______________________________________________
>> ggt-devel mailing list
>> ggt...@li...
>>
https://lists.sourceforge.net/lists/listinfo/ggt-devel
>>
>
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by
BEA Weblogic Workshop
> FREE Java Enterprise J2EE
developer tools!
> Get your free copy of BEA
WebLogic Workshop 8.1 today.
>
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
>
_______________________________________________
> ggt-devel mailing list
> ggt...@li...
>
https://lists.sourceforge.net/lists/listinfo/ggt-devel
>
>
|