1 2 3 4 5 6 7
|
SPHERE s1 0 0 -10 2 2 1 0.5 0 0 0 1 0 0 50
And..Here's a following snippet of code that parses this line:
num = sscanf(line, "%s %*s %f %f %f %f %f %f %f %f %f %f %f %f %f %d",
command, newSphere.m_Name, &newSphere.m_Position.x, &newSphere.m_Position.y, &newSphere.m_Position.z,&newSphere.m_ScaleFactor.x, &newSphere.m_ScaleFactor.y, &newSphere.m_ScaleFactor.z,&newSphere.m_Color.red, &newSphere.m_Color.green, &newSphere.m_Color.blue,&newSphere.Ka, &newSphere.Kd, &newSphere.Ks, &newSphere.Kr, &newSphere.n);
|