csVertexLightCalculator< LightProc > Class Template Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
csVertexLightCalculator< LightProc > Class Template Reference

iVertexLightCalculator implementation that takes one of csPointLightProc, csDirectionalLightProc or csSpotLightProc for LightProc to compute lighting for a light of the respective type. More...

`#include <csgfx/vertexlight.h>`

Inheritance diagram for csVertexLightCalculator< LightProc >:

List of all members.

## Public Member Functions
virtual void | CalculateLighting (const csLightProperties &light, const csVector3 &eyePos, float shininess, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, iRenderBuffer *litColor, iRenderBuffer *specColor=0) const
| Compute lighting, overwrite the destination colors.
virtual void | CalculateLightingAdd (const csLightProperties &light, const csVector3 &eyePos, float shininess, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, iRenderBuffer *litColor, iRenderBuffer *specColor=0) const
| Compute lighting, add lit colors to the destination colors.
virtual void | CalculateLightingMul (const csLightProperties &light, const csVector3 &eyePos, float shininess, size_t numvert, iRenderBuffer *vb, iRenderBuffer *nb, iRenderBuffer *litColor, iRenderBuffer *specColor=0) const
| Compute lighting, multiply lit colors with destination colors.

## Detailed Description

### template<class LightProc>
class csVertexLightCalculator< LightProc >

iVertexLightCalculator implementation that takes one of csPointLightProc, csDirectionalLightProc or csSpotLightProc for LightProc to compute lighting for a light of the respective type.

Definition at line 468 of file vertexlight.h.

## Member Function Documentation

template<class LightProc >

virtual void csVertexLightCalculator< LightProc >::CalculateLighting | ( | const csLightProperties & | light,
|  | const csVector3 & | eyePos,
|  | float | shininess,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | iRenderBuffer * | litColor,
|  | iRenderBuffer * | specColor = `0`
| ) |  | const`[inline, virtual]`

Compute lighting, overwrite the destination colors.

Parameters:

  light | Properties of the light to compute.
  eyePos | Position of the eye, in object space.
  shininess | Specular exponent.
  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 buffer for diffuse colors.
  specColor | Destination buffer for specular colors.

Implements iVertexLightCalculator.

Definition at line 595 of file vertexlight.h.

template<class LightProc >

virtual void csVertexLightCalculator< LightProc >::CalculateLightingAdd | ( | const csLightProperties & | light,
|  | const csVector3 & | eyePos,
|  | float | shininess,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | iRenderBuffer * | litColor,
|  | iRenderBuffer * | specColor = `0`
| ) |  | const`[inline, virtual]`

Compute lighting, add lit colors to the destination colors.

Compute lighting, overwrite the destination colors.

Parameters:

  light | Properties of the light to compute.
  eyePos | Position of the eye, in object space.
  shininess | Specular exponent.
  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 buffer for diffuse colors.
  specColor | Destination buffer for specular colors.

Implements iVertexLightCalculator.

Definition at line 604 of file vertexlight.h.

template<class LightProc >

virtual void csVertexLightCalculator< LightProc >::CalculateLightingMul | ( | const csLightProperties & | light,
|  | const csVector3 & | eyePos,
|  | float | shininess,
|  | size_t | numvert,
|  | iRenderBuffer * | vb,
|  | iRenderBuffer * | nb,
|  | iRenderBuffer * | litColor,
|  | iRenderBuffer * | specColor = `0`
| ) |  | const`[inline, virtual]`

Compute lighting, multiply lit colors with destination colors.

Compute lighting, overwrite the destination colors.

Parameters:

  light | Properties of the light to compute.
  eyePos | Position of the eye, in object space.
  shininess | Specular exponent.
  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 buffer for diffuse colors.
  specColor | Destination buffer for specular colors.

Implements iVertexLightCalculator.

Definition at line 613 of file vertexlight.h.

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

- csgfx/vertexlight.h