3D City v-1.0
Computer Graphics Project
pointLight Struct Reference

pointlight More...

#include <pointLight.h>

Inheritance diagram for pointLight:
node

Public Member Functions

 pointLight (const vec3 &pos, const float &intensity, Mesh *mesh=nullptr, const color &diffcol=color(255))
 
void delpos (const vec3 &delta)
 
void setpos (const vec3 &newPos)
 
void setdiffColor (const color &color)
 
void setColor (const vec3 &col)
 
const vec3 & getpos () const
 
const color & get_diffuse_color () const
 
const color & get_ambient_color () const
 
- Public Member Functions inherited from node
void delpos (const vec3 &delta)
 
void setpos (const vec3 &position)
 
void setScale (const vec3 &scale)
 
void setRotation (float angle, const vec3 &axis)
 
const mat4f & refreshModel ()
 
void draw (engine &graphicsEngine, mat4f matModel_in=mat4f())
 

Public Attributes

float intensity
 
float constant = 1
 
float linear = 0.09
 
float quadratic = 0.032
 
- Public Attributes inherited from node
std::unordered_map< std::string, node * > children
 
std::vector< drawable< Vertex > * > meshes
 
mat4f matModel = mat4f()
 

Private Attributes

vec3 position
 
color diffuseColor
 
color ambientColor = color(255)
 

Detailed Description

pointlight

Definition at line 9 of file pointLight.h.

Constructor & Destructor Documentation

◆ pointLight()

pointLight::pointLight ( const vec3 &  pos,
const float &  intensity,
Mesh *  mesh = nullptr,
const color &  diffcol = color(255) 
)
inline

Definition at line 25 of file pointLight.h.

Member Function Documentation

◆ delpos()

void pointLight::delpos ( const vec3 &  delta)
inline

Definition at line 33 of file pointLight.h.

◆ get_ambient_color()

const color & pointLight::get_ambient_color ( ) const
inline

Definition at line 66 of file pointLight.h.

◆ get_diffuse_color()

const color & pointLight::get_diffuse_color ( ) const
inline

Definition at line 65 of file pointLight.h.

◆ getpos()

const vec3 & pointLight::getpos ( ) const
inline

Definition at line 64 of file pointLight.h.

◆ setColor()

void pointLight::setColor ( const vec3 &  col)
inline

Definition at line 59 of file pointLight.h.

◆ setdiffColor()

void pointLight::setdiffColor ( const color &  color)
inline

Definition at line 51 of file pointLight.h.

◆ setpos()

void pointLight::setpos ( const vec3 &  newPos)
inline

Definition at line 38 of file pointLight.h.

Member Data Documentation

◆ ambientColor

color pointLight::ambientColor = color(255)
private

Definition at line 13 of file pointLight.h.

◆ constant

float pointLight::constant = 1

Definition at line 18 of file pointLight.h.

◆ diffuseColor

color pointLight::diffuseColor
private

Definition at line 12 of file pointLight.h.

◆ intensity

float pointLight::intensity

Definition at line 16 of file pointLight.h.

◆ linear

float pointLight::linear = 0.09

Definition at line 19 of file pointLight.h.

◆ position

vec3 pointLight::position
private

Definition at line 11 of file pointLight.h.

◆ quadratic

float pointLight::quadratic = 0.032

Definition at line 20 of file pointLight.h.