-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submission: Assignment 6 #1
base: main
Are you sure you want to change the base?
Conversation
|
||
virtual void setTarget(const Vec3f& target) { m_target = target; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here direction should be also updated
virtual void setTarget(const Vec3f& target) { m_target = target; } | ||
|
||
Vec3f getTarget(void) const { return m_target; } | ||
|
||
private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to override setPosition() method, because it will change the direction of the camera
Mat moonTransform = Mat::eye(4, 4, CV_32FC1); | ||
CTransform T; | ||
Mat earthTransform = transform.rotate(Vec3f(0.399f, 0.917, 0), 360.0f / nFrames).get(); | ||
Mat moonTransform = transform.rotate(Vec3f(0, 1, 0), 13.2f / nFrames).get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you achieve these numbers?
// Mat rotationAroundTheSun = Mat::eye(4, 4, CV_32FC1); | ||
Vec3f earthPivot = earth.getPivot(); | ||
std::cout << "earth pivot: " << earthPivot << std::endl; | ||
Mat rotationAroundTheSun = transform.translate(earthPivot).rotate(Vec3f(0, 1, 0), 1.0f / nFrames).translate(-earthPivot).get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does 1.0f / nFrames mean? How was it calculated?
No description provided.