Draw wire sphere on selected lights to visualize light radius

This commit is contained in:
parax0
2015-11-29 03:00:18 -07:00
parent 9b2dd838ea
commit 7622bb2032
8 changed files with 79 additions and 10 deletions

View File

@@ -153,12 +153,23 @@ std::pair<bool,float> CAABox::IntersectsRay(const CRay &Ray) const
return Math::RayBoxIntersection(Ray, *this);
}
bool CAABox::operator==(const CAABox& Other)
// ************ OPERATORS ************
CAABox CAABox::operator+(const CVector3f& translate) const
{
return CAABox(mMin + translate, mMax + translate);
}
CAABox CAABox::operator*(float scalar) const
{
return CAABox(mMin * scalar, mMax * scalar);
}
bool CAABox::operator==(const CAABox& Other) const
{
return ((mMin == Other.mMin) && (mMax == Other.mMax));
}
bool CAABox::operator!=(const CAABox& Other)
bool CAABox::operator!=(const CAABox& Other) const
{
return (!(*this == Other));
}

View File

@@ -42,8 +42,10 @@ public:
std::pair<bool,float> IntersectsRay(const CRay& Ray) const;
// Operators
bool operator==(const CAABox& Other);
bool operator!=(const CAABox& Other);
CAABox operator+(const CVector3f& translate) const;
CAABox operator*(float scalar) const;
bool operator==(const CAABox& Other) const;
bool operator!=(const CAABox& Other) const;
// Constants
static const CAABox skInfinite;