hi… i need help about transformation, i mean rotation object.
i want to rotate object without glRotatef, so i multiple the points and matrix
ex.
rotate x
1 0 0 | | x | | x
0 cos -sin |X | y |=| cos * y + (-sin)*z
0 sin cos | | z | | sin * y + cos * z
my line program
double RadTheta=theta*3.14159265358979323846/180.0;
double CosRadTheta=cos(RadTheta);
double SinRadTheta=sin(RadTheta);
for (unsigned int i=1;i<=o->nPoints;i++){
o->points[i].x=o->points[i].x;
o->points[i].y=(o->points[i].y*CosRadTheta)+((-SinRadTheta)*o->points[i].z);
o->points[i].z=(SinRadTheta*o->points[i].y)+(o->points[i].z*CosRadTheta);
}
the problem is, the result is not corect. my object not rotate corectly. please help me… what i must do?
i have change degree to radian (angle*3,14…/180).