Lets say we have:
Vector3 vec;//has some random values
Matrix4x4 mat;//has some random values as well
Now I want to multiply them to get a Vector3 out of it.
Vector3 mult = vec * mat;
Would this function fulfill that:
void Matrix4x4::Transform( Vector3 &oPoint )
{
float fX = oPoint.GetX();
float fY = oPoint.GetY();
float fZ = oPoint.GetZ();
oPoint.SetX( fX * this->matrix[0][0] + fY * this->matrix[0][1] + fZ * this->matrix[0][2] + this->matrix[0][3]);
oPoint.SetY( fX * this->matrix[1][0] + fY * this->matrix[1][1] + fZ * this->matrix[1][2] + this->matrix[1][3]);
oPoint.SetZ( fX * this->matrix[2][0] + fY * this->matrix[2][1] + fZ * this->matrix[2][2] + this->matrix[2][3]);
}
If not, can you lead me in the right direction.