Documentation update
- updated Doxyfile - added/changed file, dir and namespace descriptions - fixed some errors in doxygen tagsdev-ui
parent
7f80ca2971
commit
1996507fd3
|
@ -1,3 +1,4 @@
|
|||
src/app
|
||||
|
||||
Contains the main class of the application.
|
||||
/**
|
||||
* \dir app
|
||||
* Main class of the application and system functions
|
||||
*/
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// app.h
|
||||
/**
|
||||
* \file app/app.h
|
||||
* \brief CApplication class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// main.cpp
|
||||
/**
|
||||
* \file app/main.cpp
|
||||
* \brief Entry point of application - main() function
|
||||
*/
|
||||
|
||||
#include "app/app.h"
|
||||
#include "app/system.h"
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// system.h
|
||||
/**
|
||||
* \file app/system.h
|
||||
* \brief System functions: time stamps, info dialogs, etc.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -26,7 +29,7 @@
|
|||
/* Dialog utils */
|
||||
|
||||
/**
|
||||
* \enum SysDialogType
|
||||
* \enum SystemDialogType
|
||||
* \brief Type of system dialog
|
||||
*/
|
||||
enum SystemDialogType
|
||||
|
@ -44,7 +47,7 @@ enum SystemDialogType
|
|||
};
|
||||
|
||||
/**
|
||||
* \enum SysDialogResult
|
||||
* \enum SystemDialogResult
|
||||
* \brief Result of system dialog
|
||||
*
|
||||
* Means which button was pressed.
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// system_linux.h
|
||||
/**
|
||||
* \file app/system_linux.h
|
||||
* \brief Linux-specific implementation of system functions
|
||||
*/
|
||||
|
||||
/* This header contains Linux-specific code for system utils
|
||||
from system.h. There is no separate .cpp module for simplicity.*/
|
||||
/* NOTE: code is contained in this header;
|
||||
* there is no separate .cpp module for simplicity */
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// system_other.h
|
||||
/**
|
||||
* \file app/system_other.h
|
||||
* \brief Fallback code for other systems
|
||||
*/
|
||||
|
||||
/* This header contains fallback code for other platforms for system utils
|
||||
from system.h. There is no separate .cpp module for simplicity.*/
|
||||
/* NOTE: code is contained in this header;
|
||||
* there is no separate .cpp module for simplicity */
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// system_windows.h
|
||||
/**
|
||||
* \file app/system_windows.h
|
||||
* \brief Windows-specific implementation of system functions
|
||||
*/
|
||||
|
||||
/* This header contains Windows-specific code for system utils
|
||||
from system.h. There is no separate .cpp module for simplicity.*/
|
||||
/* NOTE: code is contained in this header;
|
||||
* there is no separate .cpp module for simplicity */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
src/common
|
||||
|
||||
Contains headers and modules with common structs and enums.
|
||||
/**
|
||||
* \dir common
|
||||
* \brief Structs and utils shared throughout the application
|
||||
*/
|
||||
|
|
|
@ -57,36 +57,36 @@ class CLogger : public CSingleton<CLogger>
|
|||
~CLogger();
|
||||
|
||||
/** Write message to console or file
|
||||
* @param const char str - message to write
|
||||
* @param str - message to write
|
||||
* @param ... - additional arguments
|
||||
*/
|
||||
void Message(const char *str, ...);
|
||||
|
||||
/** Write message to console or file with LOG_INFO level
|
||||
* @param const char str - message to write
|
||||
* @param str - message to write
|
||||
* @param ... - additional arguments
|
||||
*/
|
||||
void Info(const char *str, ...);
|
||||
|
||||
/** Write message to console or file with LOG_WARN level
|
||||
* @param const char str - message to write
|
||||
* @param str - message to write
|
||||
* @param ... - additional arguments
|
||||
*/
|
||||
void Warn(const char *str, ...);
|
||||
|
||||
/** Write message to console or file with LOG_ERROR level
|
||||
* @param const char str - message to write
|
||||
* @param str - message to write
|
||||
* @param ... - additional arguments
|
||||
*/
|
||||
void Error(const char *str, ...);
|
||||
|
||||
/** Set output file to write logs to
|
||||
* @param std::string filename - output file to write to
|
||||
* @param filename - output file to write to
|
||||
*/
|
||||
void SetOutputFile(std::string filename);
|
||||
|
||||
/** Set log level. Logs with level below will not be shown
|
||||
* @param LogType level - minimum log level to write
|
||||
* @param level - minimum log level to write
|
||||
*/
|
||||
void SetLogLevel(LogType level);
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
src/graphics
|
||||
/**
|
||||
* \dir graphics
|
||||
* \brief Graphics engine
|
||||
*/
|
||||
|
||||
Graphics engine
|
||||
/**
|
||||
* \namespace Gfx
|
||||
* \brief Namespace for (new) graphics code
|
||||
*
|
||||
* This namespace was created to avoid clashing with old code, but now it still serves,
|
||||
* defining a border between pure graphics engine and other parts of application.
|
||||
*/
|
|
@ -1,6 +1,7 @@
|
|||
src/graphics/core
|
||||
|
||||
Abstract core of graphics engine
|
||||
|
||||
Core types, enums, structs and CDevice abstract class that define
|
||||
the abstract graphics device used in graphics engine
|
||||
/**
|
||||
* \dir graphics/core
|
||||
* \brief Abstract core of graphics engine
|
||||
*
|
||||
* Core types, enums, structs and CDevice abstract class that define
|
||||
* the abstract graphics device used in graphics engine
|
||||
*/
|
|
@ -14,7 +14,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// color.h
|
||||
/**
|
||||
* \file graphics/core/color.h
|
||||
* \brief Color structs and related functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// device.h
|
||||
/**
|
||||
* \file graphics/core/device.h
|
||||
* \brief Abstract graphics device - Gfx::CDevice class and related structs/enums
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// light.h
|
||||
/**
|
||||
* \file graphics/core/light.h
|
||||
* \brief Light struct and related enums
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// material.h
|
||||
/**
|
||||
* \file graphics/core/material.h
|
||||
* \brief Material struct
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// texture.h
|
||||
/**
|
||||
* \file graphics/core/texture.h
|
||||
* \brief Texture struct and related enums
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// vertex.h
|
||||
/**
|
||||
* \file graphics/core/vertex.h
|
||||
* \brief Vertex structs
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
src/graphics/d3d
|
||||
|
||||
Possible future DirectX implementation of graphics engine
|
||||
/**
|
||||
* \dir graphics/d3d
|
||||
* \brief Possible future DirectX implementation of graphics engine
|
||||
*/
|
|
@ -1,8 +1,9 @@
|
|||
src/graphics/engine
|
||||
|
||||
Graphics engine
|
||||
|
||||
CEngine class and various other classes implementing the main features
|
||||
of graphics engine from model loading to decorative particles
|
||||
|
||||
Graphics operations are done on abstract interface from src/graphics/core
|
||||
/**
|
||||
* \dir graphics/engine
|
||||
* \brief Graphics engine
|
||||
*
|
||||
* CEngine class and various other classes implementing the main features
|
||||
* of graphics engine from model loading to decorative particles
|
||||
*
|
||||
* Graphics operations are done on abstract interface from src/graphics/core
|
||||
*/
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// camera.h
|
||||
/**
|
||||
* \file graphics/engine/camera.h
|
||||
* \brief Camera handling - Gfx::CCamera class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// cloud.h
|
||||
/**
|
||||
* \file graphics/engine/cloud.h
|
||||
* \brief Cloud rendering - Gfx::CCloud class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// engine.h
|
||||
/**
|
||||
* \file graphics/engine/engine.h
|
||||
* \brief Main graphics engine - Gfx::CEngine class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// lightman.h
|
||||
/**
|
||||
* \file graphics/engine/lightman.h
|
||||
* \brief Dynamic light manager - Gfx::CLightManager class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// lightning.h (aka blitz.h)
|
||||
/**
|
||||
* \file graphics/engine/lightning.h
|
||||
* \brief Lightning rendering - Gfx::CLightning class (aka blitz)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// modelfile.h (aka modfile.h)
|
||||
/**
|
||||
* \file graphics/engine/modelfile.h
|
||||
* \brief Model loading - Gfx::CModelFile class (aka modfile)
|
||||
*/
|
||||
|
||||
#include "graphics/engine/engine.h"
|
||||
#include "graphics/core/vertex.h"
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// particle.h (aka particule.h)
|
||||
/**
|
||||
* \file graphics/engine/particle.h
|
||||
* \brief Particle rendering - Gfx::CParticle class (aka particule)
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// planet.h
|
||||
/**
|
||||
* \file graphics/engine/planet.h
|
||||
* \brief Planet rendering - Gfx::CPlanet class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// pyro.h
|
||||
/**
|
||||
* \file graphics/engine/pyro.h
|
||||
* \brief Fire effect rendering - Gfx::CPyro class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// terrain.h
|
||||
/**
|
||||
* \file graphics/engine/terrain.h
|
||||
* \brief Terrain rendering - Gfx::CTerrain class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// text.h
|
||||
/**
|
||||
* \file graphics/engine/text.h
|
||||
* \brief Text rendering - Gfx::CText class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// water.h
|
||||
/**
|
||||
* \file graphics/engine/water.h
|
||||
* \brief Water rendering - Gfx::CWater class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
src/graphics/opengl
|
||||
|
||||
OpenGL engine implementation
|
||||
|
||||
Contains the concrete implementation using OpenGL of abstract CDevice class
|
||||
from src/graphics/core
|
||||
/**
|
||||
* \dir graphics/opengl
|
||||
* \brief OpenGL engine implementation
|
||||
*
|
||||
* Contains the concrete implementation using OpenGL of abstract CDevice class
|
||||
* from src/graphics/core
|
||||
*/
|
|
@ -14,7 +14,10 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
// gldevice.h
|
||||
/**
|
||||
* \file graphics/opengl/gldevice.h
|
||||
* \brief OpenGL implementation - Gfx::CGLDevice class
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
src/math
|
||||
/**
|
||||
* \dir math
|
||||
* \brief Common mathematical structures and functions
|
||||
*/
|
||||
|
||||
Contains common mathematical structures and functions.
|
||||
/**
|
||||
* \namespace Math
|
||||
* \brief Namespace for (new) math code
|
||||
*
|
||||
* This namespace was created to avoid clashing with old code, but now it still serves,
|
||||
* defining a border between math and non-math-related code.
|
||||
*/
|
|
@ -14,14 +14,13 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathAllModule math/all.h
|
||||
Includes all other math module headers.
|
||||
/**
|
||||
* \file math/all.h
|
||||
* \brief Includes all other math module headers
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
#include "const.h"
|
||||
#include "func.h"
|
||||
#include "point.h"
|
||||
|
@ -30,5 +29,3 @@
|
|||
#include "geometry.h"
|
||||
|
||||
#include "conv.h"
|
||||
|
||||
/* @} */ // end of group
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathConstModule math/const.h
|
||||
Contains the math constants used in math functions.
|
||||
/**
|
||||
* \file math/const.h
|
||||
* \brief Constants used in math functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -26,7 +27,6 @@
|
|||
// Math module namespace
|
||||
namespace Math
|
||||
{
|
||||
/* @{ */ // start of group
|
||||
|
||||
//! Tolerance level -- minimum accepted float value
|
||||
const float TOLERANCE = 1e-6f;
|
||||
|
@ -50,6 +50,5 @@ const float RAD_TO_DEG = 57.29577951308232286465f;
|
|||
//! Natural logarithm of 2
|
||||
const float LOG_2 = log(2.0f);
|
||||
|
||||
/* @} */ // end of group
|
||||
}; // namespace Math
|
||||
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathFuncModule math/func.h
|
||||
Contains common math functions.
|
||||
/**
|
||||
* \file math/func.h
|
||||
* \brief Common math functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -31,8 +32,6 @@
|
|||
namespace Math
|
||||
{
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
//! Compares \a a and \a b within \a tolerance
|
||||
inline bool IsEqual(float a, float b, float tolerance = Math::TOLERANCE)
|
||||
{
|
||||
|
@ -188,11 +187,13 @@ inline float Direction(float a, float g)
|
|||
|
||||
//! Managing the dead zone of a joystick.
|
||||
/**
|
||||
\verbatimin: -1 0 1
|
||||
\verbatim
|
||||
in: -1 0 1
|
||||
--|-------|----o----|-------|-->
|
||||
<---->
|
||||
dead
|
||||
out: -1 0 0 1\endverbatim */
|
||||
out: -1 0 0 1
|
||||
\endverbatim */
|
||||
inline float Neutral(float value, float dead)
|
||||
{
|
||||
if ( fabs(value) <= dead )
|
||||
|
@ -226,7 +227,8 @@ inline float Smooth(float actual, float hope, float time)
|
|||
|
||||
//! Bounces any movement
|
||||
/**
|
||||
\verbatimout
|
||||
\verbatim
|
||||
out
|
||||
|
|
||||
1+------o-------o---
|
||||
| o | o o | | bounce
|
||||
|
@ -235,7 +237,8 @@ inline float Smooth(float actual, float hope, float time)
|
|||
| o | |
|
||||
-o------|-------+----> progress
|
||||
0| | 1
|
||||
|<---->|middle\endverbatim */
|
||||
|<---->|middle
|
||||
\endverbatim */
|
||||
inline float Bounce(float progress, float middle = 0.3f, float bounce = 0.4f)
|
||||
{
|
||||
if ( progress < middle )
|
||||
|
@ -250,6 +253,4 @@ inline float Bounce(float progress, float middle = 0.3f, float bounce = 0.4f)
|
|||
}
|
||||
}
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathGeometryModule math/geometry.h
|
||||
Contains math functions related to 3D geometry calculations,
|
||||
transformations, etc.
|
||||
/**
|
||||
* \file math/geometry.h
|
||||
* \brief Math functions related to 3D geometry calculations, transformations, etc.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -36,9 +36,6 @@
|
|||
namespace Math
|
||||
{
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
|
||||
//! Returns py up on the line \a a - \a b
|
||||
inline float MidPoint(const Math::Point &a, const Math::Point &b, float px)
|
||||
{
|
||||
|
@ -566,6 +563,4 @@ inline Math::Vector RotateView(Math::Vector center, float angleH, float angleV,
|
|||
return eye+center;
|
||||
}
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -14,18 +14,18 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathIntPointModule math/intpoint.h
|
||||
Contains the IntPoint struct.
|
||||
/**
|
||||
* \file math/intpoint.h
|
||||
* \brief IntPoint struct
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Math {
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
/**
|
||||
* \struct IntPoint 2D Point with integer coords
|
||||
* \struct IntPoint
|
||||
* \brief 2D Point with integer coords
|
||||
*
|
||||
* Analog of WinAPI's POINT struct.
|
||||
*/
|
||||
|
@ -39,6 +39,4 @@ struct IntPoint
|
|||
IntPoint(int aX = 0, int aY = 0) : x(aX), y(aY) {}
|
||||
};
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathMatrixModule math/matrix.h
|
||||
Contains the Matrix struct and related functions.
|
||||
/**
|
||||
* \file math/matrix.h
|
||||
* \brief Matrix struct and related functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -32,8 +33,6 @@
|
|||
namespace Math
|
||||
{
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
/** \struct Matrix math/matrix.h
|
||||
\brief 4x4 matrix
|
||||
|
||||
|
@ -42,11 +41,12 @@ namespace Math
|
|||
|
||||
The internal representation is a 16-value table in column-major order, thus:
|
||||
|
||||
\verbatim
|
||||
\verbatim
|
||||
m[0 ] m[4 ] m[8 ] m[12]
|
||||
m[1 ] m[5 ] m[9 ] m[13]
|
||||
m[2 ] m[6 ] m[10] m[14]
|
||||
m[3 ] m[7 ] m[11] m[15] \endverbatim
|
||||
m[3 ] m[7 ] m[11] m[15]
|
||||
\endverbatim
|
||||
|
||||
This representation is native to OpenGL; DirectX requires transposing the matrix.
|
||||
|
||||
|
@ -405,11 +405,15 @@ inline Math::Matrix MultiplyMatrices(const Math::Matrix &left, const Math::Matri
|
|||
}
|
||||
|
||||
//! Calculates the result of multiplying m * v
|
||||
/** The multiplication is performed thus:
|
||||
\verbatim [ m.m[0 ] m.m[4 ] m.m[8 ] m.m[12] ] [ v.x ]
|
||||
/**
|
||||
The multiplication is performed thus:
|
||||
|
||||
\verbatim
|
||||
[ m.m[0 ] m.m[4 ] m.m[8 ] m.m[12] ] [ v.x ]
|
||||
[ m.m[1 ] m.m[5 ] m.m[9 ] m.m[13] ] [ v.y ]
|
||||
[ m.m[2 ] m.m[6 ] m.m[10] m.m[14] ] * [ v.z ]
|
||||
[ m.m[3 ] m.m[7 ] m.m[11] m.m[15] ] [ 1 ] \endverbatim
|
||||
[ m.m[3 ] m.m[7 ] m.m[11] m.m[15] ] [ 1 ]
|
||||
\endverbatim
|
||||
|
||||
The result, a 4x1 vector is then converted to 3x1 by dividing
|
||||
x,y,z coords by the fourth coord (w). */
|
||||
|
@ -434,6 +438,4 @@ inline Math::Vector MatrixVectorMultiply(const Math::Matrix &m, const Math::Vect
|
|||
return Math::Vector(x, y, z);
|
||||
}
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathPointModule math/point.h
|
||||
Contains the Point struct and related functions.
|
||||
/**
|
||||
* \file math/point.h
|
||||
* \brief Point struct and related functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -31,8 +32,6 @@
|
|||
namespace Math
|
||||
{
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
/** \struct Point math/point.h
|
||||
\brief 2D point
|
||||
|
||||
|
@ -188,6 +187,4 @@ inline float Distance(const Point &a, const Point &b)
|
|||
return sqrtf((a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y));
|
||||
}
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
// * You should have received a copy of the GNU General Public License
|
||||
// * along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
|
||||
/** @defgroup MathVectorModule math/vector.h
|
||||
Contains the Vector struct and related functions.
|
||||
/**
|
||||
* \file math/vector.h
|
||||
* \brief Vector struct and related functions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -31,8 +32,6 @@
|
|||
namespace Math
|
||||
{
|
||||
|
||||
/* @{ */ // start of group
|
||||
|
||||
/** \struct Vector math/vector.h
|
||||
\brief 3D (3x1) vector
|
||||
|
||||
|
@ -263,6 +262,4 @@ inline float Distance(const Math::Vector &a, const Math::Vector &b)
|
|||
(a.z-b.z)*(a.z-b.z) );
|
||||
}
|
||||
|
||||
/* @} */ // end of group
|
||||
|
||||
}; // namespace Math
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
src/object
|
||||
|
||||
Contains modules of robots and buildings.
|
||||
/**
|
||||
* \dir object
|
||||
* \brief Game engine
|
||||
*
|
||||
* Contains the main class of game engine - CRobotMain and the various in-game objects:
|
||||
* CObject and related auto, motion and task subclasses.
|
||||
*/
|
|
@ -1,3 +1,4 @@
|
|||
src/physics
|
||||
|
||||
Contains the physics module.
|
||||
/**
|
||||
* \dir physics
|
||||
* \brief Physics engine
|
||||
*/
|
|
@ -1,3 +1,4 @@
|
|||
src/sound
|
||||
|
||||
Contains the sound module - for playing sounds and music.
|
||||
/**
|
||||
* \dir sound
|
||||
* \brief Sound module - playing sounds and music
|
||||
*/
|
|
@ -1,3 +1,4 @@
|
|||
src/ui
|
||||
|
||||
Contains modules responsible for displaying the user interface controls (from game menus and HUD).
|
||||
/**
|
||||
* \dir ui
|
||||
* \brief 2D user interface controls
|
||||
*/
|
Loading…
Reference in New Issue