Inline simple function

parent bf7f6302
Pipeline #2103 failed with stage
in 6 minutes 30 seconds
......@@ -177,7 +177,15 @@ void FreeCurve(void *a, void *b);
void FreeSurface(void *a, void *b);
void FreeVolume(void *a, void *b);
void Projette(Vertex *v, double mat[3][3]);
inline void Projette(Vertex *v, double mat[3][3])
{
double X = v->Pos.X * mat[0][0] + v->Pos.Y * mat[0][1] + v->Pos.Z * mat[0][2];
double Y = v->Pos.X * mat[1][0] + v->Pos.Y * mat[1][1] + v->Pos.Z * mat[1][2];
double Z = v->Pos.X * mat[2][0] + v->Pos.Y * mat[2][1] + v->Pos.Z * mat[2][2];
v->Pos.X = X;
v->Pos.Y = Y;
v->Pos.Z = Z;
}
Vertex *CreateVertex(int Num, double X, double Y, double Z, double lc,
double u);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment