//----- 保存用変数 -----// LPDIRECT3DDEVICE device; D3DXVECTOR3 position(0.0f,0.0f,0.0f); float roll = 0.0f; float scale= 1.0f; //----- 保存用変数 E -----// D3DXMATRIX mat_trans; D3DXMatrixTranslation(&mat_trans,pos.x,pos.y,pos.z);// 移動 D3DXMATRIX mat_rot; D3DXMatrixRotationY(&mat_rot,D3DXToRadian(roll));// X,Y共にあり 回転 D3DXMATRIX mat_scale; D3DXMatrixScaling(&mat_scale,scale,scale,scale);// 拡大縮小 // 中心(0,0,0)で「拡大縮小」「移動」をしてから「回転」 //D3DXMATRIX world = mat_scale * mat_trans * mat_rot; // 中心(0,0,0)で「拡大縮小」「回転」をしてから「移動」 D3DXMATRIX world = mat_scale * mat_rot * mat_trans; device->SetTransform(D3DTS_WORLD,&world); mesh.render(); // 描画する 擬似コード