| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iLightingInfo Struct Reference
[Mesh plugins]

This interface is implemented by mesh objects that have some kind of lighting system. More...

`#include <imesh/lighting.h>`

Inheritance diagram for iLightingInfo:

[legend]
List of all members.

## Public Member Functions
virtual void | DisconnectAllLights ()=0
| Disconnect all lights from this mesh.
virtual void | InitializeDefault (bool clear)=0
| Initialize the lighting information to some default (mostly black).
virtual void | LightChanged (iLight *light)=0
| Indicate that some light has changed.
virtual void | LightDisconnect (iLight *light)=0
| Indicate that some light no longer affects this mesh.
virtual void | PrepareLighting ()=0
| Finally prepare the lighting for use.
virtual bool | ReadFromCache (iCacheManager *cache_mgr)=0
| Read the lighting information from the cache.
virtual bool | WriteToCache (iCacheManager *cache_mgr)=0
| Write the lighting information to the cache.

## Detailed Description

This interface is implemented by mesh objects that have some kind of lighting system.

It has features to initialize lighting, to read it from a cache, ...

Main creators of instances implementing this interface:

- Several mesh objects implement this.

Main ways to get pointers to this interface:

- scfQueryInterface() on iMeshObject.

Main users of this interface:

- The 3D engine plugin (crystalspace.engine.3d).

Definition at line 50 of file lighting.h.

## Member Function Documentation

virtual void iLightingInfo::DisconnectAllLights | ( |  | ) | `[pure virtual]`

Disconnect all lights from this mesh.

virtual void iLightingInfo::InitializeDefault | ( | bool | clear | ) | `[pure virtual]`

Initialize the lighting information to some default (mostly black).

If clear is true then the lighting is really cleared to black. Otherwise the lighting system is just warned that lighting information is going to be added. This is useful in case a single light is added. Thus the first call to this function should use a clear of true.

virtual void iLightingInfo::LightChanged | ( | iLight * | light | ) | `[pure virtual]`

Indicate that some light has changed.

This function will be called by the lighting system whenever a light that affects this mesh is changed in some way.

virtual void iLightingInfo::LightDisconnect | ( | iLight * | light | ) | `[pure virtual]`

Indicate that some light no longer affects this mesh.

virtual void iLightingInfo::PrepareLighting | ( |  | ) | `[pure virtual]`

Finally prepare the lighting for use.

This function must be called last.

virtual bool iLightingInfo::ReadFromCache | ( | iCacheManager * | cache_mgr | ) | `[pure virtual]`

Read the lighting information from the cache.

Call this instead of InitializeDefault(). Returns false if there was a problem. This function will read the data from the current VFS dir.

virtual bool iLightingInfo::WriteToCache | ( | iCacheManager * | cache_mgr | ) | `[pure virtual]`

Write the lighting information to the cache.

Returns false if there was a problem. This function will write the data to the current VFS dir.

The documentation for this struct was generated from the following file:

- imesh/lighting.h