Jump to content

tolocal(),toworld() function for direction vector


photo

Recommended Posts

The node's toLocal () and toWorld () functions also include distance calculations.  (it seems to be for position vector transform).

 

Are there functions such as toLocal (), toWorld () for the direction vector?

 

I know how to calculate it , but after I found that there was a toLocal () function, I was wondering if there is a function for dirction.

Edited by dongju.jeong
Link to comment

Hi, dongju.jeong,

Unfortunately, there is no such function.
About "include distance calculations": if you are worried about performance, then don't. Source code of the toLocal() method is quite simple: { return inverse_world_transform * point; }
There are only 9 multiplications and 9 additions (unless we use SSE).

Best regards,
Alexander

  • Like 1
Link to comment
×
×
  • Create New...