triangle3d constructor and line3d::getIntersectionWithSphere passing vectors now as const-ref instead of per value. Thx @nemo for reporting.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4719 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2014-03-13 17:08:46 +00:00
parent c7bc66a2c6
commit 84de6cb206
2 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ class line3d
\return True if there is an intersection.
If there is one, the distance to the first intersection point
is stored in outdistance. */
bool getIntersectionWithSphere(vector3d<T> sorigin, T sradius, f64& outdistance) const
bool getIntersectionWithSphere(const vector3d<T>& sorigin, T sradius, f64& outdistance) const
{
const vector3d<T> q = sorigin - start;
T c = q.getLength();

View File

@ -24,7 +24,7 @@ namespace core
//! Constructor for an all 0 triangle
triangle3d() {}
//! Constructor for triangle with given three vertices
triangle3d(vector3d<T> v1, vector3d<T> v2, vector3d<T> v3) : pointA(v1), pointB(v2), pointC(v3) {}
triangle3d(const vector3d<T>& v1, const vector3d<T>& v2, const vector3d<T>& v3) : pointA(v1), pointB(v2), pointC(v3) {}
//! Equality operator
bool operator==(const triangle3d<T>& other) const