Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Snippet from sdf-loader.cpp:
- // for each line multiply existing matrix with the transformation matrix corresponding to the
- // instruction in the sdf-file (a translation matrix in this case).
- // Save the accumulated transformation matrix as the world transformation matrix of the object,
- // i.e. use object->t_matrix for transformations
- if(str3 == "translate" && iss >> int1 >> int2 >> int3)
- {
- std::map<std::string,math3d::matrix>::iterator iter = transformation_list.find(str2);
- if(iter != transformation_list.end())
- t_matrix = transformation_list[str2];
- else
- t_matrix = math3d::matrix();
- transformation_list[str2] = t_matrix * math3d::make_translation(int1,int2,int3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement