lilith3d Namespace Reference


Detailed Description

The basic debugging call for writing out printf style output to the OpenGL screen.


Classes

class  AnimatedResource
class  AnimatedMesh
class  BuildingMesh
class  Camera
class  LilithObject
class  IMapDraw
class  Lilith3D
struct  Vertex
struct  L3State
class  StateManager
class  MD2Resource
class  MD2Mesh
class  Mesh
class  DecalMesh
class  StaticMesh
class  SolidMesh
class  MeshGroup
class  StaticResource
class  MeshResManager
class  Mob
class  WalkingMob
class  ParticleSystem
class  GravParticles
class  RainDropParticles
class  RainSplashParticles
class  QuadTree
class  ResourcePool
class  Script
class  ISequence
class  BlasterListener
 Interface to get callbacks when blaster fire hits something. More...
class  BlasterSequence
 Create a blaster bolt. More...
class  ShaderManager
class  TerrainDecor
class  TerrainMesh
class  TerrainMorph
class  VolcanoMorph
 The class that generates the volcano change in the terrain. More...
class  PitMorph
 Creates a pit in the world. More...
class  BridgeMorph
 Creates a land bridge in the world. More...
class  FlattenMorph
 Flattens up a section of the world. More...
class  BuildingMorph
 Flattens up a section of the world - and then puts a building there. More...
class  Texture
class  TextureManager
struct  SunMoon
class  TimeClock
class  TreeResource
class  TreeMesh
class  Weather

Enumerations

enum  MeshClass
enum  { SMOOTH_SHADING = 0x01 }

Functions

void DrawCube (float x0, float y0, float z0, float x1, float y1, float z1)
void DrawText (int x, int y, const char *format,...)
void DrawBar (int x, int y, float percent)

Variables

const unsigned MAP_POWER = 8
 The size of the world, expressed as MAPSIZE = 2^MAP_POWER.
const unsigned MIN_LOD = 3
 The min LOD of the terrain mesh. Used to tune performance.
const unsigned DEFAULT_MSEC_PER_DAY = 200 * 1000
 How fast time moves.
const unsigned DEFUALT_MSEC_DAY_START = 5 * DEFAULT_MSEC_PER_DAY / 24
 When game time starts.
const float FAR_PLANE_DISTANCE = 160.0f
const float TERRAIN_FADE = FAR_PLANE_DISTANCE * 0.96f
const float TREE_FADEOUT = FAR_PLANE_DISTANCE * 0.92f
 Object fade out.
const float TREE_FADE = FAR_PLANE_DISTANCE * 0.84f
 Object fade out.
const float OBJECT_FADEOUT = FAR_PLANE_DISTANCE * 0.70f
 Object fade out.
const float OBJECT_FADE = FAR_PLANE_DISTANCE * 0.65f
 Object fade out.
const float FOLIAGE_FADEOUT = FAR_PLANE_DISTANCE * 0.60f
 Foliage fade out.
const float FOLIAGE_FADE = FAR_PLANE_DISTANCE * 0.50f
 Foliage fade out.
const float VIEW_ANGLE = 40.0f
 The viewing angle, in degrees.
const float WORLD_CEILING = 15.0f
const float CAMERA_CEILING = 30.0f
 Where to start effects and such - a "normal" veiw height of the world.
const float TERRAIN_MAX = 10.0f
 The highest possible mountain.
const float TERRAIN_MIN = -TERRAIN_MAX
 The lowest possible (underwater) trench.
const float TRANSPARENT_PIXEL = 0.5f
 Used in fragment shaders to clip pixels which are transparent.
const float TERRAIN1_START = TERRAIN_MAX * 0.05f
const float SHADOW_DIFFUSE = 0.3f
const float TREE_CROSS_START = OBJECT_FADE * 0.20f
const float MAP_TO_METERS = 2.0f
 Conversion function - how many meters is each unit of map distance?
const int TREE_COVERAGE_DIV = 4
 Tree population - how many trees are in the world?
const float WAVE_HEIGHT = 0.15f
 Half amplitude of the water.
const float WATER_EMISSIVE = 0.5f
 How much light the ocean emits.
const float WATER_DIFFUSE = 0.5f
 How much light the ocean diffusively reflects.
const float PASSABLE_MIN = -0.3f
 Pather: A little below the water...but less than the waist height of a person.
const float DROWN = -0.5f
 Pather: The height where a walking mob drowns.


Enumeration Type Documentation

anonymous enum

Enumerator:
SMOOTH_SHADING  If SMOOTH_SHADING set, Lilith will use smooth shading for the whole model, and attempt to blend the edges between faces. Good for natural objects and characters. If not set, the light will fall on hard planes - good for buildings.

enum lilith3d::MeshClass

Meshes need to be sorted very quickly - so quickly the casting is a problem. Each one is created with a uninque MeshClass enum that can be queried via Type() and used for casting.


Function Documentation

void lilith3d::DrawBar ( int  x,
int  y,
float  percent 
)

Draw a complete/progess bar to the top of the surface. Does not check or write the depth buffer. This form makes the screen into a text console of dimensions CONSOLE_WIDTH x CONSOLE_HEIGHT with the origin in the lower left. The width of the bar is BAR_LENGTH.

void lilith3d::DrawCube ( float  x0,
float  y0,
float  z0,
float  x1,
float  y1,
float  z1 
)

Draws a cube of lines. Useful for debugging bounding boxes and such.

void lilith3d::DrawText ( int  x,
int  y,
const char *  format,
  ... 
)

Draw a text string to the top of the surface using the current glColor. Does not check or write the depth buffer. This form makes the screen into a text console of dimensions CONSOLE_WIDTH x CONSOLE_HEIGHT with the origin in the lower left.


Variable Documentation

const float lilith3d::FAR_PLANE_DISTANCE = 160.0f

The distance to the OpenGl far plane. FAR_PLANE_DISTANCE < L3_MAP_SIZE.

const float lilith3d::SHADOW_DIFFUSE = 0.3f

How much of the diffuse term should be in a shadow. Technically, this is 0 (no diffuse light is in a shadow) but it looks better to let in a little diffuse term.

const float lilith3d::TERRAIN1_START = TERRAIN_MAX * 0.05f

TERRAIN0 (Sand) starts at the bottom and runs until TERRAIN1_OPAQUE. TERRAIN1 (Grass) starts at TERRAIN1_START and runs until TERRAIN2_OPAQUE. TERRAIN2 (Snow) starts at TERRAIN2_START and is opaque at TERRAIN2_OPAQUE. It runs to the top.

Why use TERRAINx instead of Sand/Snow/Grass? It can be any terrain. A Scottish highland would be Sand/Grass/RockyGrass for instance, while something far north might be Ice/Snow/IcySnow. And alien worlds even stranger combinations.

The shaders are less "diffuse" than the standard pipeline, so separate values are used.

const float lilith3d::TERRAIN_FADE = FAR_PLANE_DISTANCE * 0.96f

When to start fading the terrain into the far plane. When Objects are completely faded.

const float lilith3d::TREE_CROSS_START = OBJECT_FADE * 0.20f

The tree point crossover. The closer the CROSS_START, the more obvious the transition will be, but the more rendering time it takes. The CROSS_END ends the transition - the difference between the 2 numebrs is how fast the blend occurs. The FAR_CROSS is the transition point where 1/2 the billboard is removed.

const float lilith3d::WORLD_CEILING = 15.0f

The top of the world. No object should be higher than the ceiling. (It will possibly get incorrectly culled if it is.)


Generated on Fri Mar 23 19:36:26 2007 for Lilith3D by  doxygen 1.5.1-p1