Functions | |
void | Engine_Delete () |
void | Engine_Init () |
void | Engine_Update () |
int | K3d_AddVertex (const float _x, const float _y, const float _z, const char _r, const char _g, const char _b, const int _size) |
bool | K3d_ButtonIsPressed (const int _iButtonId) |
bool | K3d_CheckKeyboardKey (const char *_strKey) |
void | K3d_Exit () |
float float float float float float | K3d_GetAimRay () |
float float float | K3d_GetCamDir (const int _iId) |
float float float | K3d_GetCamPos (const int _iId) |
float | K3d_GetDistance (const int _iObjId0, const int _iObjId1, const int _iObjType0, const int _iObjType1) |
int | K3d_GetGuiObject (const char *_strObjName, const int _iObjType) |
bool float float float | K3d_GetIntersection (const int _iObjId0, const int _iObjId1, const int _iObjType0, const int _iObjType1, const bool _bGetIntrPoint) |
bool | K3d_GetIntersection (const int _iObjId0, const int _iObjId1, const int _iObjType0, const int _iObjType1) |
int | K3d_GetObject (const char *_strObjName, const int _iObjType) |
float float float float float float | K3d_GetRayOrigDir (const int _iRayId) |
float float float | K3d_GetSpherePos (const int _iId) |
void | K3d_Hide (const int _iObjId, const int _iObjType, const bool _bHide) |
void | K3d_HideGui (const int _iObjId, const int _iObjType) |
void | K3d_IncludeScript (const char *_strFileName) |
bool | K3d_IsMouseLeft () |
bool | K3d_IsMouseLeftUp () |
bool | K3d_IsMouseRight () |
bool | K3d_IsMouseRightUp () |
void | K3d_Link (const int _iObjId0, const int _iObjId1, const int _iObjType0, const int _iObjType1) |
void | K3d_LoadMap (const char *_strFilename) |
bool | K3d_LoadMapFromListBox (const int _iListBoxId, const char *_strPath) |
void | K3d_LoadNewScript (const char *_strFileName) |
void | K3d_MoveByMouse (const int _iSphereId) |
void | K3d_Print (const char *_str) |
void | K3d_PrintValue (const char *_strComment, const float _fValue) |
void | K3d_SetColor (const int _iObjId, const int _iObjType, const char _r, const char _g, const char _b) |
void | K3d_SetLine (const int _iLineId, const float _origx, const float _origy, const float _origz, const float _dirx, const float _diry, const float _dirz) |
void | K3d_SetRay (const int _iRayId, const float _origx, const float _origy, const float _origz, const float _dirx, const float _diry, const float _dirz) |
void | K3d_SetVertexPos (const int _iVertexId, const float _x, const float _y, const float _z) |
void | K3d_ShowFileListBox (const int _iListModel, const char *_strPath) |
void | K3d_ShowGui (const int _iObjId, const int _iObjType) |
bool | K3d_Wait (const int _iMsec) |
K3dEngine 1.0 - OpenGL Game Engine http://sourceforge.net/projects/kengine/
07.08.10 - First version
void Engine_Delete | ( | ) |
Delete function called from K3dEngine during delete scene.
void Engine_Init | ( | ) |
Init function called from K3dEngine during initialization.
void Engine_Update | ( | ) |
Update function called from K3dEngine during update scene.
int K3d_AddVertex | ( | const float | _x, | |
const float | _y, | |||
const float | _z, | |||
const char | _r, | |||
const char | _g, | |||
const char | _b, | |||
const int | _size | |||
) |
Add vertex to the global game data.
_x | Vertex position x | |
_y | Vertex position y | |
_z | Vertex position z | |
_r | Vertex color r | |
_g | Vertex color g | |
_b | Vertex color b | |
_size | Vertex size |
int | Vertex index. If return -1, then doesn`t exist current vertex |
bool K3d_ButtonIsPressed | ( | const int | _iButtonId | ) |
Is button pressed ?
_iButtonId | Button index |
bool | True if button pressed |
bool K3d_CheckKeyboardKey | ( | const char * | _strKey | ) |
Check if pressed keyboard key.
_strKey | Keyboard key |
bool | True if key pressed |
void K3d_Exit | ( | ) |
Call exit engine.
float float float float float float K3d_GetAimRay | ( | ) |
Get aiming ray.
float | Ray origin X | |
float | Ray origin Y | |
float | Ray origin Z | |
float | Ray direction X | |
float | Ray direction Y | |
float | Ray direction Z |
float float float K3d_GetCamDir | ( | const int | _iId | ) |
Get camera direction from game data.
_iId | Camera index |
float | Camera direction X | |
float | Camera direction Y | |
float | Camera direction Z |
float float float K3d_GetCamPos | ( | const int | _iId | ) |
Get camera position from game data.
_iId | Camera index |
float | Camera position X | |
float | Camera position Y | |
float | Camera position Z |
float K3d_GetDistance | ( | const int | _iObjId0, | |
const int | _iObjId1, | |||
const int | _iObjType0, | |||
const int | _iObjType1 | |||
) |
Calculate distance between Obj0 and Obj1 by object type.
_iObjId0 | First object index | |
_iObjId1 | Second object index | |
_iObjType0 | First object type | |
_iObjType1 | Second object type |
float | Returns result distance. If some object doesn`t exists, then return -1 |
int K3d_GetGuiObject | ( | const char * | _strObjName, | |
const int | _iObjType | |||
) |
Get gui object index from game data.
_strObjName | Object name | |
_iObjType | Object type id |
int | Object index. If return -1, then doesn`t exist current object or object type |
bool float float float K3d_GetIntersection | ( | const int | _iObjId0, | |
const int | _iObjId1, | |||
const int | _iObjType0, | |||
const int | _iObjType1, | |||
const bool | _bGetIntrPoint | |||
) |
Test intersection between Obj0 and Obj1 and return intersection point.
_iObjId0 | First object index | |
_iObjId1 | Second object index | |
_iObjType0 | First object type | |
_iObjType1 | Second object type | |
_bGetIntrPoint | Get intersection point ? |
bool | True if Obj0 intersect Obj1 | |
float | Intersection point X | |
float | Intersection point Y | |
float | Intersection point Z |
bool K3d_GetIntersection | ( | const int | _iObjId0, | |
const int | _iObjId1, | |||
const int | _iObjType0, | |||
const int | _iObjType1 | |||
) |
Test intersection between Obj0 and Obj1 and return intersection point.
_iObjId0 | First object index | |
_iObjId1 | Second object index | |
_iObjType0 | First object type | |
_iObjType1 | Second object type |
bool | True if Obj0 intersect Obj1 |
int K3d_GetObject | ( | const char * | _strObjName, | |
const int | _iObjType | |||
) |
Get object index from game data.
_strObjName | Object name | |
_iObjType | Object type id |
int | Object index. If return -1, then doesn`t exist current object or object type |
float float float float float float K3d_GetRayOrigDir | ( | const int | _iRayId | ) |
Get ray origin and direction.
_iRayId | Ray index | |
float | Ray origin X | |
float | Ray origin Y | |
float | Ray origin Z | |
float | Ray direction X | |
float | Ray direction Y | |
float | Ray direction Z |
float float float K3d_GetSpherePos | ( | const int | _iId | ) |
Get sphere position.
_iId | Sphere index |
flaot | Sphere position X | |
flaot | Sphere position Y | |
flaot | Sphere position Z |
void K3d_Hide | ( | const int | _iObjId, | |
const int | _iObjType, | |||
const bool | _bHide | |||
) |
Hide or unhide current object.
_iObjId | Current object index | |
_iObjType | Object type | |
_bHide | If true then hide current object |
void K3d_HideGui | ( | const int | _iObjId, | |
const int | _iObjType | |||
) |
Hide gui object.
_iObjId | Object index | |
_iObjType | Object type id |
void K3d_IncludeScript | ( | const char * | _strFileName | ) |
Include other script.
_strFileName | Other script path and filename |
bool K3d_IsMouseLeft | ( | ) |
Check if left mouse button is down.
bool K3d_IsMouseLeftUp | ( | ) |
Check if left mouse button is up.
bool K3d_IsMouseRight | ( | ) |
Check if right mouse button is down.
bool K3d_IsMouseRightUp | ( | ) |
Check if right mouse button is up.
void K3d_Link | ( | const int | _iObjId0, | |
const int | _iObjId1, | |||
const int | _iObjType0, | |||
const int | _iObjType1 | |||
) |
Link obj0 to the obj1 by object type. After linking obj0 will moving by obj1.
_iObjId0 | First object index | |
_iObjId1 | Second object index | |
_iObjType0 | First object type | |
_iObjType1 | Second object type |
void K3d_LoadMap | ( | const char * | _strFilename | ) |
Load map file.
_strFilename | Map path and filename string |
bool K3d_LoadMapFromListBox | ( | const int | _iListBoxId, | |
const char * | _strPath | |||
) |
Load selected map from list box.
_iListBoxId | List box index | |
_strPath | File path |
bool | True if map is correctly loaded |
void K3d_LoadNewScript | ( | const char * | _strFileName | ) |
Load new script and delete current script.
_strFileName | New script filename |
void K3d_MoveByMouse | ( | const int | _iSphereId | ) |
Move with sphere by mouse cursor.
void K3d_Print | ( | const char * | _str | ) |
Print string to the screen.
_str | String printed to the screen |
void K3d_PrintValue | ( | const char * | _strComment, | |
const float | _fValue | |||
) |
Print string comment and float value to the screen.
_strComment | Value comments | |
_fValue | Value |
void K3d_SetColor | ( | const int | _iObjId, | |
const int | _iObjType, | |||
const char | _r, | |||
const char | _g, | |||
const char | _b | |||
) |
Set object color.
_iObjId | Object index | |
_iObjType | Object type | |
_r | Red color | |
_g | Green color | |
_b | Blue color |
void K3d_SetLine | ( | const int | _iLineId, | |
const float | _origx, | |||
const float | _origy, | |||
const float | _origz, | |||
const float | _dirx, | |||
const float | _diry, | |||
const float | _dirz | |||
) |
Set line origin and direction.
_iLineId | Line index | |
_origx | Set origin x | |
_origy | Set origin y | |
_origz | Set origin z | |
_dirx | Set direction x | |
_diry | Set direction y | |
_dirz | Set direction z |
void K3d_SetRay | ( | const int | _iRayId, | |
const float | _origx, | |||
const float | _origy, | |||
const float | _origz, | |||
const float | _dirx, | |||
const float | _diry, | |||
const float | _dirz | |||
) |
Set ray origin and direction.
_iRayId | Ray index | |
_origx | Set origin x | |
_origy | Set origin y | |
_origz | Set origin z | |
_dirx | Set direction x | |
_diry | Set direction y | |
_dirz | Set direction z |
void K3d_SetVertexPos | ( | const int | _iVertexId, | |
const float | _x, | |||
const float | _y, | |||
const float | _z | |||
) |
Set vertex position.
_iVertexId | Current vertex index | |
_x | Set vertex position x | |
_y | Set vertex position y | |
_z | Set vertex position z |
void K3d_ShowFileListBox | ( | const int | _iListModel, | |
const char * | _strPath | |||
) |
Show list box with files.
_iListModel | List model index | |
_strPath | File path |
void K3d_ShowGui | ( | const int | _iObjId, | |
const int | _iObjType | |||
) |
Show gui object.
_iObjId | Object index | |
_iObjType | Object type id |
bool K3d_Wait | ( | const int | _iMsec | ) |
Wait some milliseconds.
_iMsec | Waiting time in milliseconds |
bool | True if time delay finished |