0

I have a problem, and i'm not sure why. I need to addition to float3 values.

float3 a3 = cross(v1v2,intersection.pIntersect);
a3.normalize();
float3 lambda1 = a3 / (a1+a2+a3);

error: no match for ‘operator/’ in ‘a3 / math::operator+((* & math::operator+(((const math::vector)(& a3)))’

So its not possible to + operate the float3 values. Do I have the wrong type for lambda? or do i miss an operation befor? Or is the normilize() method changing the typ ?

thx for any help :)

vicR
  • 789
  • 4
  • 23
  • 52
  • 1
    what are you trying to do? dividing a vector by another vector doesn't make a whole lot of sense – TomD May 03 '13 at 21:24

1 Answers1

1

I think your problem is not with operator+ but with operator/

I cannot check the code now, but it seems that you cannot divide two vectors.

EDIT 1

It seems that the compiler is converting the float3 to math::vector for the operator+. After that conversion, it cannot find the operator/(float3, math::vector).

Maybe "cutil_math.h" is not included although it seems that this header is missing for newer SDKs.

Community
  • 1
  • 1
J. Calleja
  • 4,855
  • 2
  • 33
  • 54
  • oh yeah the problem is the operator/. The other part should be right a3 is a triangle ( i have 3) which i normalize and after that i trying to calculate my lambdas (lambda = Ai / SumOfA's) to calculate my barycentric coordinates. But I think the problem are the types but i'm not sure why – vicR May 04 '13 at 16:18