-
Notifications
You must be signed in to change notification settings - Fork 48
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 hw3 #11
base: master
Are you sure you want to change the base?
submission hw3 #11
Conversation
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.
- The submission is done after the deadline
- No readme file, no results were submitted
// --- PUT YOUR CODE HERE --- | ||
|
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.
The case when the plane is orthogonal to one of the axises?
res.extend(m_a); | ||
res.extend(m_b); | ||
res.extend(m_c); | ||
res.m_minPoint = std::numeric_limits<Vec3f>::infinity(); |
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.
Why did you add these two lines ?
@@ -68,6 +68,9 @@ class CPrimSphere : public IPrim | |||
{ | |||
CBoundingBox res; | |||
// --- PUT YOUR CODE HERE --- | |||
res.extend(m_origin + Vec3f(m_radius, m_radius, m_radius)); |
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 need to add the -radius as well
@@ -68,6 +68,9 @@ class CPrimSphere : public IPrim | |||
{ | |||
CBoundingBox res; | |||
// --- PUT YOUR CODE HERE --- | |||
res.extend(m_origin + Vec3f(m_radius, m_radius, m_radius)); | |||
res.m_minPoint = std::numeric_limits<Vec3f>::infinity(); | |||
res.m_maxPoint = std::numeric_limits<Vec3f>::infinity() * (-1); |
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.
Why did you add these two lines ?
Vec3f pointLightIntensity(3, 3, 3); | ||
Vec3f lightPosition2(-3, 5, 4); | ||
Vec3f lightPosition3(0, 1, 4); | ||
|
||
scene.add(std::make_shared<CLightOmni>(pointLightIntensity, lightPosition2)); | ||
scene.add(std::make_shared<CLightOmni>(pointLightIntensity, lightPosition3)); | ||
|
||
Mat img(resolution, CV_32FC3); // image array | ||
Ray ray; // primary ray |
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.
Ray should lie inside the parallel part of the code
@@ -72,7 +72,6 @@ class CBoundingBox | |||
*/ | |||
Vec3f getMaxPoint(void) const { return m_maxPoint; } | |||
|
|||
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.
Why did you delete this line ?
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.
because I was using one of the private variables in another class and it was not accessible. I know I could have used static casting or get method, but this was giving me an error at submission
No description provided.