3D Rotating Objects Demo
The class file does all the grunt work for you. the only calls the user makes to the class is to "LoadObject", if the user wants to move or rotate it then they call the "SetRotations" and "SetTranslations" functions. There are also properties that allow the user to get the current translations and rotations for each axis. After the user has done all that, simply call the "RenderObject" routine and bamm!
In the "LoadObject" function you must supply a file path and an device context (picture box) along with initial values you would like set, such as the rotation, scale factor and it's world position.
In the "SetRotations" function there is three parameters. One for the X, Y and Z values. Only supply the one that you want to change. The same goes for the "SetTranslations" function.
There are no parameters for "RenderObject". Enjoy :-)

Comments
great
Posted by edoov5153 on 03/06/2006 08:24pmexcellent work
Replyis there a odf file format description out?
Posted by Legacy on 08/08/2000 12:00amOriginally posted by: Andr�
Hello
I want to create a grid of rectangles using odf files so that your wonderful app can display it. (the wireframe only)
But on the net I could not find any documentation about the format of such an odf file.
So my question is: Is there any documentation about odf files?
Thank you!
Andr�
-
Replyodf description
Posted by chams on 09/14/2004 09:02pmodf is not a standard file system. But it works in this way : #1 Header #2 Version #3 Object #4 <-Empty line-> separator #5 to n the next n lines are the points drawing the object (Called vertices by the author). One line per point, (x,y,z). In this sample : 1,1,-1 'point A 1,-1,-1 'point B -1,-1,-1 'point C -1,1,-1 'point D 1,1,1 'point E 1,-1,1 'point F -1,-1,1 'point G -1,1,1 'point H <-Empty line-> separator the following lines ares in fact triangles, refering to the index of the points, follow by the triangle's color. Each triangle must be connect to the previous with two points. In the sample : 0,1,2,255 'refer to points index 0, 1 and 2 ie : A,B,C,colorValue(Long) 2,3,0,255 'refer to C,D,A connect to the previous by A and C, etc... 3,2,6,16776960 6,7,3,16776960 7,6,5,16711935 5,4,7,16711935 4,5,1,65280 1,0,4,65280 4,0,3,0 3,7,4,0 1,5,6,16777215 6,2,1,16777215 With a total of 12 triangles forming the 6 faces of the cube (each face of the cube is draw by 2 triangles) Last Line : END : Quit the loading loop. I think it's possible to do a object converter from Povray's raw-triangles output, because it is a list of triangles connect to the other by to points ;-)) chams
Replyemail changed
Posted by Legacy on 07/31/2000 12:00amOriginally posted by: Chris
My email has changed for those who care... :-)
Chris Abbott
Reply3D Rotating Objects Demo
Posted by Legacy on 05/03/2000 12:00amOriginally posted by: mor
I treid to load in VB5, but I got the Msg:
ReplyRetained is an invalid key
Project1.vbp cant be loaded.
Please help
thanks
mor
Note from Author...
Posted by Legacy on 03/03/2000 12:00amOriginally posted by: Chris Abbott
I add new version and other interesting stuff Here: alccentral.cjb.net
ReplyFantastic & Really superb chris
Posted by Legacy on 02/28/2000 12:00amOriginally posted by: Sathish Balasubramaniam
Good Show & Great Mind
ReplyWhat a wonderfull creation
Posted by Legacy on 01/21/2000 12:00amOriginally posted by: Rick
I think that the author is an increadibly tallented progrmer
Replyand deserves praise for their work
1815.shtml
Posted by Legacy on 12/27/1999 12:00amOriginally posted by: Magnus G�venal
Very smooth ....
ReplyRendering multiple cubes that overlap.
Posted by Legacy on 11/26/1999 12:00amOriginally posted by: Pino Carafa
-
Reply3D program using c++
Posted by em_1031609 on 03/12/2008 07:38amcan you help me write a code in c++ for 3D objects... A code for rotating 3D objects in x, y, and z axes... thanks...!
Reply:-)
Posted by Legacy on 11/25/1999 12:00amOriginally posted by: Faris
OPPPSSSSsss :o)
ReplyLoading, Please Wait ...