DGLE2   Young, strong and crazy!
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions
DGLE_Types.h File Reference

Engine types definition header. More...

#include <math.h>
#include <stack>

Classes

struct  GUID
 Engine interface unique identifier. More...
 
struct  TVariant
 
struct  TWindowMessage
 Structure with window event message information. More...
 
struct  TEngineWindow
 Describes the parameters of the main engine window and its behavior. More...
 
struct  TSystemInfo
 Describes user hardware and operating system. More...
 
struct  TPluginInfo
 Describes engine plugin information. More...
 
struct  TColor4
 Describes color in engine. More...
 
struct  TPoint2
 Describes point coordinates in 2D space. More...
 
struct  TPoint3
 Describes point coordinates in 3D space. More...
 
struct  TVertex2
 Describes graphical point coordinates, color and its texture coordinates in 2D space. More...
 
struct  TRectF
 Describes 2D rectangle by float values. More...
 
struct  TMatrix4x4
 Describes 4x4 matrix and some math routines used in 3D graphics computes. More...
 
class  TTransformStack< TTransform >
 Template for multiplication stacks. More...
 
struct  TMouseStates
 Describes the state of the mouse. More...
 
struct  TKeyboardStates
 Describes the state of the keyboard. More...
 
struct  TJoystickStates
 Describes the state of the joystick or gamepad. More...
 

Namespaces

namespace  DGLE
 Engines main namespace.
 

Macros

#define _USE_MATH_DEFINES
 
#define S_OK   ((DGLE_RESULT)0L)
 Return value of DGLE_RESULT type.
 
#define S_FALSE   ((DGLE_RESULT)1L)
 Return value of DGLE_RESULT type.
 
#define E_FAIL   ((DGLE_RESULT)0x80004005L)
 Return value of DGLE_RESULT type.
 
#define E_INVALIDARG   ((DGLE_RESULT)0x80070057L)
 Return value of DGLE_RESULT type.
 
#define E_ABORT   ((DGLE_RESULT)0x80004004L)
 Return value of DGLE_RESULT type.
 
#define E_NOTIMPL   ((DGLE_RESULT)0x80004001L)
 Return value of DGLE_RESULT type.
 
#define SUCCEEDED(res)   (((DGLE_RESULT)(res)) >= 0)
 Macros to check DGLE_RESULT value.
 
#define FAILED(res)   (((DGLE_RESULT)(res)) < 0)
 Macros to check DGLE_RESULT value.
 
#define RGBA(r, g, b, a)   ((uint32)(((uint8)(r) | ((uint32)((uint8)(g)) << 8)) | (((uint32)(uint8)(b)) << 16) | (((uint32)(uint8)(a)) << 24)))
 

Typedefs

typedef long int DGLE_RESULT
 Default return type for all DGLE methods.
 
typedef short int int16
 
typedef long int int32
 
typedef signed char int8
 
typedef wchar_t wchar
 
typedef unsigned int uint
 
typedef unsigned short int uint16
 
typedef unsigned long int uint32
 
typedef unsigned char uint8
 
typedef uint8 uchar
 
typedef signed long long int64
 
typedef unsigned long long uint64
 
typedef TColor4 TColor
 
typedef TPoint2 TVec2
 
typedef TPoint2 TVector2
 
typedef TPoint3 TVec3
 
typedef TPoint3 TVector3
 
typedef TMatrix4x4 TMat4
 
typedef TMatrix4x4 TMatrix4
 
typedef TTransformStack
< TMatrix4x4 > 
TMatrix4x4Stack
 Stack of matrix 4x4 multiplication operations.
 

Enumerations

enum  E_DGLE_VARIANT_TYPE {
  DVT_UNKNOWN = 0, DVT_INT, DVT_FLOAT, DVT_BOOL,
  DVT_POINTER, DVT_DATA
}
 
enum  E_WINDOW_MESSAGE_TYPE {
  WMT_UNKNOWN = 0, WMT_REDRAW, WMT_PRESENT, WMT_CLOSE,
  WMT_CREATE, WMT_DESTROY, WMT_RELEASED, WMT_ACTIVATED,
  WMT_DEACTIVATED, WMT_MINIMIZED, WMT_RESTORED, WMT_MOVE,
  WMT_SIZE, WMT_KEY_UP, WMT_KEY_DOWN, WMT_ENTER_CHAR,
  WMT_MOUSE_LEAVE, WMT_MOUSE_MOVE, WMT_MOUSE_DOWN, WMT_MOUSE_UP,
  WMT_MOUSE_WHEEL
}
 Flags of TWindowMessage structure that determines type of the message. More...
 
enum  E_ENGINE_WINDOW_FLAGS {
  EWF_DEFAULT = 0x00000000, EWF_ALLOW_SIZEING = 0x00000001, EWF_TOPMOST = 0x00000002, EWF_DONT_HOOK_MAIN_LOOP = 0x00000004,
  EWF_DONT_HOOK_ROOT_WINDOW = 0x00000008, EWF_RESTRICT_FULLSCREEN_HOTKEY = 0x00000010, EWF_RESTRICT_CONSOLE_HOTKEY = 0x00000020
}
 Flags of TEngineWindow structure that determines the behavior of main engine window. More...
 
