realbasic-games
[Top] [All Lists]

Re: Setting quaternions by way of "=" or copying them

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Setting quaternions by way of "=" or copying them
From: Frank Condello <developer at chaoticbox dot com>
Date: Tue, 22 Feb 2005 00:17:22 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20050220180020 dot A4A5773F10F at lists dot realsoftware dot com> <d7765b7ae821f510e569a3dde52056a7 at uio dot satnet dot net>
On 21-Feb-05, at 11:54 PM, Heinz J. Gattringer wrote:

Is there a nicer and more efficient way to copy one quaternion to another without having them "coupled"?

If yer using RB5.5, put the following method in a global module:

        Sub Copy(Extends q1 As Quaternion, q As Quaternion)
                q1.x = q.x
                q1.y = q.y
                q1.z = q.z
                q1.w = q.w
        End Sub

You now have a Quaternion.Copy method. This isn't more efficient, but it's definitely nicer.

Frank.
------------
Open Source RB Plugins and Classes
<http://developer.chaoticbox.com>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>