Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csLightHalo Class Reference

This is used to keep track of halos.<. More...

#include <halo.h>

Inheritance diagram for csLightHalo:

csLightFlareHalo List of all members.

Public Methods

 csLightHalo (csLight *iLight, iHalo *iHandle)
 Create an light halo object.

virtual ~csLightHalo ()
 Destroy the light halo object.

virtual bool Process (csTicks ElapsedTime, csEngine const &)
 Process a light halo. More...

bool IsVisible (csEngine const &engine, csVector3 &v)
 see if camera position is visible, returns it projected onto screen. More...

bool ComputeNewIntensity (csTicks ElapsedTime, float &hintensity, bool halo_vis)
 add up elapsed time, and returns new intensity, given the current halo intensity. More...


Public Attributes

csLightLight
 The light this halo is attached to.

iHaloHandle
 Halo handle as returned by 3D rasterizer.

csTicks LastTime
 Last time we were updated.


Detailed Description

This is used to keep track of halos.<.

p> When the engine detects that a light that is marked to have an halo is directly visible, an object of this type is created and put into a global queue maintained within the engine object. The light starts to brighten until it reaches maximal intensity; when the halo becomes obscured by something or goes out of view the intensity starts to decrease until it reaches zero; upon this event the halo object is destroyed and removed from halo queue.


Member Function Documentation

bool csLightHalo::ComputeNewIntensity ( csTicks ElapsedTime,
float & hintensity,
bool halo_vis )
 

add up elapsed time, and returns new intensity, given the current halo intensity.

Give whether halo is currently visible for fading in and out. returns true if intensity >0, returns false if intensity <= 0, when the halo is completely faded out. Called by Process.

bool csLightHalo::IsVisible ( csEngine const & engine,
csVector3 & v )
 

see if camera position is visible, returns it projected onto screen.

Called by Process.

bool csLightHalo::Process ( csTicks elapsed_time,
csEngine const & engine ) [virtual]
 

Process a light halo.

The function changes halo brightness depending whenever the halo is obscured or not and returns "false" if halo has reached zero intensity and should be removed from halo queue. The function also actually projects, clips and draws the halo.

Reimplemented in csLightFlareHalo.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000