geFog

Description: Fog module

Source file: …\genesis3d\OpenSource\Source\World\fog.h

Contents:

Functions: Create, Destroy, SetAttributes, SetUserData, GetUserData

Releated functions (in geWorld): geWorld_AddFog, geWorld_RemoveFog

Types: SET_ATTR_CB, geFog

Additions to Genesis3D v1.6: None

Types:

SET_ATTR_CB
typedef geBoolean SET_ATTR_CB(geFog* Fog); //CB means call back procedure
 Return to Contents
geFog

      Note: The elements of this structure may be set via standard API calls

typedef struct geFog {
      geVec3d                Pos;
      GE_RGBA            Color;
      float                       LightBrightness;
      float                       VolumeBrightness;
      float                       VolumeRadius;
      float                       VolumeRadius2;   // *2
      float                       VolumeRadiusSquared;  // Radius squared
      void *                     UserData; 
      SET_ATTR_CB*  SetAttrCB;    // CB for when geFog_SetAttributes is called
      struct geFog*         Next;
      struct geFog*         Prev;
} geFog;
 Return to Contents

Functions:

GENESISAPI  geFog* geFog_Create(SET_ATTR_CB* SetAttrCB);

This function creates a new geFog, and returns a pointer to the structure. SetAttrCB is a call back procedure. Note: the standard way to create a new geFog, is NOT via this function, but rather through the geWorld_AddFog(geWorld* World) function.

Return to Contents

GENESISAPI  void geFog_Destroy(geFog* Fog);

This function destroys a geFog. Note: As discussed in geFog_Create, users should use the function geWorld_RemoveFog(geWorld* World, geFog* Fog) to add or remove a geFog

Return to Contents

GENESISAPI geBoolean geFog_SetAttributes(geFog* Fog, const geVec3d* Pos, GE_RGBA* Color, float LightBrightness, float VolumeBrightness, float VolumeRadius);

This sets the attributes for a geFog, based on parameters passed: Pos, Color, LightBrightness, VolumeBrightness, VolumeRadius

Return to Contents

GENESISAPI geBoolean geFog_SetUserData(geFog* Fog, void* UserData);

The geFog structure allows for user data. A pointer to a user-supplied data may be set with this function.

Return to Contents

GENESISAPI void* geFog_GetUserData(geFog* Fog);

 Returns pointer to user data

Return to Contents