Boost logo

Geometry :

Subject: [ggl] Efficient rotation about a point
From: Stephen Leary (sleary)
Date: 2009-11-29 15:11:42


Of course it can. you simply multiple a +translate by a rotate then multiply
the result by a -translate. This gives you the matrix you need.

Stephen

On Sun, Nov 29, 2009 at 7:27 PM, Lee <lee_at_[hidden]> wrote:

> Can a single matrix properly represent "-translate/rotate/+translate"?
> I think the translation component of the matrix would be negated resulting
> in rotation about the origin, losing the "rotation about a point" behaviour.
> No?
>
> Stephen Leary wrote:
>
>> This is usually acomplished by producing a matrix that represents
>> -translate/rotate/+translate then applying that matrix transform once. I
>> havent checked to see if GGL supports matrix transforms but that is how i
>> would approach this use case in "real life". The matrix gets built once and
>> reused as many times as needed.
>>
>> Stephen
>>
>> On Sun, Nov 29, 2009 at 6:43 PM, Lee <lee_at_[hidden] <mailto:
>> lee_at_[hidden]>> wrote:
>>
>> Hi,
>>
>> What is the best way (in terms of efficacy) to rotate a ring about
>> a point in GGL?
>> Looking at GGL it seems right now to require three separate passes
>> over the point
>> data: -translate/rotate/+translate. Can't this be done in some
>> kind of single pass
>> 'rotate_about_transformer'?
>>
>>
> _______________________________________________
> ggl mailing list
> ggl_at_[hidden]
> http://lists.osgeo.org/mailman/listinfo/ggl
>

-- 
Stephen Leary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20091129/7d76f0a8/attachment.html

Geometry list run by mateusz at loskot.net