Jump to content

How can I scaling a geometry using VEX?


Recommended Posts

Hi guys,

I'm looking for the simplest way to scale a geometry, using VEX (by an attribute) and I would like to be able to define the pivot position, too.

I tried these codes. It works but I don't need the other transform parts (like Position, Rotation, and ...):

vector t=chv("Translate"), r=chv("Rotation"), pr=chv("pivot_rotation");
vector p = v@myPivot;
vector s = f@myScale;
matrix transform = maketransform(0,0,t,r,s,p,pr);
@P *= transform;

There is a VEX function:  scale(matrix &m, vector scale_vector);

But I don't know how to use it.

 

Thanks for helping.

Edited by Masoud
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...