Rasterfarm-SDK
Loading...
Searching...
No Matches
Pixel::Light Class Referenceabstract

#include <light.h>

Inheritance diagram for Pixel::Light:
Pixel::Factor ViewUpdate Component Pixel::PointLight

Public Member Functions

 Light (float *pLightPosition, const Attribute &attribute)
 
virtual ~Light ()
 
virtual void create (Material *pMaterial)=0
 
virtual void update (Material *pMaterial)=0
 
virtual void addShaderResources (Material *pMaterial)
 
virtual void addShaderCode (Material *pMaterial)=0
 
virtual void set (const Matrix4f &view)
 
void setLight (float *pPosition)
 
void setAmbient (const Vertex3f &color)
 
void setSpecular (const Vertex3f &color)
 
void setDiffuse (const Vertex3f &color)
 
void setShine (float shine)
 
const String & getVaryingString ()
 
- Public Member Functions inherited from Pixel::Factor
 Factor (const Attribute &attribute)
 
virtual ~Factor ()
 

Public Attributes

Vertex3f viewPosition
 
Vector3f ambient
 
Vector3f specular
 
Vector3f diffuse
 
float shine
 
float * pLightPosition
 

Protected Attributes

String uniformLightPositionString
 
String uniformAmbientColorString
 
String uniformSpecularColorString
 
String uniformDiffuseColorString
 
String uniformShineString
 
String varyingLightString
 

Friends

class ColorLightMaterial
 
class ColorLightTexture2DMaterial
 

Constructor & Destructor Documentation

◆ Light()

Pixel::Light::Light ( float * pLightPosition,
const Attribute & attribute )

◆ ~Light()

virtual Pixel::Light::~Light ( )
virtual

Member Function Documentation

◆ addShaderCode()

virtual void Pixel::Light::addShaderCode ( Material * pMaterial)
pure virtual

Implements Pixel::Factor.

Implemented in Pixel::PointLight.

◆ addShaderResources()

virtual void Pixel::Light::addShaderResources ( Material * pMaterial)
virtual

Implements Pixel::Factor.

Reimplemented in Pixel::PointLight.

◆ create()

virtual void Pixel::Light::create ( Material * pMaterial)
pure virtual

Implements Pixel::Factor.

Implemented in Pixel::PointLight.

◆ getVaryingString()

const String & Pixel::Light::getVaryingString ( )
inline

◆ set()

virtual void Pixel::Light::set ( const Matrix4f & view)
virtual

◆ setAmbient()

void Pixel::Light::setAmbient ( const Vertex3f & color)

◆ setDiffuse()

void Pixel::Light::setDiffuse ( const Vertex3f & color)

◆ setLight()

void Pixel::Light::setLight ( float * pPosition)
inline

◆ setShine()

void Pixel::Light::setShine ( float shine)

◆ setSpecular()

void Pixel::Light::setSpecular ( const Vertex3f & color)

◆ update()

virtual void Pixel::Light::update ( Material * pMaterial)
pure virtual

Implements Pixel::Factor.

Implemented in Pixel::PointLight.

Friends And Related Symbol Documentation

◆ ColorLightMaterial

friend class ColorLightMaterial
friend

◆ ColorLightTexture2DMaterial

friend class ColorLightTexture2DMaterial
friend

Member Data Documentation

◆ ambient

Vector3f Pixel::Light::ambient

Array describing the color of the ambient light. Ambient-light is independent of light-position and view-position.

◆ diffuse

Vector3f Pixel::Light::diffuse

Array describing the color of the diffuse light. Diffuse-light is dependent on the light-position.

◆ pLightPosition

float* Pixel::Light::pLightPosition

The light within the scene.

◆ shine

float Pixel::Light::shine

Factor of 'shine' for the light.

◆ specular

Vector3f Pixel::Light::specular

Array describing the color of the specular light. Specular-light is dependent on the light-position and view-position.

◆ uniformAmbientColorString

String Pixel::Light::uniformAmbientColorString
protected

The color of ambient-light.

◆ uniformDiffuseColorString

String Pixel::Light::uniformDiffuseColorString
protected

The color of diffuse-light.

◆ uniformLightPositionString

String Pixel::Light::uniformLightPositionString
protected

The position of the light-source

◆ uniformShineString

String Pixel::Light::uniformShineString
protected

The factor of shine with respect to the view-position.

◆ uniformSpecularColorString

String Pixel::Light::uniformSpecularColorString
protected

The color of specular-light.

◆ varyingLightString

String Pixel::Light::varyingLightString
protected

◆ viewPosition

Vertex3f Pixel::Light::viewPosition

This is the position of the view-matrix or camera-source and the represents the point-of-view.


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