Vector3 troubles!

Hi there, how can I convert this piece of code to C#/OpenTK? I have troubles porting Cross and Normalize methods... (Oh boy, do I suck in coding or what ;-) )

Vec3f sum;
Vec3f out;
Vec3f left;
sum += out.cross(left).normalize();

c++ code zip file


Comments

Re: Vector3 troubles!
posted by the Fiddler

Try using the static methods like this:

Vector3 sum = new Vector3();
Vector3 out = new Vector3();
Vector3 left = new Vector3();

sum += Vector3.Normalize(Vector3.Cross(out, left));

Re: Vector3 troubles!
posted by flopoloco

Thanks for the help!

Who's online

There is currently 1 user and 1 guest online.

Online users

  • Mincus