home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex007.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
27 lines
// Example: 007 from Library Reference
#include "..\3D-Ware\dddware.h"
short Xpos=0, Ypos=0, Zpos=400, Xangle=0, Yangle=0, Zangle=0;
short VXpos=0, VYpos=0, VZpos=0;
short Handle;
char Semaphores;
short main(void)
{
dddInitAll();
Handle = (dddShapeLoad("EXAMPLE.3D")); // Load the .3D data file.
dddSetViewPos16(VXpos,VYpos,VZpos); // Set the viewers angles in the 3D world.
while (!dddkeycode)
{
dddCls(); // Clear the graphics screen.
dddClearObjects(); // Clear the viewing table.
dddSetViewAngles(0,0,0); // Set the viewers angles.
Yangle += 0x200; // Rotate the shape in the Y plane.
Zangle += 0x200; // Rotate the shape in the Z plane.
dddInsertObject16(DRW_MOBILE,Handle,Semaphores,Xpos,Ypos,Zpos,Xangle,Yangle,Zangle);
// Insert an object to be rendered.
dddDrawObjects(); // Render all 3D objects we have inserted.
dddScreenSwap(); // Flip the real screen and dummy screens.
}
dddRestoreAll();
return 0; // Bye.
}