nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
DirectionalLight Class Reference

#include <light.h>

Inheritance diagram for DirectionalLight:
Collaboration diagram for DirectionalLight:

Public Member Functions

 DirectionalLight (uint32_t light_index, const XboxMath::vector_t &direction)
 
void Commit (TestHost &host) const override
 This must not be called for DirectionalLight instances.
 
void Commit (TestHost &host, const XboxMath::vector_t &look_dir) const override
 
- Public Member Functions inherited from Light
uint32_t light_enable_mask () const
 
void SetAmbient (const float *ambient)
 
void SetAmbient (float r, float g, float b)
 
void SetDiffuse (const float *diffuse)
 
void SetDiffuse (float r, float g, float b)
 
void SetSpecular (const float *specular)
 
void SetSpecular (float r, float g, float b)
 
void SetBackAmbient (const float *ambient)
 
void SetBackAmbient (float r, float g, float b)
 
void SetBackDiffuse (const float *diffuse)
 
void SetBackDiffuse (float r, float g, float b)
 
void SetBackSpecular (const float *specular)
 
void SetBackSpecular (float r, float g, float b)
 

Additional Inherited Members

- Protected Member Functions inherited from Light
 Light (uint32_t light_index, uint32_t enable_mask)
 
- Protected Attributes inherited from Light
uint32_t light_index_
 
uint32_t light_enable_mask_
 
float ambient_ [3] {0.f, 0.f, 0.f}
 
float diffuse_ [3] {1.f, 1.f, 1.f}
 
float specular_ [3] {0.f, 0.f, 0.f}
 
float back_ambient_ [3] {0.f, 0.f, 0.f}
 
float back_diffuse_ [3] {1.f, 1.f, 1.f}
 
float back_specular_ [3] {0.f, 0.f, 0.f}
 

Detailed Description

Sets up a directional light.

Constructor & Destructor Documentation

◆ DirectionalLight()

DirectionalLight::DirectionalLight ( uint32_t  light_index,
const XboxMath::vector_t &  direction 
)

Constructs a new DirectionalLight instance.

Parameters
light_indexHardware light index
directionWorld coordinate direction of the spotlight

Member Function Documentation

◆ Commit() [1/2]

void DirectionalLight::Commit ( TestHost host) const
overridevirtual

This must not be called for DirectionalLight instances.

Reimplemented from Light.

◆ Commit() [2/2]

void DirectionalLight::Commit ( TestHost host,
const XboxMath::vector_t &  look_direction 
) const
overridevirtual

Sets up nv2a registers for this Light.

Parameters
hostTestHost used to render this Light
look_directionNormalized forward vector of the camera

Reimplemented from Light.


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