![]()
geWorld
Description: Code to render the world, and distribute work to other modules
Source file: ...\genesis3d\OpenSource\Source\World\World.h, and also ..\genesis3d\OpenSource\Source\GENESIS.H.
Functions: AddActor, AddBitmap, AddFog, AddLight, AddPoly, AddPolyOnce, BitmapIsVisible, Collision, Create, Free, GetBitmapByName, GetContents, GetEntitySet, GetLeaf, GetModelRotationalCenter, GetModelXForm, GetNextModel, HasBitmap, IsActorPotentiallyVisible, LeafMightSeeLeaf, MightSeeLeaf, ModelCollision, ModelGetBBox, ModelGetFlags, ModelGetMotion, ModelGetUserData, ModelSetFlags, ModelSetUserData, OpenModel, RemoveActor, RemoveBitmap, RemoveFog, RemoveLight, RemovePoly, SetActorFlags, SetLightAttributes, SetLTypeTable, SetModelXForm, TestModelMove
Constants: Actor Flags, GE_COLLIDE... Flags, GE_CONTENTS... Flags, gePoly_Type, Rendering Flags, Model flags, Sprite flags, Miscellaneous
Types: geWorld, geWorld_Model , geWorld_Leaf, geWorld_FogData, World_BSP, World_SkyBox, geWorld_SkyBoxTData, World_Actor, geWorld_EntClassSet, geWorld_DebugInfo, GE_Collision, GE_Contents, GE_CollisionCB, GE_PLANE
Changes in Genesis3D v1.6: TYPES: World_Sprite. FUNCTIONS: ModelGetCenter, AddSprite, RemoveSprite, SetSpriteFlags, IsSpritePotentiallyVisible
![]()
Note: This is available only in Genesis3D v1.6
typedef struct World_Sprite {
geSprite* Sprite;
uint32 Flags; //Should be
one of these flags.
uint32 UserFlags;
//int32 Leaf; // Current leaf
the sprite is in (currently used for PVS occlusion)
} World_Sprite;
geWorld_DebugInfo
typedef struct {
int32 NumNodesTraversed1;
int32 NumNodesTraversed2;
int32 NumLeafsHit1;
int32 NumLeafsHit2;
int32 NumLeafsWithUserPolys;
int32 NumUserPolys;
} geWorld_DebugInfo;
The geWorld object contains information about the "World" including the "unchanging" world geometry and the lists of entities and actors in the world.
This structure is used to return information about detected collisions from collision detections calls.
typedef struct{
geWorld_Model* Model; // Pointer to what model was hit (if any)
geMesh* Mesh; // Pointer to what mesh was hit (if any)
geActor* Actor; // Pointer to what actor was hit (if any)
geVec3d Impact; // Impact Point
float Ratio; // Percent (0 to 1.0) how far along the line for the impact point
GE_Plane Plane; // Impact Plane
} GE_Collision;
This structure is used to return information from about the contained contents found in a call to geWorld_GetContents.
typedef struct{
geMesh* Mesh;
geWorld_Model* Model;
geActor* Actor;
int32 Contents;
} GE_Contents;
typedef geBoolean GE_CollisionCB(geWorld_Model* Model, geActor* Actor, void * Context);
This is a function type used to allow the user to accept or decline a collision that has been detected. One (but not both) of Model or Actor will be non-NULL. * Context can be used to maintain state information between calls to your GE_CollisionCB function. Basically if you will except the collision with the specified model or actor, then return GE_TRUE, if you don't want the collision to succeed, return GE_FALSE.
// Collision
typedef struct {
geVec3d Normal; // Orientation of plane
float Dist; // Distance from origin
} GE_Plane;
![]()
Actor Flags, GE_COLLIDE_..., GE_CONTENTS_..., gePoly_Type, Rendering Flags, Model flags, Sprite flags, Miscellaneous
![]()
These are used for the Flags argument of the geWorld_AddActor call and may be combined.
#define GE_ACTOR_RENDER_NORMAL // Render in normal views
#define GE_ACTOR_RENDER_MIRRORS // Render in mirror views
#define GE_ACTOR_RENDER_ALWAYS // Render always, skipping all visibility tests
#define GE_ACTOR_COLLIDE // Collide when calling geWorld_Collision
These constants are used to specify the types of geWorld objects to test against for collisions.
#define GE_COLLIDE_MESHES (1<<0)
#define GE_COLLIDE_MODELS (1<<1)
#define GE_COLLIDE_ACTORS (1<<2)
#define GE_COLLIDE_NO_SUB_MODELS (1<<3)
#define GE_COLLIDE_ALL (GE_COLLIDE_MESHES | GE_COLLIDE_MODELS | GE_COLLIDE_ACTORS)
These constants are used to partition geWorld contents into specific types. This is used for geWorld_Collision calls to specify the geWorld contents to test against, for example. They can be combined.
#define GE_CONTENTS_SOLID (1<<0) // Solid (Visible)
#define GE_CONTENTS_WINDOW (1<<1) // Window (Visible)
#define GE_CONTENTS_EMPTY (1<<2) // Empty but Visible (water, lava, etc...)
#define GE_CONTENTS_TRANSLUCENT (1<<3) // Vis will see through it
#define GE_CONTENTS_WAVY (1<<4) // Wavy (Visible)
#define GE_CONTENTS_DETAIL (1<<5) // Won't be included in vis oclusion
#define GE_CONTENTS_CLIP (1<<6) // Structural but not visible
#define GE_CONTENTS_HINT (1<<7) // Primary splitter (Non-Visible)
#define GE_CONTENTS_AREA (1<<8) // Area seperator leaf (Non-Visible)
#define GE_CONTENTS_FLOCKING (1<<9)
#define GE_CONTENTS_SHEET (1<<10)
#define GE_CONTENTS_AIR (1<<11) // No brush lives in this leaf
#define GE_RESERVED4 (1<<12)
#define GE_RESERVED5 (1<<13)
#define GE_RESERVED6 (1<<14)
#define GE_RESERVED7(1<<15)
// 16-31 reserved for user contents
#define GE_CONTENTS_USER1 (1<<16)
#define GE_CONTENTS_USER2 (1<<17)
#define GE_CONTENTS_USER3 (1<<18)
#define GE_CONTENTS_USER4 (1<<19)
#define GE_CONTENTS_USER5 (1<<20)
#define GE_CONTENTS_USER6 (1<<21)
#define GE_CONTENTS_USER7 (1<<22)
#define GE_CONTENTS_USER8 (1<<23)
#define GE_CONTENTS_USER9 (1<<24)
#define GE_CONTENTS_USER10 (1<<25)
#define GE_CONTENTS_USER11 (1<<26)
#define GE_CONTENTS_USER12 (1<<27)
#define GE_CONTENTS_USER13 (1<<28)
#define GE_CONTENTS_USER14 (1<<29)
#define GE_CONTENTS_USER15 (1<<30)
#define GE_CONTENTS_USER16 (1<<31)
// These contents are all solid types
#define GE_CONTENTS_SOLID_CLIP (GE_CONTENTS_SOLID | GE_CONTENTS_WINDOW | GE_CONTENTS_CLIP)
#define GE_CONTENTS_CANNOT_OCCUPY GE_CONTENTS_SOLID_CLIP
// These contents are all visible types
#define GE_VISIBLE_CONTENTS (GE_CONTENTS_SOLID | GE_CONTENTS_EMPTY | GE_CONTENTS_WINDOW | GE_CONTENTS_WAVY)
typedef enum{
GE_TEXTURED_POLY, // The Polygon is textured, Bitmap must be a valid geBitmap.
GE_GOURAUD_POLY, // The Polygon is Gouraud shaded, Bitmap must be NULL.
GE_TEXTURED_POINT // This renders a 3d sprite. The vertices list must contain only one vertex which specifies the center of the rendered sprite. Bitmap must be a valid geBitmap object. The bitmap is always rendered perpendicular to the camera and the dimensions of it are specified by the Scale argument.
} gePoly_Type;
#define GE_RENDER_DO_NOT_OCCLUDE_OTHERS // Poly will not occlude others
#define GE_RENDER_DO_NOT_OCCLUDE_SELF // Renders under any condition. Useful for halos, etc...
#define GE_RENDER_BACKFACED // Poly should be backfaced from the Camera's Pov
#define GE_RENDER_DEPTH_SORT_BF // Sorts relative to camera position, from back to front
#define GE_RENDER_CLAMP_UV // Clamp UV's in both directions
These flags can be combined.
Model flags (geWorld_ModelSetFlags)
#define GE_MODEL_RENDER_NORMAL (1<<0) // Render in normal views
#define GE_MODEL_RENDER_MIRRORS (1<<1) // Render in mirror views
#define GE_MODEL_RENDER_ALWAYS (1<<2) // Render always, skipping all visibility tests
#define GE_MODEL_COLLIDE (1<<3) // Collide when calling geWorld_Collision
Sprite flags (used for geWorld_AddSprite and geWorld_SetSpriteFlags)
Note: This is available only in Genesis3D v1.6
#define GE_SPRITE_RENDER_NORMAL (1<<0) // Render in normal views
#define GE_SPRITE_RENDER_MIRRORS (1<<1) // Render in mirror views
#define GE_SPRITE_RENDER_ALWAYS (1<<2) // Render always, skipping all visibility tests
#define GE_SPRITE_COLLIDE (1<<3) // Collide when calling geWorld_Collision
![]()
Functions:
![]()
GENESISAPI geBoolean geWorld_AddActor(geWorld* World, geActor* Actor, uint32 Flags, uint32 UserFlags);
This function adds geActor Actor to geWorld World setting the Actor Flags to Flags and the user-definable flags to UserFlags.
Returns: GE_TRUE on success, GE_FALSE otherwise.
Note from Jeff: The geWorld_AddActor() function will increase the reference count of the geActor and copy a reference to the world's actor array. This array is used to keep track of all the actors in the world.
![]()
GENESISAPI geBoolean geWorld_AddBitmap(geWorld* World, geBitmap* Bitmap);
This function adds geBitmap Bitmap to geWorld World making it available for use.
![]()
GENESISAPI geFog* geWorld_AddFog(geWorld* World);
This function adds a new geFog object to the geWorld World and returns it.
Notes from wxb1: "...Fog kills framerate .... I think regular fog does slow frame rate a little but "fog lights" really kill frame rate... fog lights are really dynamic lights which require another pass to render (this is why they kill frame rate)..."
Note from kdtop: Another method of creating fog, that doesn't affect framerate much is to use geEngine_SetFogEnable (version 1.6). This appears to fill the whole world with fog (which may affect sky visibility)
See also geFog functions
Returns: the geFog object.
![]()
GENESISAPI geLight* geWorld_AddLight(geWorld* World);
This function adds a new geLight object to the geWorld World and returns it. Use AddLight first to create the light, then call geWorld_SetLightAttributes() to set the light properties.
Note from kdtop: This adds a dynamic light to the world. Be aware, however, that dynamic lights can slow down frame rate significantly.
Returns: the geLight object.
![]()
GENESISAPI gePoly* geWorld_AddPoly(geWorld* World, GE_LVertex* Verts, int32 NumVerts, geBitmap* Bitmap, gePoly_Type Type, uint32 RenderFlags, float Scale);
This function adds a polygon to geWorld World. * Verts should be a pointer to a list of NumVerts vertices. Bitmap specifies the geBitmap for the new polygon, Type specifies the gePoly_Type, RenderFlags specifies the Rendering Flags, and Scale is used to scale the geBitmap if Type is set to GE_TEXTURED_POINT.
Returns: the newly created gePoly object.
![]()
GENESISAPI gePoly* geWorld_AddPolyOnce(geWorld* World, GE_LVertex* Verts, int32
NumVerts, geBitmap* Bitmap, gePoly_Type Type, uint32 RenderFlags, float Scale);
This function adds a polygon for the next rendered frame ONLY. See details of geWorld_AddPoly for arguments.
Returns: the newly created gePoly object.
![]()
GENESISAPI geBoolean geWorld_BitmapIsVisible(geWorld* World, const geBitmap* Bitmap);
This function tests whether the geBitmap Bitmap was rendered in geWorld World during the last frame.
Returns: the result.
![]()
GENESISAPI geBoolean geWorld_Collision(geWorld* World, const geVec3d* Mins, const geVec3d* Maxs, const geVec3d* Front, const geVec3d* Back, uint32 Contents, uint32 CollideFlags, uint32 UserFlags, GE_CollisionCB* CollisionCB, void * Context, GE_Collision* Col);
This function tests for bounding box and linear collisions with the world geometry.
Checks for collision of the world against either a simply ray (defined by starting point Front to ending point Back), or against a volume of space (with dimensions defined by Mins, Maxs, Front, and Back).
World: The geWorld object representing the world geometry to be tested against.
Mins: Mins (in object-space) of axial-aligned bounding box for checking collision with against World. (e.g. &ExtBox.Min) Values should be RELATIVE (i.e. -20,-20, -20). May be NULL if a simple ray collision wanted. .
Maxs: Maxs (in object-space) of axial-aligned bounding box for checking collision with against World. (e.g. &ExtBox.Max) Values should be RELATIVE (i.e. 20, 20, 20). May be NULL if a simple ray collision wanted.
Front: Front (or beginning) of the ray (or volume) to test collision against. (e.g. &CurrentPosition)
Back: Back (or end) of the ray (or volume) to test collision againts. (e.g. &TentitiveNewPosition)
Contents: Types of surfaces in the world to test against, use the GE_CONTENTS_ flags constants to specify.
CollideFlags: Types of objects (actors, etc.) to test against. Use GE_COLLIDE_ constants. (Used to mask out certain object types.)
UserFlags: Mask to be tested against for the user-definable flags as set in AddActor. (Use to mask out certain actors.)
CollisionCB: Can be set to a callback function of type GE_CollisionCB that will be called for each model or actor in geWorld World for which a collision is detected. If you want to accept the collision, then your callback function should return GE_TRUE otherwise return GE_FALSE.
Context: Can be used to pass data to your callback function.
Col: If a collision occurs, information about the collision is returned in GE_Collision Col.
Notes:
from GENESIS.H: NOTE - Mins/Maxs CAN be NULL. If you are just testing a point, then use NULL (it's faster!!!).
![]()
GENESISAPI geWorld* geWorld_Create(geVFile* File);
This function creates a new geWorld object from the information stored in File which should be a BSP file like that generated by the Genesis Editor.
Returns: the newly created geWorld object.
Note from Jeff: The geWorld_Create() function will create a world from a .BSP file or create a NULL world if the passed parameter is NULL. The return value is a pointer to a geWorld structure.
![]()
GENESISAPI void geWorld_Free(geWorld* World);
This function decreases the reference count for geWorld World by one. If World's reference count goes to zero then all of its resources are freed.
Returns: nothing.
Note from Jeff: The geWorld_Free() function will check to see if there are multiple references to the geWorld, if so then it decreases the reference count and returns. If there is only one reference then it removes the geWorld from memory. This includes calling geActor_Destroy() for every geActor in the world's actor array.
![]()
GENESISAPI geBitmap* geWorld_GetBitmapByName(geWorld* World, const char * BitmapName);
This function returns a pointer to the geBitmap with named BitmapName in geWorld World.
Returns: the geBitmap or NULL if there is no geBitmap with the specified name.
Note: This will return only bitmaps that were added as part of a loading a world. It will not return bitmaps that have been added by geWorld_AddBitmap
![]()
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);
This function returns information about a point or volume of the geWorld World. If you want to check for what is found at a point, then pass the point as Pos and set Mins and Maxs to NULL. If you want to check for what is contained within an-axial aligned bounding box, pass the minimums and maximums of the box in Mins and Maxs respectively and set Pos to NULL. Flags specifies what type of world objects you want to know about, use the GE_COLLIDE_ constants to specify this. UserFlags specifies the mask to be tested against for the user-definable flags as set in geWorld_AddActor. *CollisionCB can be set to a callback function of type GE_CollisionCB that will be called for each model or actor in geWorld World which is detected. If you want to accept the detection, then your callback function should return GE_TRUE otherwise return GE_FALSE. Context can be used to pass data to your callback function. If something is detected then GE_Contents Contents contains information about what was found.
![]()
GENESISAPI geEntity_EntitySet* geWorld_GetEntitySet(geWorld* World, const char * ClassName);
This function returns the geEntity_EntitySet named ClassName from geWorld World.
Returns: the specified geEntity_EntitySet.
![]()
GENESISAPI geBoolean geWorld_GetLeaf(const geWorld* World, const geVec3d* Pos, int32*
Leaf);
This function returns the main world leaf from the BSP tree in geWorld World at point Pos if there is one in Leaf.
![]()
GENESISAPI geBoolean geWorld_GetModelRotationalCenter(const geWorld* World, const geWorld_Model* Model, geVec3d* Center);
This function returns the rotational center of geWorld_Model Model of geWorld World in Center.
![]()
GENESISAPI geBoolean geWorld_GetModelXForm(const geWorld* World, const geWorld_Model* Model, geXForm3d* XForm);
This function returns the current transform of geWorld_Model Model of geWorld World in XForm.
![]()
GENESISAPI geWorld_Model* geWorld_GetNextModel(geWorld* World, geWorld_Model* Start);
This function iterates through the list of geWorld_Models in geWorld World. If Start is NULL, then the first geWorld_Model is returned, otherwise Start should be one of the geWorld_Models of World in which case the next geWorld_Model of World will be returned.
Returns: the geWorld_Model.
![]()
GENESISAPI geBoolean geWorld_HasBitmap(const geWorld* World, const geBitmap* Bitmap);
This function tests whether Bitmap has been added to geWorld World.
Returns: GE_TRUE if World
![]()
GENESISAPI geBoolean GENESISCC geWorld_IsActorPotentiallyVisible(const geWorld* World, const geActor* Actor, const geCamera* Camera);
This function does simple testing to see if geActor Actor of geWorld World is visible to geCamera Camera. If there is no renderhintbox set for Actor this function does no testing and returns GE_TRUE. Only the center point of the renderhintbox is tested. Mirrors are NOT accounted for. Note that this function refers to the next frame, not the last rendered frame. I believe this function does account for geWorld geometry and is not simply a test against the geCamera frustrum. Please correct me if this is wrong.
Returns: GE_TRUE if Actor is visible or if there is no renderhintbox defined, GE_FALSE otherwise.
![]()
GENESISAPI geBoolean geWorld_LeafMightSeeLeaf(const geWorld* World, int32
Leaf1, int32 Leaf2, uint32 VisFlags);
This function checks whether Leaf1 can "see" Leaf2 in geWorld World. VisFlags is not currently used. I translate this to mean that there exists a line that intersects the front (visible) side of Leaf1 and Leaf2 without intersecting any other world geometry in between. This test uses vis data and does not account for actors or models. If vis data has not been calculated this function always returns GE_TRUE. I'm assuming here that "leaf"s are one-sided objects.
Returns: GE_TRUE if Leaf1 can see Leaf2, GE_FALSE otherwise.
Notes:
from GENESIS.H: Checks to see if Leaf1 can see Leaf2. Currently VisFlags is not used yet. It could be used for checking against areas, etc... Eventually you could also pass in a VisObject, that is manipulated with a camera...
![]()
GENESISAPI geBoolean geWorld_MightSeeLeaf(const geWorld* World, int32
Leaf);
This function checks to see if Leaf of geWorld World might possibly render during the next frame. I notice this doesn't refer to a geCamera. Wouldn't that have an effect?
![]()
GENESISAPI geBoolean geWorld_ModelCollision(geWorld* World, geWorld_Model* Model, const geXForm3d* DXForm, GE_Collision* Collision);
This function checks to see if geWorld_Model Model of geWorld World would collide with the something in World if transform DXForm were applied to Model. The results of a collision, if any, are returned in Collision.
![]()
GENESISAPI geBoolean geWorld_ModelGetBBox(const geWorld* World, const geWorld_Model* Model, geVec3d* Mins, geVec3d* Maxs);
This function returns the axial-aligned bounding box of geWorld_Model Model of geWorld World in Mins and Maxs.
![]()
GENESISAPI void geWorld_ModelGetCenter(geWorld_Model* Model, geVec3d*Center);
Added in Genesis3D v1.6
Returns: nothing
![]()
GENESISAPI uint32 geWorld_ModelGetFlags(geWorld_Model* Model);
This function returns the flags set for geWorld_Model Model. I believe these are user-definable flags, maybe something from the editor?
Returns: the flags.
![]()
GENESISAPI geMotion* geWorld_ModelGetMotion(geWorld_Model* Model);
This function returns the geMotion set for geWorld_Model Model. How is this motion set? Where did it come from?
Returns: the geMotion object.
![]()
GENESISAPI void * geWorld_ModelGetUserData(const geWorld_Model* Model);
This function returns a pointer to user defined data that has been assigned to geWorld_Model Model.
Returns: the pointer.
![]()
GENESISAPI void geWorld_ModelSetFlags(geWorld_Model* Model, uint32 ModelFlags);
This function sets the flags for geWorld_Model Model to ModelFlags. I assume that this is user-defined.
Returns: nothing.
![]()
GENESISAPI void geWorld_ModelSetUserData(geWorld_Model* Model, void * UserData);
This function assigns a pointer for user-definable data for geWorld_Model model to UserData.
Returns: nothing.
![]()
GENESISAPI geBoolean geWorld_OpenModel(geWorld* World, geWorld_Model* Model, geBoolean Open);
This function is used to disable or enable the vis blocking capabilites of geWorld_Model Model of geWorld World. If Open is GE_TRUE then Model is capable of blocking visibility, if GE_FALSE then it doesn't. Basically this is used for doors.
![]()
GENESISAPI geBoolean geWorld_RemoveActor(geWorld* World, geActor* Actor);
Returns: GE_TRUE on success, GE_FALSE otherwise.
Note from Jeff: The geWorld_RemoveActor() function will decrease the reference to the geActor and remove it from the world's actor array.
![]()
GENESISAPI geBoolean geWorld_RemoveBitmap(geWorld* World, geBitmap* Bitmap);
![]()
GENESISAPI geBoolean geWorld_RemoveFog(geWorld* World, geFog*
Fog);
See also geFog functions
![]()
GENESISAPI void geWorld_RemoveLight(geWorld* World, geLight* Light);
![]()
GENESISAPI void geWorld_RemovePoly(geWorld* World, gePoly*
Poly);
![]()
GENESISAPI geBoolean geWorld_SetActorFlags(geWorld* World, geActor* Actor, uint32 Flags);
This function sets the Actor Flags for geActor Actor of geWorld World to Flags.
![]()
GENESISAPI geBoolean geWorld_SetLightAttributes(geWorld* World, geLight* Light, const geVec3d* Pos, const GE_RGBA* RGBA, float Radius, geBoolean CastShadow);
This function sets the attributes of geLight Light of geWorld World including it position (Pos), color (RGBA), effect radius (Radius), and whether it casts shadows (CastShadow). I've got to assume that changing this during runtime would only affect runtime lit objects like geActors.
![]()
GENESISAPI geBoolean geWorld_SetLTypeTable(geWorld* World, int32
LType, const char * Table);
This creates "light type" numberd LType in geWorld World that is defined by the string Table. Table should be a '\0' terminated string of lowercase letters. Basically 'a' sets a light to "off", 'z' sets it to "full on", and all the letters in between are variations in between. When you create a static light in the editor, you can specify the "light type" number that matches the LType you define with this API call.
GENESISAPI geBoolean geWorld_SetModelXForm(geWorld* World, geWorld_Model* Model, const geXForm3d* XForm);
This function transforms geWorld_Model Model of geWorld World by the transform XForm.
![]()
GENESISAPI geBoolean geWorld_TestModelMove(geWorld* World, geWorld_Model* Model, const geXForm3d* DXForm, const geVec3d* Mins, const geVec3d* Maxs, const geVec3d* In, geVec3d* Out);
This function returns the result axial-aligned bounding box (Mins, Maxs) and In and Out vectors for geWorld_Model Model of geWorld World if transform DXForm were applied to Model. It does not however actually transform the model. This is basically used to check for possible collisions, etc.
GENESISAPI geBoolean geWorld_RemoveSprite(geWorld* World, geSprite* Sprite);
Added in Genesis3D v1.6
Removes and destroys Sprite from World.
GENESISAPI geBoolean geWorld_AddSprite(geWorld* World, geSprite* Sprite, uint32 Flags, uint32 UserFlags);
Added in Genesis3D v1.6
Adds Sprite to World.
Sprite must be a valid geSprite, created by geSprite_Create().
Flags should be one of these flags.
UserFlags to be set to any user-defined value.
GENESISAPI geBoolean geWorld_SetSpriteFlags(geWorld* World, geSprite* Sprite, uint32 Flags);
Added in Genesis3D v1.6
Changes rendering flags for sprite.
Flags should be one of these flags.
GENESISAPI geBoolean GENESISCC geWorld_IsSpritePotentiallyVisible(const geWorld* World, const geSprite* Sprite, const geCamera* Camera);
Added in Genesis3D v1.6
Note: Mirrors aren't checked, and function doesn't check the extents of the sprite, just the center point.
Notes from the Genesis3d forum (author was Jeff):
The geWorld_Create() function will create a world from a .BSP file or create a NULL world if the passed parameter is NULL. The return value is a pointer to a geWorld structure.
The geEngine_AddWorld() function will increase the reference count of the geWorld and copy a reference to the engine's world array. This array is used to keep track of all the worlds in the engine.
The geEngine_RemoveWorld() function will check to see if there are multiple references to the geWorld, if so then it decreases the reference count and returns GE_TRUE. If there is only one reference then it removes the geWorld from the engine's world array and calls the geWorld_Free() function.
The geWorld_Free() function will check to see if there are multiple references to the geWorld, if so then it decreases the reference count and returns. If there is only one reference then it removes the geWorld from memory. This includes calling geActor_Destroy() for every geActor in the world's actor array.