realbasic-games
[Top] [All Lists]

Re: Animation and memory issue

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Animation and memory issue
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Mon, 25 Jul 2005 19:50:48 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <FF3D4383-F5B1-4405-A67F-BDF52954811A at miensoftware dot com> <D52AC133-DDD0-4558-8725-9508D39F6E79 at chaoticbox dot com> <F29BF550-E17D-4DD4-B907-AD971BCB8823 at miensoftware dot com> <8F479F6E-AC0F-4117-8F81-68A68C3A43E1 at chaoticbox dot com> <DE4335D4-957D-49C7-86EC-C6304D6238FA at miensoftware dot com> <DCC3198F-BD3B-405D-B445-072E01D1716A at chaoticbox dot com> <4B8067F5-6CC8-4F99-80CA-74EC961FB1AB at miensoftware dot com> <40DAC1AB-9ADD-4DDF-B37D-C0E885B609D6 at chaoticbox dot com> <EAA7040C-001D-4BB2-8B3B-6DD76F457D1E at miensoftware dot com> <04F31E3F-9A37-4202-BB77-39A17FD6B12F at chaoticbox dot com> <A8E3338F-7E45-46C5-8747-8AB49B8EF210 at miensoftware dot com> <4CEEFD58-497E-4A52-938E-056D9B6C92BA at chaoticbox dot com> <47D2EBC7-FC40-4880-AC7B-DED93FD89175 at miensoftware dot com> <7F6AFBE0-5AD5-4F04-8ECD-028E595E843D at chaoticbox dot com>
Trimesh data is mostly just pointers to other blocks of data (look up TQ3TriMeshData in the Quesa API reference). When you create a new trimesh using an existing data set, you're just copying pointers for the points, uvs, normals (etc). You're not actually making a copy of the vertexes.

Great! I didn't understand which way it was. This way is much easier to work with.

mem2 isn't a trimesh, it's trimesh *data* - GetHandle and GetData are two totally different things. GetHandle returns a pointer to an opaque TQ3GeometryObject (that's what you use to add it to a display group) and GetData returns a copy of a TQ3TriMeshData struct, but the actual vertex data is somewhere in the bowels of Quesa, unless you made and assigned it yourself from scratch like you do with the points above.

I understand that, I just thought that calling New Trimesh would actually copy the data over creating new blocks for each data. If that was the case, I thought there had to be someway to create the trimesh object from an existing trimesh data so that it doesn't copying the data.

Now that I understand how it works, I should be set now.

It works great!

_______________________________________________
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>