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

#include <light.h>

Inheritance diagram for Light:

Public Member Functions

virtual void Commit (TestHost &host) const
 
virtual void Commit (TestHost &host, const XboxMath::vector_t &look_direction) const
 
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)
 

Protected Member Functions

 Light (uint32_t light_index, uint32_t enable_mask)
 

Protected Attributes

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

Provides functionality to set up a hardware light source.

Constructor & Destructor Documentation

◆ Light()

Light::Light ( uint32_t  light_index,
uint32_t  enable_mask 
)
protected

Constructs a Light.

Parameters
light_index- The hardware light to configure.
enable_mask- The unshifted NV097_SET_LIGHT_ENABLE_MASK_LIGHT0_x value specifying the type of the light.

Member Function Documentation

◆ Commit() [1/2]

void Light::Commit ( TestHost host) const
virtual

Reimplemented in DirectionalLight.

◆ Commit() [2/2]

void Light::Commit ( TestHost host,
const XboxMath::vector_t &  look_direction 
) const
virtual

Sets up nv2a registers for this Light.

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

Reimplemented in DirectionalLight.


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