Using Direct3D with VBBy Rod Stephens Direct3D: Good Coordination
There are several ways you might arrange the X, Y, and Z coordinate axes in three-dimensional space. Direct3D uses the left-handed coordinate system shown in Figure 1.
This system is called "left-handed" because you can use your left hand to remember which way the Z-axis points relative to the X- and Y-axes. Line your left wrist up with the origin, placing your fingers along the positive X-axis so they curl towards the positive Y-axis. If they curl towards the negative Y-axis, you need to flip your hand over. When your hand is in the right position, your thumb points towards the positive Z-axis. It is usually helpful to think of the axes arranged as they are shown in Figure 1. Here the X- and Y-axes are parallel to the computer monitor and the Z-axis goes back into the screen. You are sitting at some point with a positive Z coordinate. In many programs, it is convenient to place the objects you are drawing around the origin (0, 0, 0). You position the viewing position at (0, 0, -Z) for some negative Z value looking back towards the origin. The viewing position is also called the point of view, the POV, or the camera position. Often that is just the start and objects or the viewing position or both get moved when the program runs. The later articles Making a Scene and Simply Amazing demonstrate these techniques. Still, it can be very handy to think about your objects in these terms. It's also quite useful to draw a little diagram on paper before you start trying to create objects in code. When you need to orient triangles, a technique described in Getting Started, a diagram can save you hours of frustration.
|
Quick searches: Site Search | Advanced Site Search |
|
By using this site you agree to its terms and conditions VB Explorer and VBExplorer.com are trademarks of Exhedra Solutions, Inc. |