# A3DGraphSpotLightData

struct `A3DGraphSpotLightData`

  Data for a spotlight source entity (`A3DGraphSpotLight`)

  > 2.0

  A spotlight is a lighting source with a given position which casts lights within a specific direction. Only the objects within a given radius of the spotlight’s direction are illuminated, with the light rays fading over the distance. Spotlights can be interpreted as more restrictive point lights, where only a subset of the scene is illuminated from it.

  All colors within this structure are global indexes to RGB color codes. The actual values can be queried using `A3DGlobalGetGraphRgbColorData`.

  `A3DGraphSpotLightData`is one of the four light source types provided by HOOPS. It is associated to the `kA3DTypeGraphSpotLight`entity type. The other available light sources are `A3DGraphAmbientLightData`, `A3DGraphPointLightData`and `A3DGraphDirectionalLightData`.

  > `A3DGraphSpotLightGet()`

  > `A3DGraphSpotLightCreate()`

  > `A3DGraphRgbColorData`

  > `A3DGlobalGetGraphRgbColorData()`

  > `A3DGlobalInsertGraphRgbColor()`

  > `A3DGraphMaterialData`

  > `A3DGraphAmbientLightData`

  > `A3DGraphDirectionalLightData`

  > `A3DGraphPointLightData`

  ## Index

  Variables

  - `m_uiAmbientColorIndex`
  - `m_uiDiffuseColorIndex`
  - `m_uiSpecularColorIndex`
  - `m_sDirection`
  - `m_dFallOffAngle`
  - `m_dFallOffExponent`
  - `m_sLocation`
  - `m_dConstantAttenuation`
  - `m_dLinearAttenuation`
  - `m_dQuadraticAttenuation`

Variables

A3DUns32 `A3DGraphSpotLightData.``m_uiAmbientColorIndex`
  `A3DUns32`

  The main or ambient color of the light source.

A3DUns32 `A3DGraphSpotLightData.``m_uiDiffuseColorIndex`
  `A3DUns32`

  The diffuse color of the light source.

A3DUns32 `A3DGraphSpotLightData.``m_uiSpecularColorIndex`
  `A3DUns32`

  The specular color of the light source.

A3DVector3dData `A3DGraphSpotLightData.``m_sDirection`
  `A3DVector3dData`

  The direction of the spotlight, expressed in world space coordinates.

A3DDouble `A3DGraphSpotLightData.``m_dFallOffAngle`
  `A3DDouble`

  Spotlight angle.

A3DDouble `A3DGraphSpotLightData.``m_dFallOffExponent`
  `A3DDouble`

  Fall of factor, expressed as a scale of `m_dFallOffAngle`:[0.0;1.0]

A3DVector3dData `A3DGraphSpotLightData.``m_sLocation`
  `A3DVector3dData`

  The light source position in world space coordinates.

A3DDouble `A3DGraphSpotLightData.``m_dConstantAttenuation`
  `A3DDouble`

  Constant attenuation factor usually set to 1.0.

A3DDouble `A3DGraphSpotLightData.``m_dLinearAttenuation`
  `A3DDouble`

  Linear attenuation factor.

A3DDouble `A3DGraphSpotLightData.``m_dQuadraticAttenuation`
  `A3DDouble`

  Quadratic attenuation factor.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Exchange in your own language, or choose a sample question below to start a conversation:

What is HOOPS Exchange?
What are the latest release notes for HOOPS Exchange?
How do I start evaluating HOOPS Exchange?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...