Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SHOROUKAWWAD
Copy link

No description provided.

Copy link
Contributor

@ereator ereator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The submission is done after the deadline
  2. No readme file, no results were submitted

// --- PUT YOUR CODE HERE ---

Copy link
Contributor

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();
Copy link
Contributor

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));
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

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 ?

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants