GAMES101 PA0

配置环境

Ubuntu 18.04

Eigen3安装

sudo apt-get install libeigen3-dev

g++安装

sudo apt install g++

code

#include<cmath>
#include<eigen3/Eigen/Core>
#include<eigen3/Eigen/Dense>
#include<iostream>
using namespace std;
int main(){
    Eigen::Vector3f p(2.0f,1.0f,1.0f);
    Eigen::Matrix3f rotation;
    float angle = 45*M_PI/180;
    rotation << cos(angle), -sin(angle), 0 , sin(angle) , cos(angle) , 0 , 0 , 0 , 1;
    Eigen::Matrix3f translation;
    translation << 1,0,1,0,1,2,0,0,1;
    cout << translation*rotation*p;

    return 0;
}
上一篇:RK Android7.1


下一篇:每天学习亿点点day 16: 脚部IKBone的做法