Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Using vertex functions to manipulate object.

Author
Message
Duncan
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 6th Dec 2008 05:03
The documentation around the vertex and mesh functions seems a little shy. I'm trying to directly manipulate to the vertices of an object... in my case a sphere. I'm trying something like:



My questions are -- am I using the lock/unlock properly (are they even needed) and more importantly, after I do this, how do I get the mesh associated with my original object? I don't see a dbMakeObjectFromMesh function.
Is this all just crazy talk?!

Thanks.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Dec 2008 14:44 Edited at: 6th Dec 2008 14:44
Quote: "am I using the lock/unlock properly (are they even needed)"

Yes and yes.

Quote: "how do I get the mesh associated with my original object?"

dbMakeObject(), or dbChangeMesh().

However, there may be a problem with what you are doing (or might not). When you make a mesh from an object, it will combine all of the existing limb meshes, with rotation and scaling, in to a single mesh.

An alternative is to manipulate the limbs in place using the dbLockVertexDataForLimb() function, but you'll need to manipulate the vertices for each limb.

Duncan
16
Years of Service
User Offline
Joined: 7th Jun 2008
Location:
Posted: 6th Dec 2008 16:05
Thanks for the reply and the warning. In my case I'm only using a simple, though large, sphere object/mesh (you guessed it.. a space game), so the limb thing isn't a problem... for now.
Thanks again!

Login to post a reply

Server time is: 2024-09-30 11:25:24
Your offset time is: 2024-09-30 11:25:24