/* EngineInterface.h Written by Matthew Fisher Many objects are universal and don't need to change often. The source for all such files are included in this file. Most people would compile all these into a single *.lib or *.dll, but I prefer to keep all my source readily accessible. */ /****************************/ /* Core Functions */ /****************************/ //These are generic functions that have no specific place anywhere else. //Shell definition of several classes/structures. Necessary because some classes are cross-referencing #include "EngineInterface\Core Functions\ClassList.h" //All #includes that are generic or written by other people #include "EngineInterface\Core Functions\ExternalFiles.h" //Collection of useful constants, macros, and functions #include "EngineInterface\Core Functions\Stdhdr.h" //The Vector class contains dynamic arrays of a template type. This is equivalent to the Standard Template //Library's vector class, but for various reasons I like to have my own. #include "EngineInterface\Core Functions\ArrayVector.h" //The LinkedList class contains linked lists of a template type. There is also a STL equivalent that I //choose not to use. #include "EngineInterface\Core Functions\LinkedList.h" //definition of various keys. #include "EngineInterface\Core Functions\Keydefs.h" /****************************/ /* Math Structures */ /****************************/ //All forms of mathematical structures and functions are here. //Generic 32-bit RGBA color structure #include "EngineInterface\Graphics Structures\RGBColor.h" //Vector, which defines 3D and 4D vectors, is the most used set of functions anywhere in the project. #include "EngineInterface\Math Structures\Vector.h" //A standard 3D plane (space plane.) Essentially just the surface defined by a*x + b*y + c*z + d = 0 #include "EngineInterface\Math Structures\Plane.h" //a quaternion structure (a quaternion is used to reprsent rotations.) Currently, I haven't implemented this structure. #include "EngineInterface\Math Structures\Quaternion.h" //a 4x4 matrix structure. Used very often for affine vector transformations #include "EngineInterface\Math Structures\Matrix.h" //Perlin noise functions. Something I wrote a very long time ago; while functional it is both poorly written and inefficent. #include "EngineInterface\Math Structures\Perlin.h" //Generic non-linear optimizer. Uses conjugate gradient descent (or other inferior/sub-component algorithms like line search.) #include "EngineInterface\Math Structures\Optimizer.h" /****************************/ /* Graphics Structures */ /****************************/ //These are structures specific to computer graphics rendering //A bitmap class (a 2D array of RGBColor's) #include "EngineInterface\Graphics Structures\Bitmap.h" //A simple ZBuffer structure, for software rendering. Stores the depth of each screen pixel. #include "EngineInterface\Graphics Structures\ZBuffer.h" //MatrixController manages the 3 transformations (world, view, projection) central to the graphics pipeline #include "EngineInterface\Graphics Structures\MatrixController.h" //Camera represents a 3-D free floating camera. #include "EngineInterface\Graphics Structures\Camera.h" //Rendering functions for lines and polygons in software. Not very efficent. #include "EngineInterface\Graphics Structures\PrimitiveRender.h" //MeshVertex represents a single vertex in a mesh structure. #include "EngineInterface\Graphics Structures\MeshVertex.h" //Clipper is used to take an arbitrary polygon and clip it against the viewing frustrum. #include "EngineInterface\Graphics Structures\Clipper.h" //Viewport represents a rectangle on the screen used for rendering #include "EngineInterface\Graphics Structures\Viewport.h" /****************************/ /* Textures */ /****************************/ //These files all control rendering textured polygons through DirectX and OpenGL. //BaseTexture is an abstract class that defines base-level texture functionality. #include "EngineInterface\Textures\BaseTexture.h" //DirectX implementation of BaseTexture #include "EngineInterface\Textures\D3DTexture.h" //OpenGL implementation of BaseTexture #include "EngineInterface\Textures\OpenGLTexture.h" //Generic texture class that maps to either a DirectX or OpenGL texture based upon what the current window is using. #include "EngineInterface\Textures\Texture.h" /****************************/ /* Mesh Structures */ /****************************/ //These files all center around creating and manipulating triangle meshes. //These meshes are "simple" in that they contain no adjaceny information. //The HTable structure represents a geometric hash of 3-space used by BaseMesh for various indexing operations. #include "EngineInterface\Base Mesh\HTable.h" //BaseMesh is an abstract mesh class that defines basic mesh functionality. It also includes source for most //of the manipulation (shape generation, file loading, etc.) that is possible under this generic structure. #include "EngineInterface\Base Mesh\BaseMesh.h" //D3DMesh is a DirectX instance of the BaseMesh class #include "EngineInterface\Advanced Meshes\D3DMesh.h" //Mesh is a standard C++ array instance of the BaseMesh class. It's the only kind that can be used by OpenGL, //but it will run fine under DirectX as well (if not as quickly as a D3DMesh.) #include "EngineInterface\Advanced Meshes\Mesh.h" /************************************/ /* Subdivision Structures */ /************************************/ //These files all center around edge-based mesh structures and an implementation //of the loop subdivision algorithm that relies upon an edge-based structure. //definition of the Triangle structure #include "EngineInterface\Subdivision\Triangle.h" //Edge-based functions #include "EngineInterface\Subdivision\FullEdge.h" //functions for an indivudial vertex #include "EngineInterface\Subdivision\Vertex.h" //EdgeMesh class encapsulates and stores arrays of all components in the edge-based data structure #include "EngineInterface\Subdivision\EdgeMesh.h" /****************************/ /* Graphics Devices */ /****************************/ //A graphics device controls the interaction between Windows and a graphics API. //GraphicsDevice is the abstract class that contains functionality that all graphics devices must expose. //any GraphicsDevice can do simple things like render meshes into the main rendering window and handle //the world, view and projection transforms. #include "EngineInterface\Graphics Devices\GraphicsDevice.h" //a D3D instance of GraphicsDevice #include "EngineInterface\Graphics Devices\D3DGraphicsDevice.h" //a OpenGL instance of GraphicsDevice #include "EngineInterface\Graphics Devices\OpenGLGraphicsDevice.h" //a software instance of GraphicsDevice #include "EngineInterface\Graphics Devices\SoftwareGraphicsDevice.h" /****************************/ /* Composite Objects */ /****************************/ //Composite objects are objects that use combination of simple graphics objects //(such as meshes) towards various commonly used tasks //MovieExporter manages screen capture and exports as a sequence of images for compilation //into a movie. #include "EngineInterface\Composite Objects\MovieExporter.h" //XFileRenderer is a class that encapsulates loading XFiles, including all the material and texture data, //(although not the effect data) and rendering the resulting mesh. #include "EngineInterface\Composite Objects\XFileRenderer.h" //the Indicator class rapidly renders spheres or cylinders between arbitrary points in three space //by using stored mesh data and loading a new matrix each time a cylinder or sphere needs "indicating." //also can do basic viewing frustrum (camera) analysis or rendering. #include "EngineInterface\Composite Objects\Indicator.h" //VideoTexture is a DirectX-only object that allows you to use a video file as a source for textures in the scene. //Note the this creates another (very intensive) thread to the program that handles the decompression, //so applications should sleep for between 5 and 30 milliseconds each frame (just set the SleepBetweenFrames //variable in God.cpp.) #include "EngineInterface\Composite Objects\VideoTexture.h" /****************************/ /* Windows Controllers */ /****************************/ //These files handle the interaction between the application and Windows. This includes files that contain //WinMain and create the main application window. There is also a frame timer and a screen capture mechanism. //The frame timer reads the system time and maintains the frames per second counter. #include "EngineInterface\Windows Controller\FrameTimer.h" //Creating a new window involves having a callback function, WndProc, that is called whenever Windows has //an event to send to your window/application. EventHandler contains the WndProc file as well as the global //array of keys that tells which keys are current pressed/depressed. #include "EngineInterface\Windows Controller\EventHandler.h" //ScreenCapture is a class that handles capturing the current screen and automatically compressing it //in an acceptable quality "real-time" AVI file. Can use any codec installed on your computer. #include "EngineInterface\Windows Controller\ScreenCapture.h" //WindowManager handles creating and managing the application's main window #include "EngineInterface\Windows Controller\WindowManager.h" //The WinMain function itself. Just creates the God class and runs it. See God.h/God.cpp #include "EngineInterface\Windows Controller\WinMain.h"