torque Torque Game Engine Documentation
TGE Version 1.5.2

sgPlanarLightMap Class Reference

#include <sgLightMap.h>

Inheritance diagram for sgPlanarLightMap:

Inheritance graph
[legend]

Detailed Description

Used to generate light maps on interiors.

This class will calculate one surface at a time (using sgPlanarLightMap::sgSurfaceIndex).


Public Types

enum  sgLightingPass {
  sglpInner = 0,
  sglpOuter,
  sglpCount
}
enum  sgAdjacent {
  sgaTrue,
  sgaFalse,
  sgaMaybe
}

Public Member Functions

 sgPlanarLightMap (U32 width, U32 height, InteriorInstance *interior, Interior *detail, S32 surface, ConstructorSimpleMesh *staticmesh, PlaneF surfaceplane, const Vector< sgSmoothingVert > &tristrip)
void sgMergeLighting (GBitmap *lightmap, U32 xoffset, U32 yoffset)
 Transfer the light map to a GBitmap and blur.
void sgSetupLighting ()
 See: sgLightMap::sgCalculateLighting.
virtual void sgCalculateLighting (LightInfo *light)
 Object specific light mapping calculations are done here.
bool sgIsDirty ()

Data Fields

PlaneF surfacePlane
 Surface to generate light map.
Vector< sgSmoothingVerttriStrip
bool sgUseSmoothing
S32 sgSAxis
S32 sgTAxis
bool sgFlippedWindings
Box3F sgSurfaceBox
Vector< sgLexelsgInnerLexels
Vector< sgLexelsgOuterLexels
InteriorInstancesgInteriorInstance
InteriorsgInteriorDetail
S32 sgInteriorSurface
ConstructorSimpleMeshsgInteriorStaticMesh

Protected Member Functions

void sgBuildDerivatives (sgSmoothingTri &tri)
void sgBuildLexels (const Vector< sgSmoothingTri > &tris)
bool sgCastRay (Point3F s, Point3F e, SceneObject *obj, Interior *detail, ConstructorSimpleMesh *sm, sgOccluder &occluderinfo)
bool sgIsValidOccluder (const sgOccluder &occluderinfo, hash_multimap< void *, sgOccluder > &validoccluders, bool isinnerlexel)
sgAdjacent sgAreAdjacent (U32 surface1, U32 surface2)
 Try to avoid false shadows by ignoring direct neighbors.

Protected Attributes

bool sgDirty

Static Protected Attributes

static U32 sgCurrentOccluderMaskId

Data Structures

struct  sgLexel
struct  sgOccluder
struct  sgSmoothingTri
struct  sgSmoothingVert


Member Enumeration Documentation

Enumerator:
sglpInner 
sglpOuter 
sglpCount 

Enumerator:
sgaTrue 
sgaFalse 
sgaMaybe 


Constructor & Destructor Documentation

sgPlanarLightMap::sgPlanarLightMap ( U32  width,
U32  height,
InteriorInstance interior,
Interior detail,
S32  surface,
ConstructorSimpleMesh staticmesh,
PlaneF  surfaceplane,
const Vector< sgSmoothingVert > &  tristrip 
) [inline]


Member Function Documentation

void sgPlanarLightMap::sgMergeLighting ( GBitmap lightmap,
U32  xoffset,
U32  yoffset 
)

Transfer the light map to a GBitmap and blur.

void sgPlanarLightMap::sgSetupLighting (  ) 

virtual void sgPlanarLightMap::sgCalculateLighting ( LightInfo light  )  [virtual]

Object specific light mapping calculations are done here.

Implements sgLightMap.

bool sgPlanarLightMap::sgIsDirty (  )  [inline]

void sgPlanarLightMap::sgBuildDerivatives ( sgSmoothingTri tri  )  [protected]

void sgPlanarLightMap::sgBuildLexels ( const Vector< sgSmoothingTri > &  tris  )  [protected]

bool sgPlanarLightMap::sgCastRay ( Point3F  s,
Point3F  e,
SceneObject obj,
Interior detail,
ConstructorSimpleMesh sm,
sgOccluder occluderinfo 
) [protected]

bool sgPlanarLightMap::sgIsValidOccluder ( const sgOccluder occluderinfo,
hash_multimap< void *, sgOccluder > &  validoccluders,
bool  isinnerlexel 
) [protected]

sgAdjacent sgPlanarLightMap::sgAreAdjacent ( U32  surface1,
U32  surface2 
) [protected]

Try to avoid false shadows by ignoring direct neighbors.


Field Documentation

Surface to generate light map.

bool sgPlanarLightMap::sgDirty [protected]




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen