00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GENESIS_H
00022 #define GENESIS_H
00023
00024 #include "BaseType.h"
00025 #include "Vec3d.h"
00026 #include "XForm3d.h"
00027 #include "GETypes.h"
00028 #include "ExtBox.h"
00029 #include "vfile.h"
00030 #include "Bitmap.h"
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036
00037
00038
00039
00040 typedef struct geEngine geEngine;
00041
00042 typedef struct geDriver_System geDriver_System;
00043 typedef struct geDriver geDriver;
00044 typedef struct geDriver_Mode geDriver_Mode;
00045
00046 typedef struct geSound_System geSound_System;
00047 typedef struct geSound_Cfg geSound_Cfg;
00048 typedef struct geSound_Def geSound_Def;
00049 typedef struct geSound geSound;
00050
00051 typedef struct geActor geActor;
00052 typedef struct geActor_Def geActor_Def;
00053
00054 typedef struct geWorld geWorld;
00055
00056 typedef struct geWorld_Model geWorld_Model;
00057
00058 typedef struct geEntity geEntity;
00059 typedef struct geEntity_EntitySet geEntity_EntitySet;
00060
00061 typedef struct geCamera geCamera;
00062
00063 typedef struct geCSNetMgr geCSNetMgr;
00064
00065 typedef struct gePoly gePoly;
00066
00067 typedef struct geLight geLight;
00068
00069 typedef struct geFog geFog;
00070
00071 typedef struct geMesh_Def geMesh_Def;
00072 typedef struct geMesh geMesh;
00073
00074 #define GE_VERSION_MAJOR (1UL)
00075 #define GE_VERSION_MINOR (3UL)
00076 #define GE_VERSION_MINOR_MIN (3UL)
00077
00078 #define GE_VERSION_MAJOR_SHIFT (16)
00079 #define GE_VERSION_MAJOR_MASK ((uint32)0xFFFF0000)
00080
00081 #define GE_VERSION ( (GE_VERSION_MAJOR << GE_VERSION_MAJOR_SHIFT) + GE_VERSION_MINOR )
00082
00083
00084 typedef struct GE_ModelMotion GE_ModelMotion;
00085 typedef float GE_TimeType;
00086
00087
00088 typedef enum
00089 {
00090 GE_TEXTURED_POLY,
00091 GE_GOURAUD_POLY,
00092 GE_TEXTURED_POINT
00093 } gePoly_Type;
00094
00095
00096 #define GE_RENDER_DO_NOT_OCCLUDE_OTHERS (1<<0) // Poly will not occlude others
00097 #define GE_RENDER_DO_NOT_OCCLUDE_SELF (1<<1) // Renders under any condition. Useful for halos, etc...
00098 #define GE_RENDER_BACKFACED (1<<2) // Poly should be backfaced from the Camera's Pov
00099 #define GE_RENDER_DEPTH_SORT_BF (1<<3) // Sorts relative to camera position, from back to front
00100 #define GE_RENDER_CLAMP_UV (1<<4) // Clamp UV's in both directions
00101 #define GE_RENDER_NO_FOG (1<<5)
00102 #define GE_RENDER_NO_CLIP (1<<6)
00103
00104
00105 #define GE_WORLD_RENDER (1<<0)
00106 #define GE_WORLD_COLLIDE (1<<1)
00107
00108
00109
00110 #ifndef GE_CONTENTS_TYPES
00111 #define GE_CONTENTS_TYPES
00112
00113
00114
00115
00116
00117
00118
00119 #define GE_CONTENTS_SOLID (1<<0) // Solid (Visible)
00120 #define GE_CONTENTS_WINDOW (1<<1) // Window (Visible)
00121 #define GE_CONTENTS_EMPTY (1<<2) // Empty but Visible (water, lava, etc...)
00122
00123 #define GE_CONTENTS_TRANSLUCENT (1<<3) // Vis will see through it
00124 #define GE_CONTENTS_WAVY (1<<4) // Wavy (Visible)
00125 #define GE_CONTENTS_DETAIL (1<<5) // Won't be included in vis oclusion
00126
00127 #define GE_CONTENTS_CLIP (1<<6) // Structural but not visible
00128 #define GE_CONTENTS_HINT (1<<7) // Primary splitter (Non-Visible)
00129 #define GE_CONTENTS_AREA (1<<8) // Area seperator leaf (Non-Visible)
00130
00131 #define GE_CONTENTS_FLOCKING (1<<9)
00132 #define GE_CONTENTS_SHEET (1<<10)
00133 #define GE_CONTENTS_AIR (1<<11) // No brush lives in this leaf
00134 #define GE_RESERVED4 (1<<12)
00135 #define GE_RESERVED5 (1<<13)
00136 #define GE_RESERVED6 (1<<14)
00137 #define GE_RESERVED7 (1<<15)
00138
00139
00140 #define GE_CONTENTS_USER1 (1<<16)
00141 #define GE_CONTENTS_USER2 (1<<17)
00142 #define GE_CONTENTS_USER3 (1<<18)
00143 #define GE_CONTENTS_USER4 (1<<19)
00144 #define GE_CONTENTS_USER5 (1<<20)
00145 #define GE_CONTENTS_USER6 (1<<21)
00146 #define GE_CONTENTS_USER7 (1<<22)
00147 #define GE_CONTENTS_USER8 (1<<23)
00148 #define GE_CONTENTS_USER9 (1<<24)
00149 #define GE_CONTENTS_USER10 (1<<25)
00150 #define GE_CONTENTS_USER11 (1<<26)
00151 #define GE_CONTENTS_USER12 (1<<27)
00152 #define GE_CONTENTS_USER13 (1<<28)
00153 #define GE_CONTENTS_USER14 (1<<29)
00154 #define GE_CONTENTS_USER15 (1<<30)
00155 #define GE_CONTENTS_USER16 (1<<31)
00156
00157
00158
00159
00160 #define GE_CONTENTS_SOLID_CLIP (GE_CONTENTS_SOLID | GE_CONTENTS_WINDOW | GE_CONTENTS_CLIP)
00161 #define GE_CONTENTS_CANNOT_OCCUPY GE_CONTENTS_SOLID_CLIP
00162
00163
00164 #define GE_VISIBLE_CONTENTS ( GE_CONTENTS_SOLID | \
00165 GE_CONTENTS_EMPTY | \
00166 GE_CONTENTS_WINDOW | \
00167 GE_CONTENTS_WAVY)
00168
00169 #endif
00170
00171
00172
00173
00174
00175
00176 typedef struct
00177 {
00178 geMesh *Mesh;
00179 geWorld_Model *Model;
00180 geActor *Actor;
00181 int32 Contents;
00182 } GE_Contents;
00183
00184 typedef geBoolean GE_CollisionCB(geWorld_Model *Model, geActor *Actor, void *Context);
00185
00186
00187 typedef struct
00188 {
00189 geVec3d Normal;
00190 geFloat Dist;
00191 } GE_Plane;
00192
00193 typedef struct
00194 {
00195 geWorld_Model *Model;
00196 geMesh *Mesh;
00197 geActor *Actor;
00198 geVec3d Impact;
00199 geFloat Ratio;
00200 GE_Plane Plane;
00201 } GE_Collision;
00202
00203
00204
00205
00206
00207
00208
00209 #define GE_RENDERSTATE_ZWRITE 0 // Z Writes
00210 #define GE_RENDERSTATE_ZCMP 1 // Z Compares
00211 #define GE_RENDERSTATE_BILINEAR 2 // Bilinear filtering
00212 #define GE_RENDERSTATE_ANTI_ALIAS 3 // Anti-Aliasing
00213 #define GE_RENDERSTATE_POLYMODE 4 // Normal, Gouraud only, Lines only, etc
00214
00215
00216
00217
00218 #define GE_RENDERFLAG_OFF 0
00219 #define GE_RENDERFLAG_ON 1
00220
00221
00222
00223
00224 #define GE_POLYMODE_NORMAL 1 // Draw as is
00225 #define GE_POLYMODE_GOURAUD 2 // Gouraud only
00226 #define GE_POLYMODE_LINES 3 // Outlines only
00227
00228
00229
00230
00231
00232
00233 #ifdef _INC_WINDOWS
00234
00235
00236
00237 GENESISAPI geEngine *geEngine_CreateWithVersion(HWND hWnd, const char *AppName, const char *DriverDirectory, uint32 Version);
00238
00239
00240 #define geEngine_Create( hWnd, AppName, DriverDirectory) geEngine_CreateWithVersion(hWnd,AppName,DriverDirectory,GE_VERSION)
00241
00242 #endif
00243
00244 GENESISAPI void geEngine_Free(geEngine *Engine);
00245
00246 GENESISAPI geBoolean geEngine_AddWorld(geEngine *Engine, geWorld *World);
00247 GENESISAPI geBoolean geEngine_RemoveWorld(geEngine *Engine, geWorld *World);
00248
00249 GENESISAPI geBoolean geEngine_AddBitmap(geEngine *Engine, geBitmap *Bitmap);
00250 GENESISAPI geBoolean geEngine_RemoveBitmap(geEngine *Engine, geBitmap *Bitmap);
00251
00252 GENESISAPI geDriver_System *geEngine_GetDriverSystem(geEngine *Engine);
00253
00254 GENESISAPI geBoolean geEngine_SetDriverAndMode( geEngine *Engine,
00255 geDriver *Driver,
00256 geDriver_Mode *DriverMode);
00257
00258 GENESISAPI geBoolean geEngine_ShutdownDriver(geEngine *Engine);
00259
00260 GENESISAPI geBoolean geEngine_BeginFrame(geEngine *Engine, geCamera *Camera, geBoolean ClearScreen);
00261 GENESISAPI geBoolean geEngine_EndFrame(geEngine *Engine);
00262
00263 GENESISAPI geBoolean geEngine_RenderWorld(geEngine *Engine, geWorld *World, geCamera *Camera, geFloat Time);
00264 GENESISAPI geBoolean geEngine_Printf(geEngine *Engine, int32 x, int32 y, const char *String, ...);
00265
00266 GENESISAPI void GENESISCC geEngine_RenderPoly(const geEngine *Engine, const GE_TLVertex *Points, int NumPoints, const geBitmap *Texture, uint32 Flags);
00267
00268
00269 GENESISAPI void GENESISCC geEngine_RenderPolyArray(const geEngine *Engine, const GE_TLVertex ** pPoints, int * pNumPoints, int NumPolys,
00270 const geBitmap *Texture, uint32 Flags);
00271
00272 GENESISAPI geBoolean GENESISCC geEngine_DrawAlphaBitmap(
00273 geEngine * Engine,
00274 geBitmap * pBitmap,
00275 geVec3d * VertUVArray,
00276 geCamera * ClipCamera,
00277 GE_Rect * PixelRect,
00278 GE_Rect * PercentRect,
00279 geFloat Alpha,
00280 GE_RGBA * RGBA_Array
00281 );
00282
00283 GENESISAPI geBoolean GENESISCC geEngine_DrawBitmap(const geEngine *Engine,const geBitmap *Bitmap,
00284 const geRect * Source, uint32 x, uint32 y);
00285
00286
00287
00288 GENESISAPI void geEngine_FillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);
00289
00290 GENESISAPI geBoolean geEngine_SetGamma(geEngine *Engine, geFloat Gamma);
00291 GENESISAPI geBoolean geEngine_GetGamma(geEngine *Engine, geFloat *Gamma);
00292
00293 GENESISAPI geBoolean geEngine_SetFogEnable(geEngine *Engine, geBoolean Enable, geFloat r, geFloat g, geFloat b, geFloat Start, geFloat End);
00294
00295
00296
00297
00298
00299
00300 GENESISAPI geBoolean geEngine_ScreenShot(geEngine *Engine, const char *FileName);
00301
00302 GENESISAPI void geEngine_EnableFrameRateCounter(geEngine *Engine, geBoolean Enabled);
00303
00304 GENESISAPI geBoolean geEngine_Activate(geEngine *Engine, geBoolean bActive);
00305
00306 #ifdef _INC_WINDOWS
00307
00308 GENESISAPI geBoolean geEngine_UpdateWindow(geEngine *Engine);
00309 #endif
00310
00311
00312 GENESISAPI geDriver *geDriver_SystemGetNextDriver(geDriver_System *DriverSystem, geDriver *Start);
00313 GENESISAPI geDriver_Mode *geDriver_GetNextMode(geDriver *Driver, geDriver_Mode *Start);
00314 GENESISAPI geBoolean geDriver_GetName(geDriver *Driver, const char **Name);
00315 GENESISAPI geBoolean geDriver_ModeGetName(geDriver_Mode *Mode, const char **Name);
00316 GENESISAPI geBoolean geDriver_ModeGetWidthHeight(geDriver_Mode *Mode, int32 *Width, int32 *Height);
00317
00318
00319
00320
00321 #ifdef _INC_WINDOWS
00322
00323 GENESISAPI geSound_System *geSound_CreateSoundSystem(HWND hWnd);
00324 #endif
00325
00326
00327 GENESISAPI void geSound_DestroySoundSystem(geSound_System *Sound);
00328
00329
00330 GENESISAPI geSound_Def *geSound_LoadSoundDef(geSound_System *SoundS, geVFile *File);
00331 GENESISAPI void geSound_FreeSoundDef(geSound_System *SoundS, geSound_Def *SoundDef);
00332
00333 GENESISAPI geSound *geSound_PlaySoundDef(geSound_System *SoundS,
00334 geSound_Def *SoundDef,
00335 geFloat Volume,
00336 geFloat Pan,
00337 geFloat Frequency,
00338 geBoolean Loop);
00339 GENESISAPI geBoolean geSound_StopSound(geSound_System *SoundS, geSound *Sound);
00340 GENESISAPI geBoolean geSound_ModifySound(geSound_System *SoundS,
00341 geSound *Sound,
00342 geFloat Volume,
00343 geFloat Pan,
00344 geFloat Frequency);
00345 GENESISAPI geBoolean geSound_SoundIsPlaying(geSound_System *SoundS, geSound *Sound);
00346 GENESISAPI geBoolean geSound_SetMasterVolume( geSound_System *SoundS, geFloat Volume );
00347
00348 GENESISAPI void geSound3D_GetConfig(
00349 const geWorld *World,
00350 const geXForm3d *CameraTransform,
00351 const geVec3d *SoundPos,
00352 geFloat Min,
00353 geFloat Ds,
00354 geFloat *Volume,
00355 geFloat *Pan,
00356 geFloat *Frequency);
00357
00358 GENESISAPI void geSound3D_GetConfigIgnoreObstructions(
00359 const geWorld *World,
00360 const geXForm3d *MXForm,
00361 const geVec3d *SndPos,
00362 geFloat Min,
00363 geFloat Ds,
00364 geFloat *Volume,
00365 geFloat *Pan,
00366 geFloat *Frequency);
00367
00368
00369 GENESISAPI void *geSound_GetDSound(void);
00370
00371
00372
00373
00374
00375 #include "Path.h"
00376
00377
00378
00379 #include "Motion.h"
00380
00381
00382
00383 #include "Actor.h"
00384
00385
00386
00387
00388
00389
00390 #include "Sprite.h"
00391
00392
00393
00394
00395
00396
00397 GENESISAPI geWorld *geWorld_Create(geVFile *File);
00398 GENESISAPI void geWorld_Free(geWorld *World);
00399
00400
00401 GENESISAPI geBoolean geWorld_RemoveActor (geWorld *World, geActor *Actor);
00402 GENESISAPI geBoolean geWorld_AddActor (geWorld *World, geActor *Actor, uint32 Flags, uint32 UserFlags);
00403 GENESISAPI geBoolean geWorld_SetActorFlags (geWorld *World, geActor *Actor, uint32 Flags);
00404
00405
00406
00407 GENESISAPI geBoolean geWorld_RemoveSprite (geWorld *World, geSprite *Sprite);
00408 GENESISAPI geBoolean geWorld_AddSprite (geWorld *World, geSprite *Sprite, uint32 Flags, uint32 UserFlags);
00409 GENESISAPI geBoolean geWorld_SetSpriteFlags (geWorld *World, geSprite *Sprite, uint32 Flags);
00410
00411
00412
00413 GENESISAPI geBoolean geWorld_AddBitmap( geWorld *World, geBitmap *Bitmap);
00414 GENESISAPI geBoolean geWorld_RemoveBitmap( geWorld *World, geBitmap *Bitmap);
00415 GENESISAPI geBoolean geWorld_HasBitmap(const geWorld *World, const geBitmap *Bitmap);
00416 GENESISAPI geBitmap *geWorld_GetBitmapByName(geWorld *World, const char *BitmapName);
00417 GENESISAPI geBoolean geWorld_BitmapIsVisible(geWorld *World, const geBitmap *Bitmap);
00418
00419
00420 GENESISAPI geWorld_Model *geWorld_GetNextModel(geWorld *World, geWorld_Model *Start);
00421 GENESISAPI geBoolean geWorld_SetModelXForm(geWorld *World, geWorld_Model *Model, const geXForm3d *XForm);
00422 GENESISAPI geBoolean geWorld_GetModelXForm(const geWorld *World, const geWorld_Model *Model, geXForm3d *XForm);
00423 GENESISAPI geBoolean geWorld_OpenModel(geWorld *World, geWorld_Model *Model, geBoolean Open);
00424 GENESISAPI geBoolean geWorld_GetModelRotationalCenter(const geWorld *World, const geWorld_Model *Model, geVec3d *Center);
00425 GENESISAPI geBoolean geWorld_ModelGetBBox(const geWorld *World, const geWorld_Model *Model, geVec3d *Mins, geVec3d *Maxs);
00426 GENESISAPI geMotion * geWorld_ModelGetMotion(geWorld_Model *Model);
00427
00428
00429 GENESISAPI void geWorld_ModelGetCenter(geWorld_Model *Model, geVec3d *Center);
00430
00431 GENESISAPI void *geWorld_ModelGetUserData(const geWorld_Model *Model);
00432 GENESISAPI void geWorld_ModelSetUserData(geWorld_Model *Model, void *UserData);
00433 GENESISAPI void geWorld_ModelSetFlags(geWorld_Model *Model, uint32 ModelFlags);
00434 GENESISAPI uint32 geWorld_ModelGetFlags(geWorld_Model *Model);
00435
00436
00437 GENESISAPI geLight *geWorld_AddLight(geWorld *World);
00438 GENESISAPI void geWorld_RemoveLight(geWorld *World, geLight *Light);
00439 GENESISAPI geBoolean geWorld_SetLightAttributes( geWorld *World,
00440 geLight *Light,
00441 const geVec3d *Pos,
00442 const GE_RGBA *RGBA,
00443 geFloat Radius,
00444 geBoolean CastShadow);
00445 GENESISAPI geBoolean geWorld_SetLTypeTable(geWorld *World, int32 LType, const char *Table);
00446
00447
00448 GENESISAPI geFog *geWorld_AddFog(geWorld *World);
00449 GENESISAPI geBoolean geWorld_RemoveFog(geWorld *World, geFog *Fog);
00450
00451 GENESISAPI geBoolean geFog_SetAttributes( geFog *Fog,
00452 const geVec3d *Pos,
00453 GE_RGBA *Color,
00454 geFloat LightBrightness,
00455 geFloat VolumeBrightness,
00456 geFloat VolumeRadius);
00457
00458
00459 GENESISAPI geEntity_EntitySet *geWorld_GetEntitySet(geWorld *World, const char *ClassName);
00460 GENESISAPI geEntity *geEntity_EntitySetGetNextEntity(geEntity_EntitySet *EntitySet, geEntity *Entity);
00461 GENESISAPI void *geEntity_GetUserData(geEntity *Entity);
00462 GENESISAPI void geEntity_GetName(const geEntity *Entity, char *Buff, int MaxLen);
00463
00464
00465 GENESISAPI geBoolean geWorld_ModelCollision( geWorld *World,
00466 geWorld_Model *Model,
00467 const geXForm3d *DXForm,
00468 GE_Collision *Collision);
00469 GENESISAPI geBoolean geWorld_TestModelMove( geWorld *World,
00470 geWorld_Model *Model,
00471 const geXForm3d *DXForm,
00472 const geVec3d *Mins, const geVec3d *Maxs,
00473 const geVec3d *In, geVec3d *Out);
00474
00475 GENESISAPI geBoolean geWorld_Collision( geWorld *World,
00476 const geVec3d *Mins,
00477 const geVec3d *Maxs,
00478 const geVec3d *Front,
00479 const geVec3d *Back,
00480 uint32 Contents,
00481 uint32 CollideFlags,
00482 uint32 UserFlags,
00483 GE_CollisionCB *CollisionCB,
00484 void *Context,
00485 GE_Collision *Col);
00486
00487
00488 GENESISAPI geBoolean geWorld_GetContents(geWorld *World, const geVec3d *Pos, const geVec3d *Mins, const geVec3d *Maxs, uint32 Flags, uint32 UserFlags, GE_CollisionCB *CollisionCB, void *Context, GE_Contents *Contents);
00489
00490 GENESISAPI geBoolean geWorld_GetTextureName(geWorld *World, const geVec3d *Pos, const geVec3d *Mins, const geVec3d *Maxs, char *TexName);
00491
00492
00493
00494 GENESISAPI gePoly *geWorld_AddPolyOnce(geWorld *World,
00495 GE_LVertex *Verts,
00496 int32 NumVerts,
00497 geBitmap *Bitmap,
00498 gePoly_Type Type,
00499 uint32 RenderFlags,
00500 geFloat Scale);
00501 GENESISAPI gePoly *geWorld_AddPoly(geWorld *World,
00502 GE_LVertex *Verts,
00503 int32 NumVerts,
00504 geBitmap *Bitmap,
00505 gePoly_Type Type,
00506 uint32 RenderFlags,
00507 geFloat Scale);
00508
00509 GENESISAPI void geWorld_RemovePoly(geWorld *World, gePoly *Poly);
00510 GENESISAPI geBoolean gePoly_GetLVertex(gePoly *Poly, int32 Index, GE_LVertex *LVert);
00511 GENESISAPI geBoolean gePoly_SetLVertex(gePoly *Poly, int32 Index, const GE_LVertex *LVert);
00512
00513
00514 GENESISAPI geBoolean geWorld_GetLeaf(const geWorld *World, const geVec3d *Pos, int32 *Leaf);
00515 GENESISAPI geBoolean geWorld_MightSeeLeaf(const geWorld *World, int32 Leaf);
00516
00517 GENESISAPI geBoolean geWorld_LeafMightSeeLeaf(const geWorld *World, int32 Leaf1, int32 Leaf2, uint32 VisFlags);
00518
00519
00520
00521
00522 GENESISAPI geBoolean GENESISCC geWorld_IsActorPotentiallyVisible(const geWorld *World, const geActor *Actor, const geCamera *Camera);
00523
00524
00525
00526 GENESISAPI geBoolean GENESISCC geWorld_IsSpritePotentiallyVisible(const geWorld *World, const geSprite *Sprite, const geCamera *Camera);
00527
00528
00529
00530
00531
00532 GENESISAPI geCamera *GENESISCC geCamera_Create(geFloat Fov, const geRect *Rect);
00533 GENESISAPI void GENESISCC geCamera_Destroy(geCamera **pCamera);
00534 GENESISAPI void GENESISCC geCamera_SetZScale(geCamera *Camera, geFloat ZScale);
00535 GENESISAPI geFloat GENESISCC geCamera_GetZScale(const geCamera *Camera);
00536 GENESISAPI void GENESISCC geCamera_SetFarClipPlane(geCamera *Camera, geBoolean Enable, geFloat ZFar);
00537
00538
00539
00540 GENESISAPI void GENESISCC geCamera_GetFarClipPlane(const geCamera *Camera, geBoolean *Enable, geFloat *ZFar);
00541 GENESISAPI void GENESISCC geCamera_SetAttributes(geCamera *Camera,geFloat Fov, const geRect *Rect);
00542 GENESISAPI void GENESISCC geCamera_GetClippingRect(const geCamera *Camera, geRect *Rect);
00543
00544 GENESISAPI void GENESISCC geCamera_ScreenPointToWorld(const geCamera *Camera,
00545 int32 ScreenX,
00546 int32 ScreenY,
00547 geVec3d *Vector );
00548 GENESISAPI void GENESISCC geCamera_Project(const geCamera *Camera,
00549 const geVec3d *PointInCameraSpace,
00550 geVec3d *ProjectedPoint);
00551 GENESISAPI void GENESISCC geCamera_Transform(const geCamera *Camera,
00552 const geVec3d *WorldSpacePoint,
00553 geVec3d *CameraSpacePoint);
00554
00555 GENESISAPI void GENESISCC geCamera_TransformArray(const geCamera *Camera,
00556 const geVec3d *WorldSpacePointPtr,
00557 geVec3d *CameraSpacePointPtr,
00558 int count);
00559
00560 GENESISAPI void GENESISCC geCamera_TransformAndProject(const geCamera *Camera,
00561 const geVec3d *Point,
00562 geVec3d *ProjectedPoint);
00563
00564 GENESISAPI void GENESISCC geCamera_TransformAndProjectArray(const geCamera *Camera,
00565 const geVec3d *WorldSpacePointPtr,
00566 geVec3d *ProjectedSpacePointPtr,
00567 int count);
00568
00569 GENESISAPI void GENESISCC geCamera_TransformAndProjectL(const geCamera *Camera,
00570 const GE_LVertex *Point,
00571 GE_TLVertex *ProjectedPoint);
00572
00573 GENESISAPI void GENESISCC geCamera_TransformAndProjectLArray(const geCamera *Camera,
00574 const GE_LVertex *WorldSpacePointPtr,
00575 GE_TLVertex *ProjectedSpacePointPtr,
00576 int count);
00577
00578
00579 GENESISAPI geBoolean GENESISCC geCamera_SetWorldSpaceXForm(geCamera *Camera, const geXForm3d *XForm);
00580 GENESISAPI geBoolean GENESISCC geCamera_SetWorldSpaceVisXForm(geCamera *Camera, const geXForm3d *XForm);
00581 GENESISAPI const geXForm3d *GENESISCC geCamera_GetWorldSpaceXForm( const geCamera *Camera);
00582 GENESISAPI const geXForm3d * GENESISCC geCamera_GetCameraSpaceXForm( const geCamera *Camera);
00583 GENESISAPI const geXForm3d * GENESISCC geCamera_GetWorldSpaceVisXForm( const geCamera *Camera);
00584 GENESISAPI geBoolean GENESISCC geCamera_ConvertWorldSpaceToCameraSpace(const geXForm3d *WXForm, geXForm3d *CXForm);
00585 GENESISAPI const geVec3d *GENESISCC geCamera_GetPov(const geCamera *Camera);
00586
00587
00588
00589 GENESISAPI void GENESISCC geTClip_SetupEdges(geEngine *Engine,
00590 geFloat LeftEdge,
00591 geFloat RightEdge,
00592 geFloat TopEdge ,
00593 geFloat BottomEdge,
00594 geFloat BackEdge);
00595
00596 GENESISAPI geBoolean GENESISCC geTClip_Push(void);
00597 GENESISAPI geBoolean GENESISCC geTClip_Pop(void);
00598
00599 GENESISAPI geBoolean GENESISCC geTClip_SetTexture(const geBitmap * Bitmap);
00600 GENESISAPI void GENESISCC geTClip_Triangle(const GE_LVertex TriVertex[3]);
00601
00602 GENESISAPI void GENESISCC geTClip_SetRenderFlags(uint32 newflags);
00603 GENESISAPI void GENESISCC geTClip_UnclippedTriangle(const GE_LVertex TriVertex[3]);
00604
00605
00606
00607
00608
00609
00610 typedef uint32 geCSNetMgr_NetID;
00611 #define MAX_CLIENT_NAME 256
00612
00613
00614 typedef enum
00615 {
00616 NET_MSG_NONE,
00617 NET_MSG_USER,
00618 NET_MSG_CREATE_CLIENT,
00619 NET_MSG_DESTROY_CLIENT,
00620 NET_MSG_HOST,
00621 NET_MSG_SESSIONLOST,
00622 NET_MSG_SERVER_ID,
00623 } geCSNetMgr_NetMsgType;
00624
00625
00626 typedef struct
00627 {
00628 char Name[MAX_CLIENT_NAME];
00629 geCSNetMgr_NetID Id;
00630 } geCSNetMgr_NetClient;
00631
00632 #ifdef _INC_WINDOWS
00633
00634 typedef struct geCSNetMgr_NetSession
00635 {
00636 char SessionName[200];
00637 GUID Guid;
00638 } geCSNetMgr_NetSession;
00639 GENESISAPI geBoolean GENESISCC geCSNetMgr_FindSession(geCSNetMgr *M, const char *IPAdress, geCSNetMgr_NetSession **SessionList, int32 *SessionNum );
00640 GENESISAPI geBoolean GENESISCC geCSNetMgr_JoinSession(geCSNetMgr *M, const char *Name, const geCSNetMgr_NetSession* Session);
00641 #endif
00642
00643
00644 GENESISAPI geCSNetMgr * GENESISCC geCSNetMgr_Create(void);
00645 GENESISAPI void GENESISCC geCSNetMgr_Destroy(geCSNetMgr **ppM);
00646 GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveFromServer(geCSNetMgr *M, geCSNetMgr_NetMsgType *Type, int32 *Size, uint8 **Data);
00647 GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveFromClient(geCSNetMgr *M, geCSNetMgr_NetMsgType *Type, geCSNetMgr_NetID *IdClient, int32 *Size, uint8 **Data);
00648 GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveSystemMessage(geCSNetMgr *M, geCSNetMgr_NetID IdFor, geCSNetMgr_NetMsgType *Type, geCSNetMgr_NetClient *Client);
00649 GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveAllMessages(geCSNetMgr *M, geCSNetMgr_NetID *IdFrom, geCSNetMgr_NetID *IdTo, geCSNetMgr_NetMsgType *Type, int32 *Size, uint8 **Data);
00650 GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetServerID(geCSNetMgr *M);
00651 GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetOurID(geCSNetMgr *M);
00652 GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetAllPlayerID(geCSNetMgr *M);
00653 GENESISAPI geBoolean GENESISCC geCSNetMgr_WeAreTheServer(geCSNetMgr *M);
00654 GENESISAPI geBoolean GENESISCC geCSNetMgr_StartSession(geCSNetMgr *M, const char *SessionName, const char *PlayerName );
00655 GENESISAPI geBoolean GENESISCC geCSNetMgr_StopSession(geCSNetMgr *M);
00656 GENESISAPI geBoolean GENESISCC geCSNetMgr_SendToServer(geCSNetMgr *M, geBoolean Guaranteed, uint8 *Data, int32 DataSize);
00657 GENESISAPI geBoolean GENESISCC geCSNetMgr_SendToClient(geCSNetMgr *M, geCSNetMgr_NetID To, geBoolean Guaranteed, uint8 *Data, int32 DataSize);
00658
00659 #ifdef __cplusplus
00660 }
00661 #endif
00662
00663 #endif
00664