## Public API Reference

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

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

# iVertexLightCalculator Struct Reference

Interface to calculate lighting for a number of vertices. More...

`#include <csgfx/vertexlight.h>`

Inheritance diagram for iVertexLightCalculator:

[legend]
List of all members.

## Public Member Functions

virtual void | CalculateLighting (const csLightProperties &light, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, csColor *litColor) const =0
| Compute lighting, overwrite the destination colors.
virtual void | CalculateLightingAdd (const csLightProperties &light, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, csColor *litColor) const =0
| Compute lighting, add lit colors to the destination colors.
virtual void | CalculateLightingMul (const csLightProperties &light, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, csColor *litColor) const =0
| Compute lighting, multiply lit colors with destination colors.

## Detailed Description

Interface to calculate lighting for a number of vertices.

Definition at line 338 of file vertexlight.h.

## Member Function Documentation

virtual void iVertexLightCalculator::CalculateLighting | ( | const csLightProperties & | light,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | csColor * | litColor
| ) | const`[pure virtual]`

Compute lighting, overwrite the destination colors.

Parameters:

  | light | Properties of the light to compute.
  | numvert | Number of vertices and normals.
  | vb | Vertices. Buffer should contain (at least) 3 component vectors.
  | nb | Normals. Buffer should contain (at least) 3 component vectors.
  | litColor | Destination colors.

Implemented in csVertexLightCalculator< LightProc >.

virtual void iVertexLightCalculator::CalculateLightingAdd | ( | const csLightProperties & | light,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | csColor * | litColor
| ) | const`[pure virtual]`

Compute lighting, add lit colors to the destination colors.

Compute lighting, overwrite the destination colors.

Parameters:

  | light | Properties of the light to compute.
  | numvert | Number of vertices and normals.
  | vb | Vertices. Buffer should contain (at least) 3 component vectors.
  | nb | Normals. Buffer should contain (at least) 3 component vectors.
  | litColor | Destination colors.

Implemented in csVertexLightCalculator< LightProc >.

virtual void iVertexLightCalculator::CalculateLightingMul | ( | const csLightProperties & | light,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | csColor * | litColor
| ) | const`[pure virtual]`

Compute lighting, multiply lit colors with destination colors.

Compute lighting, overwrite the destination colors.

Parameters:

  | light | Properties of the light to compute.
  | numvert | Number of vertices and normals.
  | vb | Vertices. Buffer should contain (at least) 3 component vectors.
  | nb | Normals. Buffer should contain (at least) 3 component vectors.
  | litColor | Destination colors.

Implemented in csVertexLightCalculator< LightProc >.

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

- csgfx/vertexlight.h