3D Rotating Objects Demo

Thursday Jan 29th 2004 by Chris Abbott
Share:

Learn how to do transformations on solid and wire-frame 3D objects. (Added: 01-Jun-1999)

This demo show how to do transformations on, solid and wire-frame, 3d objects.

Image 1

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 :-)

Download Zipped Project File (16k)

Share:
Home
Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved