On 11/06/2014 at 07:54, xxxxxxxx wrote:
Using a matrix pointer instead of the object itself solved the problem for me.
void Get_PointMatrix(Matrix *pMat, Vector *pAdr, LONG pcnt, LONG index, Vector up)
{
Vector p1, p2;
pMat->off = pAdr[index];
if (index < pcnt - 1)
p2 = pAdr[index+1];
else
p2 = pAdr[0];
if (index > 0)
p1 = pAdr[index-1];
else
p1 = pAdr[pcnt-1];
pMat->v3 = !(p2 - p1);
pMat->v2 = up;
pMat->v1 = -(pMat->v3 % pMat->v2);
}