Jump to content

How to "clean" the transforms of a gdp


Guest xionmark

Recommended Posts

Guest xionmark

Hello,

How do you "clean" or reset a gdp (GEO_Detail *gdp) of any previous transformations from calling gdp->transform() ?

I can't find anything in the docs and I've tried something like:

   UT_Matrix4 xform(1.0);
   xform.identity();
   gdp->transform(xform);

But no luck, the transforms continue to accumulate every time I transform the gdp to a new location.

Thanks!

Mark

Link to comment
Share on other sites

Guest xionmark
In general, you can't because when you're transforming the geometry, you are modifying the point positions directly. So you have to decide what you want the "rest" position to be and transform it again to that.

Ah ha! That's it!

Mucho gracias Edward!

Mark

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...