3d Interface Mechanics

 

Choosing a Language:

I chose to use C# for my 3d interface because the language works very conveniently with the DirectX API. Initialization is simple and the code produced is very clean. I decided that performance didn’t matter on behalf of the base program, but rather in the vertex / pixel shaders. The only calculations in the base program are simple vector and matrix mathematics. Therefore, I decided that C++ wasn’t needed and it would create more of a burden than a performance advantage.

 

The base 3d Control:

The base class of my 3d interface library is the Control3D class. This class contains properties, methods, and events that all controls in my library have in common.

 

Here are a few key properties:

 

 

Here are a few key methods:

 

 

The Form3D Control:

Just as a 2D application needs a form to contain all of its controls, so does a 3D application. The Form3D control is the container for every control added to the application. It handles things such as mouse movements and clicks. These calculations are quite involved because the class is essentially taking mouse movements and clicks in a 2D plane and transforming them to 3D space. The calculations make use of vectors, rays, and 3D geometry to see if the mouse is over or has been clicked on a 3D control.

 

Other classes used by my 3D interface:

To give the interface a heightened sense of interactivity and 3D space, I decided to incorporate dynamic shading changes through pixel shaders and 3D movement including rotation. In order to implement these things, I created classes to make these processes easier. Two of these classes are the TimeCycle class and the VectorMorph class.