Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Adding ofMatrix4x4 transformations to a mesh and go back to the original position

$
0
0

ofPush/PopMatrix only work for the global transformations done to the model view and projection matrices not to an ofMatrix4x4 or anything else.

you can just make a copy before starting to modify the matrix and then overwrite the original with the copy to bring back the original transformation.

also the easiest way to do what you are trying to do would probably be by having an ofNode instead of a matrix for each branch. ofNodes can be parented to each other so every branch comming out of another is just it's child and only needs to know it's local transformation that way you don't need to manually accumulate the transformations on every branch


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>