Реферат: Трехмерная графика Теория
if ( ( res = graphresult () ) != grOk ) {
printf ( "\nGraphics error: %s\n", grapherrormsg ( res ) );
exit ( 1 );
}
setgraphmode ( 1 );
DrawObject ( Obj, PrCenter );
do {
setactivepage ( Page % 2 );
clearviewport ();
if ( kbhit ())
{
switch ( ch = getch() ) {
case '+': Obj->ObjScale ((1.1,1.1,1.1)); break;
case '-': Obj->ObjScale ((0.9,0.9,0.9)); break;
case 'x': Obj->ObjMirrorX (); break;
case 'y': Obj->ObjMirrorY (); break;
case 'z': Obj->ObjMirrorZ (); break;
};
if ( ch == 0 )
{
switch ( ch = getch () ) {
case 72 : fi -= step; break;
case 80 : fi += step; break;
case 75 : psi += step; break;
case 77 : psi -= step; break;
};
};
};
Obj->Rotate ( fi, psi, 0 );