enum  E_MULTISAMPLING_MODE {
  MM_NONE = 0x00000000, MM_2X = 0x00000001, MM_4X = 0x00000002, MM_8X = 0x00000004,
  MM_16X = 0x00000008
}
 Flags of TEngineWindow structure that determines antialiasing samples count. More...
 
enum  E_KEYBOARD_KEY_CODES {
  KEY_ESCAPE = 0x01, KEY_TAB = 0x0F, KEY_GRAVE = 0x29, KEY_CAPSLOCK = 0x3A,
  KEY_BACKSPACE = 0x0E, KEY_RETURN = 0x1C, KEY_SPACE = 0x39, KEY_SLASH = 0x35,
  KEY_BACKSLASH = 0x2B, KEY_SYSRQ = 0xB7, KEY_SCROLL = 0x46, KEY_PAUSE = 0xC5,
  KEY_INSERT = 0xD2, KEY_DELETE = 0xD3, KEY_HOME = 0xC7, KEY_END = 0xCF,
  KEY_PGUP = 0xC9, KEY_PGDN = 0xD1, KEY_LSHIFT = 0x2A, KEY_RSHIFT = 0x36,
  KEY_LALT = 0x38, KEY_RALT = 0xB8, KEY_LWIN_OR_CMD = 0xDB, KEY_RWIN_OR_CMD = 0xDC,
  KEY_LCONTROL = 0x1D, KEY_RCONTROL = 0x9D, KEY_UP = 0xC8, KEY_RIGHT = 0xCD,
  KEY_LEFT = 0xCB, KEY_DOWN = 0xD0, KEY_1 = 0x02, KEY_2 = 0x03,
  KEY_3 = 0x04, KEY_4 = 0x05, KEY_5 = 0x06, KEY_6 = 0x07,
  KEY_7 = 0x08, KEY_8 = 0x09, KEY_9 = 0x0A, KEY_0 = 0x0B,
  KEY_F1 = 0x3B, KEY_F2 = 0x3C, KEY_F3 = 0x3D, KEY_F4 = 0x3E,
  KEY_F5 = 0x3F, KEY_F6 = 0x40, KEY_F7 = 0x41, KEY_F8 = 0x42,
  KEY_F9 = 0x43, KEY_F10 = 0x44, KEY_F11 = 0x57, KEY_F12 = 0x58,
  KEY_Q = 0x10, KEY_W = 0x11, KEY_E = 0x12, KEY_R = 0x13,
  KEY_T = 0x14, KEY_Y = 0x15, KEY_U = 0x16, KEY_I = 0x17,
  KEY_O = 0x18, KEY_P = 0x19, KEY_A = 0x1E, KEY_S = 0x1F,
  KEY_D = 0x20, KEY_F = 0x21, KEY_G = 0x22, KEY_H = 0x23,
  KEY_J = 0x24, KEY_K = 0x25, KEY_L = 0x26, KEY_Z = 0x2C,
  KEY_X = 0x2D, KEY_C = 0x2E, KEY_V = 0x2F, KEY_B = 0x30,
  KEY_N = 0x31, KEY_M = 0x32, KEY_MINUS = 0x0C, KEY_PLUS = 0x0D,
  KEY_LBRACKET = 0x1A, KEY_RBRACKET = 0x1B, KEY_SEMICOLON = 0x27, KEY_APOSTROPHE = 0x28,
  KEY_COMMA = 0x33, KEY_PERIOD = 0x34, KEY_NUMPAD0 = 0x52, KEY_NUMPAD1 = 0x4F,
  KEY_NUMPAD2 = 0x50, KEY_NUMPAD3 = 0x51, KEY_NUMPAD4 = 0x4B, KEY_NUMPAD5 = 0x4C,
  KEY_NUMPAD6 = 0x4D, KEY_NUMPAD7 = 0x47, KEY_NUMPAD8 = 0x48, KEY_NUMPAD9 = 0x49,
  KEY_NUMPADPERIOD = 0x53, KEY_NUMPADENTER = 0x9C, KEY_NUMPADSTAR = 0x37, KEY_NUMPADPLUS = 0x4E,
  KEY_NUMPADMINUS = 0x4A, KEY_NUMPADSLASH = 0xB5, KEY_NUMLOCK = 0x45
}
 Describes all keyboard key codes. More...
 

Functions

float signf (float f)
 
TColor4 ColorClear ()
 
TColor4 ColorWhite (uint8 alpha=255)
 
TColor4 ColorBlack (uint8 alpha=255)
 
TColor4 ColorRed (uint8 alpha=255)
 
TColor4 ColorGreen (uint8 alpha=255)
 
TColor4 ColorBlue (uint8 alpha=255)
 
TColor4 ColorAqua (uint8 alpha=255)
 
TColor4 ColorBrown (uint8 alpha=255)
 
TColor4 ColorCyan (uint8 alpha=255)
 
