/usr/src/castle-game-engine-5.2.0/library/castleengine.h is in castle-game-engine-src 5.2.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | /*
Copyright 2013 Jan Adamec, Michalis Kamburelis.
This file is part of "Castle Game Engine".
"Castle Game Engine" is free software; see the file COPYING.txt,
included in this distribution, for details about the copyright.
"Castle Game Engine" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
----------------------------------------------------------------------------
This include file should be used in C/C++ projects. It contains all
functions exported from the library.
Dynamic library: add castlelib_c_loader.cpp file to your project and call
CGE_LoadLibrary first to enable to Castle Game Engine funtions.
iOS: castlelib will be statically linked to your app, so just include
this file and you are ready to go.
*/
#ifndef CGE_LIBRARY_INCLUDED
#define CGE_LIBRARY_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
enum ECgeOpenFlag
{
ecgeofSaveMemory = 1, // memory vs rendering quality (# of triangles)
ecgeofLog = 2, // enable logging to stderr
};
enum ECgeVariable // used for quering engine parameters in CGE_Set/GetVariable
{
ecgevarWalkHeadBobbing = 0, // walking effect (int, 1 = on, 0 = off)
ecgevarEffectSSAO = 1, // screen space ambient occlusion (int, 1 or 0)
ecgevarMouseLook = 2, // activate mouse look viewing mode, desktop interface only (int, 1 or 0)
ecgevarCrossHair = 3, // show crosshair in the center of the screen (int, 1 or 0)
ecgevarAnimationRunning = 4, // (read-only) engine would like to progress with the animation (int, 1 or 0)
ecgevarWalkTouchCtl = 5, // walking touch control (int, one of ECgeTouchCtlInterface values)
ecgevarScenePaused = 6, // pause SceneManager (int, 1 = on, 0 = off)
};
enum ECgeNavigationType
{
ecgenavWalk = 0,
ecgenavFly = 1,
ecgenavExamine = 2,
ecgenavTurntable = 3,
ecgenavNone = 4,
};
enum ECgeTouchCtlInterface
{
ecgetciNone = 0,
ecgetciCtlWalkCtlRotate = 1,
ecgetciCtlWalkDragRotate = 2,
etciCtlFlyCtlWalkDragRotate = 3,
etciCtlPanXYDragRotate = 4,
};
enum ECgeMouseCursor
{
ecgecursorDefault = 0,
ecgecursorWait = 1,
ecgecursorHand = 2,
ecgecursorText = 3,
ecgecursorNone = 4,
};
enum ECgeLibCallbackCode
{
ecgelibNeedsDisplay = 0, // app should repaint the view (content changed)
ecgelibSetMouseCursor = 1, // sends ECgeMouseCursor in iParam1
ecgelibNavigationTypeChanged = 2, // sends ECgeNavigationType in iParam1
ecgelibSetMousePosition = 3, // sends x in iParam1 and y in iParam2
ecgelibWarning = 4, // sends message in szParam
};
enum ECgeKey // values for these constants have to be same as in unit CastleKeysMouse (TKey)
{
kcge_None = 0,
kcge_PrintScreen = 1,
kcge_CapsLock = 2,
kcge_ScrollLock = 3,
kcge_NumLock = 4,
kcge_Pause = 5,
kcge_Apostrophe = 6,
kcge_Semicolon = 7,
kcge_BackSpace = 8,
kcge_Tab = 9,
kcge_Slash = 10,
kcge_BackQuote = 11,
kcge_Minus = 12,
kcge_Enter = 13,
kcge_Equal = 14,
kcge_BackSlash = 15,
kcge_Shift = 16,
kcge_Ctrl = 17,
kcge_Alt = 18,
kcge_Plus = 19,
kcge_Escape = 27,
kcge_Space = 32,
kcge_PageUp = 33,
kcge_PageDown = 34,
kcge_End = 35,
kcge_Home = 36,
kcge_Left = 37,
kcge_Up = 38,
kcge_Right = 39,
kcge_Down = 40,
kcge_Insert = 45,
kcge_Delete = 46,
kcge_0 = 48,
kcge_1 = 49,
kcge_2 = 50,
kcge_3 = 51,
kcge_4 = 52,
kcge_5 = 53,
kcge_6 = 54,
kcge_7 = 55,
kcge_8 = 56,
kcge_9 = 57,
kcge_A = 65,
kcge_B = 66,
kcge_C = 67,
kcge_D = 68,
kcge_E = 69,
kcge_F = 70,
kcge_G = 71,
kcge_H = 72,
kcge_I = 73,
kcge_J = 74,
kcge_K = 75,
kcge_L = 76,
kcge_M = 77,
kcge_N = 78,
kcge_O = 79,
kcge_P = 80,
kcge_Q = 81,
kcge_R = 82,
kcge_S = 83,
kcge_T = 84,
kcge_U = 85,
kcge_V = 86,
kcge_W = 87,
kcge_X = 88,
kcge_Y = 89,
kcge_Z = 90,
kcge_LeftBracket = 91,
kcge_RightBracket = 92,
kcge_Numpad_Plus = 107,
kcge_Numpad_Minus = 109,
kcge_F1 = 112,
kcge_F2 = 113,
kcge_F3 = 114,
kcge_F4 = 115,
kcge_F5 = 116,
kcge_F6 = 117,
kcge_F7 = 118,
kcge_F8 = 119,
kcge_F9 = 120,
kcge_F10 = 121,
kcge_F11 = 122,
kcge_F12 = 123,
kcge_Numpad_0 = 140,
kcge_Numpad_1 = 141,
kcge_Numpad_2 = 142,
kcge_Numpad_3 = 143,
kcge_Numpad_4 = 144,
kcge_Numpad_5 = 145,
kcge_Numpad_6 = 146,
kcge_Numpad_7 = 147,
kcge_Numpad_8 = 148,
kcge_Numpad_9 = 149,
kcge_Numpad_End = 150,
kcge_Numpad_Down = 151,
kcge_Numpad_PageDown = 152,
kcge_Numpad_Left = 153,
kcge_Numpad_Begin = 154,
kcge_Numpad_Right = 155,
kcge_Numpad_Home = 156,
kcge_Numpad_Up = 157,
kcge_Numpad_PageUp = 158,
kcge_Numpad_Insert = 159,
kcge_Numpad_Delete = 160,
kcge_Numpad_Enter = 161,
kcge_Numpad_Multiply = 162,
kcge_Numpad_Divide = 163,
kcge_Comma = 188,
kcge_Period = 190,
};
typedef int (__cdecl *TCgeLibraryCallbackProc)(int /*ECgeLibCallbackCode*/eCode, int iParam1, int iParam2, const char *szParam);
//-----------------------------------------------------------------------------
extern void CGE_LoadLibrary(); // function defined in the loader CPP file
//-----------------------------------------------------------------------------
extern void CGE_Open(unsigned uiFlags); // init the library, this function must be called first (required). Flags is any combination of ECgeOpenFlag
extern void CGE_Close();
extern void CGE_GetOpenGLInformation(char *szBuffer, int nBufSize); // szBuffer is filled inside the function with max size of nBufSize
extern void CGE_SetUserInterface(bool bAutomaticTouchInterface, int nDpi); // should be called at the start of the program. Touch interface controls will be updated automatically then.
extern void CGE_Resize(unsigned uiViewWidth, unsigned uiViewHeight); // let the library know about the viewport size (required)
extern void CGE_Render(); // paints the 3d scene into the context
extern void CGE_SaveScreenshotToFile(const char *szFile);
extern void CGE_SetLibraryCallbackProc(TCgeLibraryCallbackProc pProc); // set callback function
extern void CGE_Update(); // let the 3d engine perform the animations, etc
extern void CGE_MouseDown(int x, int y, bool bLeftBtn, int nFingerIdx); // [0,0] is the bottom-left corner!
extern void CGE_Motion(int x, int y, int nFingerIdx);
extern void CGE_MouseUp(int x, int y, bool bLeftBtn, int nFingerIdx);
extern void CGE_MouseWheel(float zDelta, bool bVertical);
extern void CGE_KeyDown(int /*ECgeKey*/ eKey);
extern void CGE_KeyUp(int /*ECgeKey*/ eKey);
extern void CGE_LoadSceneFromFile(const char *szFile); // name od the file has to be utf-8 encoded
extern int CGE_GetViewpointsCount();
extern void CGE_GetViewpointName(int iViewpointIdx, char *szName, int nBufSize); // szName is buffer of size nBufSize, and is filled with utf-8 encoded string
extern void CGE_MoveToViewpoint(int iViewpointIdx, bool bAnimated);
extern void CGE_AddViewpointFromCurrentView(const char *szName);
extern void CGE_GetBoundingBox(float *pfXMin, float *pfXMax, float *pfYMin, float *pfYMax, float *pfZMin, float *pfZMax);
extern void CGE_GetViewCoords(float *pfPosX, float *pfPosY, float *pfPosZ, float *pfDirX, float *pfDirY, float *pfDirZ,
float *pfUpX, float *pfUpY, float *pfUpZ, float *pfGravX, float *pfGravY, float *pfGravZ);
extern void CGE_MoveViewToCoords(float fPosX, float fPosY, float fPosZ, float fDirX, float fDirY, float fDirZ,
float fUpX, float fUpY, float fUpZ, float fGravX, float fGravY, float fGravZ, bool bAnimated);
extern int CGE_GetNavigationType();
extern void CGE_SetNavigationType(int /*ECgeNavigationType*/ eNewType);
extern void CGE_SetTouchInterface(int /*ECgeTouchCtlInterface*/ eMode);
extern void CGE_SetVariableInt(int /*ECgeVariable*/ eVar, int nValue);
extern int CGE_GetVariableInt(int /*ECgeVariable*/ eVar);
extern void CGE_SetNodeFieldValue(const char *szNodeName, const char *szFieldName,
float fVal1, float fVal2, float fVal3, float fVal4);
extern void CGE_IncreaseSceneTime(float fTimeS); // set time in the scene, useful when sceneManager paused
#ifdef __cplusplus
}
#endif
#endif //CGE_LIBRARY_INCLUDED
|