[FIX] Fix some pvs issue

This commit is contained in:
NADAL Jean-Baptiste
2024-03-12 18:51:13 +01:00
parent 6e17dd94c1
commit e54916f82e
2 changed files with 44 additions and 0 deletions

View File

@@ -55,6 +55,47 @@ IntersectionData::~IntersectionData(void)
/* ------------------------------------------------------------------------- */
IntersectionData::IntersectionData(const IntersectionData &a_copy) :
m_is_inside(a_copy.m_is_inside),
m_distance(a_copy.m_distance),
m_shape(a_copy.m_shape),
m_point(a_copy.m_point),
m_over_point(a_copy.m_over_point),
m_under_point(a_copy.m_under_point),
m_eyev(a_copy.m_eyev),
m_normalv(a_copy.m_normalv),
m_reflectv(a_copy.m_reflectv),
m_n1(a_copy.m_n1),
m_n2(a_copy.m_n2)
{
}
/* ------------------------------------------------------------------------- */
const IntersectionData &IntersectionData::operator=(const IntersectionData &an_other)
{
if (this == &an_other)
{
return *this;
}
m_is_inside = an_other.m_is_inside;
m_distance = an_other.m_distance;
m_shape = an_other.m_shape;
m_point = an_other.m_point;
m_over_point = an_other.m_over_point;
m_under_point = an_other.m_under_point;
m_eyev = an_other.m_eyev;
m_normalv = an_other.m_normalv;
m_reflectv = an_other.m_reflectv;
m_n1 = an_other.m_n1;
m_n2 = an_other.m_n2;
return *this;
}
/* ------------------------------------------------------------------------- */
double IntersectionData::distance_t(void) const
{
return m_distance;

View File

@@ -42,6 +42,9 @@ namespace Raytracer
IntersectionData(void);
~IntersectionData(void);
IntersectionData(const IntersectionData &a_copy);
const IntersectionData &operator=(const IntersectionData &an_other);
double distance_t(void) const;
void set_distance_t(double a_value);