示例#1
0
文件: main.cpp 项目: bcgs/PG-Proj2
 /* Global coordinate -> Local coordinates */
 void globalTOlocal(Vertex& Pv) {
     Vector P_C(Pv.x - x, Pv.y - y, Pv.z - z);  // P-C
     
     Pv.x = U.x * P_C.x + U.y * P_C.y + U.z * P_C.z;
     Pv.y = V.x * P_C.x + V.y * P_C.y + V.z * P_C.z;
     Pv.z = N.x * P_C.x + N.y * P_C.y + N.z * P_C.z;
 }
示例#2
0
void myatoi(char *str1)
{
int ch[] = {0},i=0,j=0;
P_S(str1);
while(*str1)
{
P_C(*str1);
i = (i*10) + (*str1++);
//*str1++;
P_I(i);
}
}