Answered # How do I control 3d models with c++?

daviddoria 334 mike_2000_17 2,669 PixelExchange Discussion Starter punchinello Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...

0

I use VTK for everything 3D (vtk.org). You ask for c++ and VB in the same sentence though - which would you prefer?

0

Well basically, for rendering it (displaying it) there are two main libraries, OpenGL and Direct3D. I am familiar with OpenGL, which also has a few possibly useful utility tools like GLUT (some extra functions, and cross-platform windows), GLUI (some functions for User Interfaces), and OpenInventor (for some tools to load models, display simple 3D objects and their 3D transformations). Basic tutorials for OpenGL from NEHE are very helpful to start, and it has example code mainly in C++, but also in about two dozen other programming languages.. it's all pretty much the same anyway. They will also show how to apply the translation and rotation transformations.

For moving 3D objects, there are two things to handle, translation and rotation. The former is a piece of cake, the latter can be a real nightmare. All renderers use homogeneous transformation matrices for both modelview (the motion of the 3D models) and projection (project models onto a 2D screen with a 3D look). So to learn about it, you should look into "representation of 3D rotations" and "the homogeneous transformation matrix", but I warn you, it's a bit of mathematics and geometry. I personally rely almost exclusively on quaternions for rotation, but there are options like the rotation matrix or Euler angles or Euler axis/angle which are also possible. It depends on what you want to do. For static pose of models, they are all pretty OK. If you want to do some movement (time integration of 3D rotational motion), then quaternions are the best choice by far, but they are a bit hard to grasp at first, in that case, the rotation matrix is also a good alternative.

Finally, what do you mean by 3D model? Do you want to control the movement of different parts of it and stuff? This will be quite a bit more math, look up "kinematic chains", "skeletal animation" and "rag-doll models". And techniques to render them include the old-school method of splitting the model into parts and figuring out their individual transformations, or a fancier method called "skinning" (which involves vertex shaders, a semi-advanced concept in 3D rendering). But there must be free libraries that accomplish all that already, that I am not familiar with (my knowledge of 3D game programming is a bit outdated). VTK does look very sweet!

*Edited 6 Years Ago by mike_2000_17*: n/a

0

If you are talking about "pre-made" 3d models, such as .3ds, .obj, etc, your best bet is going to be: http://spacesimulator.net Otherwise, you can google search: Displaying .3ds with OpenGL/C++. (replace .3ds with the type of 3d file you are using)

(Please note: You are going to HAVE to learn OpenGL or Direct X at some point to be able to manipulate pre-made 3d models, or any other type of 3d models for that matter).

*Edited 6 Years Ago by PixelExchange*: n/a

0

Sorry davi sir but I think I meant "vc6.0". Must have misspelled it. :P And thank you all! That's very kind of you! Your suggestions are so detailed and very helpful. Guess I'll try to start with those. Thanks again! :D

This question has already been answered. Start a new discussion instead.

Recommended Articles

When I execute this progammatically, I get a table with row heights much larger than when I do this manually.

Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table.

```
public void AddClipboard()
{
Sel.PasteExcelTable(false,false, false);
var t = Sel.Tables[Sel.Tables.Count];
t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent);
}
```

the function that I created to find the ...