Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

ofxAssimpModelLoader set rotation

$
0
0

@fresla wrote:

I am working with ofxAssimpModelLoader and have a question about the set rotation function below.

   void ofxAssimpModelLoader::setRotation(int which, float angle, float rot_x, float rot_y, float rot_z){
        if(which + 1 > (int)rotAngle.size()){
            int diff = 1 + (which - rotAngle.size());
            for(int i = 0; i < diff; i++){
                rotAngle.push_back(0);
                rotAxis.push_back(ofPoint());
            }
        }

        rotAngle[which]  = angle;
        rotAxis[which].x = rot_x;
        rotAxis[which].y = rot_y;
        rotAxis[which].z = rot_z;

        updateModelMatrix();
    }

I am not that adept at 3D rotation anyway, but I am trying to use this and I don't understand what the 'which' parameter is and how it effects the rotation. After a few hours of putting parameters in (yes I am that slow) I can't seem to find the pattern of what is going on. If anyone can point me in the right direction it would be great..

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles