jeff1956:How do I use your Camera class in my 3D game? I wish to replace the floor in the demo program with a 3D model loaded from DirectX mesh file.
I'm assuming you want to use the CameraComponent class.
Here's the basic steps:
1. Create an instance of the CameraComponent class and pass it your Game class.
CameraComponent camera = new CameraComponent(this);
2. Register the CameraComponent with the framework.
this.Components.Add(camera);
That's all there is to it. The framework will call the CameraComponent's Update() method once per frame to update the camera's state.
The CameraComponent class' constructor sets up a bunch of default keyboard mappings. These can be changed using the MapActionToKey() method.
There's a bunch of properties that you can call to retrieve important state information from the CameraComponent. The most important ones include: ProjectionMatrix, Position, ViewDirection, and ViewMatrix.
HTH.