3D Rotating Objects Demo | CodeGuru

3D Rotating Objects Demo

This demo show how to do transformations on, solid and wire-frame, 3d objects. 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 […]

Written By
CodeGuru Staff
CodeGuru Staff
Jan 29, 2004
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

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)

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.