Originally Posted by
Tanaris4
Can you provide the Vector3 class? I'm on a mac + will have to re-create in Objective-C
Edit: I'm guessing this doesn't exist now that I found
Vector3 true?
It's any basic vector3 class. Here's one with the required methods:
Code:
public struct Vector3
{
public float X, Y, Z;
public void Normalize()
{
float magnitude = (float)Math.Sqrt(X * X + Y * Y + Z * Z);
X /= magnitude;
Y /= magnitude;
Z /= magnitude;
}
public static operator Vector3 -(Vector3 left, Vector3 right)
{
left.X -= right.X;
left.Y -= right.Y;
left.Z -= right.Z;
return left;
}
public static operator Vector3 *(Vector3 left, float right)
{
left.X *= right;
left.Y *= right;
left.Z *= right;
return left;
}
}