-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
458 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
#include"camera.h" | ||
#include<iostream> | ||
void test() { | ||
std::cout << "HELLO WORLD" << std::endl; | ||
camera::camera() { | ||
_camera << 1., 0., 0., 0., 1., 0., 0., 0., 1.; | ||
} | ||
|
||
Eigen::Matrix<double, 3, 3> camera::trans(double x_angle, double y_angle, double z_angle) { | ||
return utils::roate_x(x_angle) * utils::roate_y(y_angle) * utils::roate_z(z_angle) * _camera; | ||
} | ||
|
||
void camera::move(double dx,double dy,double dz) { | ||
this->dx += dx; | ||
this->dy += dy; | ||
this->dz += dz; | ||
} | ||
|
||
void camera::clear_move() { | ||
this->dx = 0; | ||
this->dy = 0; | ||
this->dz = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
#pragma once | ||
void test(); | ||
#ifndef __CAMERA_H__ | ||
#define __CAMERA_H__ | ||
#include <Eigen/Dense> | ||
#include "../utils/utils.h" | ||
class camera { | ||
private: | ||
//摄像机 正交基 人在(0,0,0) 不动摄像机进行转动 | ||
Eigen::Matrix<double, 3, 3> _camera; | ||
public: | ||
double dx = 0, dy = 0, dz=0; | ||
camera(); | ||
Eigen::Matrix<double, 3, 3> trans(double x_angle,double y_angle,double z_angle); | ||
void move(double dx, double dy, double dz); | ||
void clear_move(); | ||
}; | ||
#endif // !__CAMERA_H__ |
Oops, something went wrong.