TColor4 ColorFuchsia (uint8 alpha=255)
 
TColor4 ColorGray (uint8 alpha=255)
 
TColor4 ColorGrey (uint8 alpha=255)
 
TColor4 ColorMagenta (uint8 alpha=255)
 
TColor4 ColorMaroon (uint8 alpha=255)
 
TColor4 ColorNavy (uint8 alpha=255)
 
TColor4 ColorOlive (uint8 alpha=255)
 
TColor4 ColorOrange (uint8 alpha=255)
 
TColor4 ColorPink (uint8 alpha=255)
 
TColor4 ColorPurple (uint8 alpha=255)
 
TColor4 ColorSilver (uint8 alpha=255)
 
TColor4 ColorTeal (uint8 alpha=255)
 
TColor4 ColorViolet (uint8 alpha=255)
 
TColor4 ColorYellow (uint8 alpha=255)
 
TColor4 ColorOfficialOrange (uint8 alpha=255)
 
TColor4 ColorOfficialBlack (uint8 alpha=255)
 
TMatrix4x4 MatrixIdentity ()
 Returns identity matrix.
 
TMatrix4x4 MatrixInverse (const TMatrix4x4 &stMatrix)
 Returns inverse matrix.
 
TMatrix4x4 MatrixTranspose (const TMatrix4x4 &stMatrix)
 Returns transpose matrix.
 
TMatrix4x4 MatrixScale (const TVector3 &stVec)
 Returns scaled matrix by a given vector.
 
TMatrix4x4 MatrixTranslate (const TVector3 &stVec)
 Returns translated matrix by a given vector.
 
TMatrix4x4 MatrixRotate (float fAngle, const TVector3 &stAxis)
 Returns rotated matrix by a given axis vector and angle.
 
TMatrix4x4 MatrixBillboard (const TMatrix4x4 &stMatrix)
 Returns billboarded matrix.
 

Detailed Description

Engine types definition header.

Author
Korotkov Andrey aka DRON
Version
2:0.3.1
Date
17.11.2014 (c)Korotkov Andrey

This header is a part of DGLE SDK.

Warning
Don't include this header directly, include "DGLE.h" instead.
See Also
DGLE.h

Macro Definition Documentation

#define _USE_MATH_DEFINES
#define E_ABORT   ((DGLE_RESULT)0x80004004L)

Return value of DGLE_RESULT type.

Method returns E_ABORT when operation aborted due to errors of some other function.

#define E_FAIL   ((DGLE_RESULT)0x80004005L)

Return value of DGLE_RESULT type.

Method returns E_FAIL when unspecified error occurred.

#define E_INVALIDARG   ((DGLE_RESULT)0x80070057L)

Return value of DGLE_RESULT type.

Method returns E_INVALIDARG when one or more arguments are invalid.

#define E_NOTIMPL   ((DGLE_RESULT)0x80004001L)

Return value of DGLE_RESULT type.

Method returns E_NOTIMPL when it is empty dummy or this routine is unsupported by realization.

#define FAILED (   res)    (((DGLE_RESULT)(res)) < 0)

Macros to check DGLE_RESULT value.

Returns true for any value except S_OK and S_FALSE.

Parameters
[in]hrDGLE_RESULT value to be checked.
if(FAILED(pEngineCore->InitializeEngine(NULL, "Test"))) Exit(1);
#define RGBA (   r,
  g,
  b,
 
)    ((uint32)(((uint8)(r) | ((uint32)((uint8)(g)) << 8)) | (((uint32)(uint8)(b)) << 16) | (((uint32)(uint8)(a)) << 24)))
#define S_FALSE   ((DGLE_RESULT)1L)

Return value of DGLE_RESULT type.

Method returns S_FALSE when most of its routines were done successfully but some minor errors occurred.

#define S_OK   ((DGLE_RESULT)0L)

Return value of DGLE_RESULT type.

Method returns S_OK when all of its routines were done successfully.

#define SUCCEEDED (   res)    (((DGLE_RESULT)(res)) >= 0)

Macros to check DGLE_RESULT value.

Returns true if value is S_OK or S_FALSE and false otherwise.

Parameters
[in]hrDGLE_RESULT value to be checked.
if(SUCCEEDED(pEngineCore->InitializeEngine(NULL, "Test"))) pEngineCore->StartEngine();

Typedef Documentation

typedef long int DGLE_RESULT

Default return type for all DGLE methods.

Every engine interface method returns DGLE_RESULT as result. DGLE_RESULT must be one of these types S_OK, S_FALSE, E_FAIL, E_INVALIDARG, E_ABORT or E_NOTIMPL.

Note
Engine suppresses a lot of errors and keeps all things stable, so it is not necessary to check every methods result.
See Also
SUCCEEDED, FAILED, CHECK_RES, PARANOIC_CHECK_RES, S_OK, S_FALSE, E_FAIL, E_INVALIDARG, E_ABORT, E_NOTIMPL

Sun Nov 16 2014 09:47:29   Generated by   doxygen   Content copyrighted to DGLE Team