Milestone 2 - Version 0.15 - 11/02/2010 -------------------------------- Foreword -------- This milestone documentation gives its target functionality and then further describes achieved core functionality. In the code additions section, additions are split into their catagories (usually classes/structures). Functions are defined with the suffix '()'. To further reference the milestone documentation to the source code, I have included a small notation to functions in the comments e.g. "M1" which relates to milestone 1, "M2" which relates to milestone 2, etc. This gives a further understanding as to when the function was added. Target Functionality -------------------- - Camera System - 3D Object storage - Basic geometry constructor - Light bank/collection - Line drawing New Functionality ----------------- - Camera system - 3D Object storage and creation - Lighting management (yet to actively turn on/off lights based on position) - Line drawing - Cube/Plane/Double-sided plane creation - Mesh Object rendering Code Additions -------------- - Camera: - Class created - Constructor: Defaults a position of (0,0,0) and default Up/Look/Right vectors, overloads to allow custom XYZ position - SetPosition(): Sets the position using XYZ input, variations include SetPositionX(), SetPositionY() and SetPositionZ() that set only a single coordinate - GetPosition(): Gets the position, variations include single XYZ returns as above - SetRotation(): Sets the rotation using XYZ input, variations include single XYZ inputs as above - GetRotation(): Gets the rotation, variations include single XYZ returns as above - GetViewMatrix(): Creates a view matrix from the held data and returns the D3DXMATRIX - Graphics: - UpdateCamera(): Sets the view matrix to that of the main camera - SetCameraPosition(): Sets the main camera's position - SetCameraRotation(): Sets the main camera's rotation - DrawLine(): Draws a 3D line on the screen using specified XYZ coordinates and RGB colour - CreatePointLight(): Creates a point light using specified parameters - SetPointLightPosition(): Sets the position of a point light in the collection - LightCollectionLength(): Returns the number of lights in the scene - RenderMeshObject(): Draws a MeshObject on the screen based on index - CreateCube(): Adds a cube to the collection of MeshObjects - CreatePlane(): Adds a plane to the collection of MeshObjects - CreateDoublePlane(): Adds a double-sided plane to the collection of MeshObjects - GetNumMeshObjects(): Returns the size of the MeshObject collection - MeshObject: - Class created - Draw(): Draws the objects to the screen during the render process using a transform matrix - SetMesh(): Replaces the mesh with a user-defined mesh - CreateD3DCubeMesh(): Replaces the mesh with a cube created using D3DX functionality - CreateCubeMesh(): Replaces the mesh with a cube - CreatePlaneMesh(): Replaces the mesh with a plane - CreateDoublePlaneMesh(): Replaces the mesh with a double-sided plane - GetBounds(): Finds the maximum and minimum bounds of the mesh - DataOut(): Outputs filename, and vertex/index data to the output panel Tests ----- WIP Notes ----- Targets for the next milestone concentrate on further increasing the functionality graphics component including but not limited to; X mesh loading, sprite drawing, texturing and shaders.