Jump to content

Pointing To X Vector Component.


Recommended Posts

Hi there,

UT_Vector3 *chAttr;
chAttr = (UT_Vector3 *)ppt->getAttribData(vector_attr_index);

Is it possible to point to [0] ('x' or other arbitrary) component of a vector(vector_attr_index) with chAttr?

Thanks.

on the second thought - *chAttr[0] is gonna be my X component, right? Unless maybe UT_Vector3 needs different syntax... must check that.

Link to comment
Share on other sites

Is it possible to point to [0] ('x' or other arbitrary) component of a vector(vector_attr_index) with chAttr?

You should be able to use either the overloaded [] operator, or calls to x(), y(), z() to get the individual components of a UT_Vector3

Cheers!

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