Sandegren, Eric S. wrote:
>This may seem like a silly question but - why does the getTransform method
>of TransformGroup take a parameter and set it's reference, rather than
>returning a reference to the Transform3D?  All the other "get" methods I've
>ever seen return the object rather than having you pass it in and then the
>method fill it.

Giving back the Transform3D requires to allocate a new object and thereby
garbage.
If you pass in a Transform3D to be filled, you can use a preallocated one
and use it multiple times with constant memory.

This approach is pretty common, e.g. in the vecmath package.

- J

--
Joerg 'Herkules' Plewe
http://www.hardcode.de

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to