Originally Posted by
Kenshin13
It's exactly that. Some common sense would also be vital. Just like VectorAdd does addition of the vectors and DotProduct finds the dot product of two vectors.
What is dotProduct ???It is my (x*y*z)??? It is right?
What is RefDef(I called Vect3d)??? It is :
Code:
#pragma once
#include <math.h>
class Vect3d
{
public:
float x;
float y;
float z;
Vect3d(float _x, float _y, float _z)
{
x = _x;
y = _y;
z = _z;
}
Vect3d()
{
}
float length()
{
return (float)sqrt(x * x + y * y + z * z);
}
float dotproduct(Vect3d dot)
{
return (x * dot.x + y * dot.y + z * dot.z);
}
};
class PlayerDataVec
{
public:
float xMouse;
float yMouse;
float xPos;
float yPos;
float zPos;
Vect3d VecCoords()
{
Vect3d vec(xPos, yPos, zPos);
return vec;
}
};
It is right????