Crystal Space: csLightProperties Struct Reference (Crystal Space Public API Reference)

| ## Public API Reference

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

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

# csLightProperties Struct Reference

Light properties, as needed by the attenuation and lighting functors. More...

`#include <csgfx/vertexlight.h>`

List of all members.

## Public Member Functions
| csLightProperties (size_t lightNum, csLightShaderVarCache &svcache, const iShaderVarStack *Stacks)
| Convenience constructor to fill the structure from a set of shader variables.
| csLightProperties ()
## Public Attributes
csVector3 | attenuationConsts
| Attenuation coefficients (for CLQ attenuation).
csLightAttenuationMode | attenuationMode
| Light attenuation mode.
csColor | color
| Light diffuse color.
csVector3 | dirObject
| Light direction (object space).
csVector3 | posObject
| Light position (object space).
csColor | specular
| Specular color.
float | spotFalloffInner
| Spotlight inner falloff.
float | spotFalloffOuter
| Spotlight outer falloff.
csLightType | type
| Light type.

## Detailed Description

Light properties, as needed by the attenuation and lighting functors.

Definition at line 42 of file vertexlight.h.

## Constructor & Destructor Documentation

csLightProperties::csLightProperties | ( | size_t | lightNum,
|  | csLightShaderVarCache & | svcache,
|  | const iShaderVarStack * | Stacks |
| ) |  |  | `[inline]`

Convenience constructor to fill the structure from a set of shader variables.

Definition at line 72 of file vertexlight.h.

References attenuationConsts, attenuationMode, color, CS_ATTN_NONE, CS_LIGHT_POINTLIGHT, dirObject, iArrayReadOnly< T >::Get(), csLightShaderVarCache::GetLightSVId(), iArrayReadOnly< T >::GetSize(), csShaderVariable::GetValue(), csLightShaderVarCache::lightAttenuation, csLightShaderVarCache::lightAttenuationMode, csLightShaderVarCache::lightDiffuse, csLightShaderVarCache::lightDirection, csLightShaderVarCache::lightInnerFalloff, csLightShaderVarCache::lightOuterFalloff, csLightShaderVarCache::lightPosition, csLightShaderVarCache::lightSpecular, csLightShaderVarCache::lightType, posObject, specular, spotFalloffInner, spotFalloffOuter, and type.

## Member Data Documentation

csVector3 csLightProperties::attenuationConsts

Attenuation coefficients (for CLQ attenuation).

Definition at line 45 of file vertexlight.h.

Referenced by csLightProperties(), and csLinearAttenuation::csLinearAttenuation().

csLightAttenuationMode csLightProperties::attenuationMode

Light attenuation mode.

Definition at line 62 of file vertexlight.h.

Referenced by csLightProperties().

csColor csLightProperties::color

Light diffuse color.

Definition at line 54 of file vertexlight.h.

Referenced by csLightProperties().

csVector3 csLightProperties::dirObject

Light direction (object space).

Remarks:
  Should be a unit vector.

Definition at line 52 of file vertexlight.h.

Referenced by csDirectionalLightProc< AttenuationProc >::csDirectionalLightProc(), csLightProperties(), and csSpotLightProc< AttenuationProc >::csSpotLightProc().

csVector3 csLightProperties::posObject

Light position (object space).

Definition at line 47 of file vertexlight.h.

Referenced by csDirectionalLightProc< AttenuationProc >::csDirectionalLightProc(), csLightProperties(), csPointLightProc< AttenuationProc >::csPointLightProc(), and csSpotLightProc< AttenuationProc >::csSpotLightProc().

csColor csLightProperties::specular

Specular color.

Definition at line 64 of file vertexlight.h.

Referenced by csLightProperties().

float csLightProperties::spotFalloffInner

Spotlight inner falloff.

Definition at line 56 of file vertexlight.h.

Referenced by csLightProperties(), and csSpotLightProc< AttenuationProc >::csSpotLightProc().

float csLightProperties::spotFalloffOuter

Spotlight outer falloff.

Definition at line 58 of file vertexlight.h.

Referenced by csLightProperties(), and csSpotLightProc< AttenuationProc >::csSpotLightProc().

csLightType csLightProperties::type

Light type.

Definition at line 60 of file vertexlight.h.

Referenced by csLightProperties().

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

- csgfx/vertexlight.h