Click here to Skip to main content
Click here to Skip to main content

A beginning DirectX application using MFC.

, 29 Mar 2004
Rate this:
Please Sign up or sign in to vote.
Lets user create and manipulate 3D DirectX models.

Sample screenshot

Introduction

This project lets you create 3D models using DirectX's helper functions. You're also able to manipulate pre-made .x files. You can also save the models you create yourself as .x files in binary, compressed, or text format. I started off using the DirectX 8 SDK. I now have version 9 and have changed required #includes to make it work.

Background

I ordered a book a few months ago that came with a CD with a demo version of a 3D modeling package, but I didn't get the CD. So I decided to try to write my own. Never thought that it would take as much as it did! This is by no means a fully functional 3D modeling program. But for anybody interested in DirectX game programming, maybe they can look at some of my code (as beginner-level as it is) and it'll help them.

Using the code

All of the objects are derived from a class, CMesh which is a wrapper for DirectX's mesh object. There is a CScene object used for containment of all the mesh objects. CScene has a method called Render() which loops through all of the CMesh- derived objects and draws them to the screen. The picture box that I'm using as a device for the Direct3D presentation of the objects was derived from class CStatic and drawn dynamically so that you can get the events that you wouldn't normally get with a regular picture box. The toolbars are drawn with the help of code that was obtained from MSDN. To display an object, click the object type you want to draw first, then click 'Add object' button. Anytime after the object is selected, you may click on options to change different characteristics of the object. There is no support for textures or animation. To rotate an object more freely, you should click the appropriate rotate button, then since it is now default, hold down 'Enter' button on your keyboard to prevent having to click button again. When copying and pasting an object, click one of the translation buttons to see the object move, since new object will be copied directly in the same spot as the previous object. You can only perform operations on the current object.

Points of Interest

I had a problem when moving from one hard drive to another with the path to my mfc\include directory specified in the Modeler.hpj file. No doubt your path is different also. You'll have to manually edit the text of that file to point to the correct folder.

History

First release - I don't really plan on finishing it, but I just hope it helps anyone the way it is!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

BlackDice
Web Developer
United States United States
Started off with vb6 Smile | :) and am self-taught at C++, FoxPro, DirectX, etc. I'm currently developing with VFP9 and C# in desktop apps, webservices, telephony apps.

Comments and Discussions

 
QuestionDirectX Panel Hangs Pinmemberfarhanmirzaaa9-Jun-13 22:43 
GeneralMy vote of 5 PinmemberJJMatthews12-Feb-13 23:03 
GeneralMy vote of 1 Pinmembervvidov7-Feb-13 4:51 
GeneralMissing files PinmemberDavid_Leikis26-Apr-05 4:27 
GeneralRe: Missing files PinmemberBlackDice26-Apr-05 11:22 
General3D in my application PinmemberGeorgi Petrov16-Jan-05 23:55 
GeneralRe: 3D in my application - errors PinmemberGeorgi Petrov17-Jan-05 0:13 
GeneralRe: 3D in my application - errors PinmemberBlackDice18-Jan-05 2:48 
GeneralRe: 3D in my application - errors PinmemberAnki NI25-Jun-07 20:13 
GeneralOne more question: libci.lib PinmemberKenan Hrustanovic10-Jul-04 10:52 
Hi again,
 
I could not find this file 'libci.lib' on my computer. It is not a part of VS .NET 2003 or of your project. Following error mesage:
 
LINK : fatal error LNK1104: cannot open file 'libci.lib'
 
Could you tell me where this file can be downloaded or how can I buid the library?
 
Thanks!
GeneralRe: One more question PinmemberKenan Hrustanovic10-Jul-04 11:41 
GeneralGreat Work! : Selecting of previous objects PinmemberKenan Hrustanovic10-Jul-04 10:10 
GeneralA question !! Pinmemberchenbuaa7-Jun-04 17:11 
GeneralRe: A question !! Pinmemberbdiamond8-Jun-04 3:45 
Generalhi man Pinmemberabufool23-May-04 4:36 
Generalhi Pinmemberabufool21-May-04 9:33 
GeneralRe: hi Pinmemberbdiamond21-May-04 9:35 
GeneralRe: hi Pinmemberabufool21-May-04 10:18 
GeneralRe: hi Pinmemberbdiamond21-May-04 10:40 
Generaldisapointed by the comments Pinmembertoxcct4-May-04 10:36 
GeneralRe: disapointed by the comments Pinmemberbdiamond4-May-04 10:42 
Generalabufool Pinmemberbdiamond30-Apr-04 2:52 
GeneralRe: abufool Pinmemberabufool30-Apr-04 8:13 
GeneralRe: abufool Pinmemberbdiamond30-Apr-04 8:20 
GeneralGreat! Pinmembertwisterjosh10-Apr-04 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 30 Mar 2004
Article Copyright 2004 by BlackDice
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid