Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
Holds all information for a single light object. More...
#include <gfxlib_struct.h>
Public Member Functions | |
GFXLight () | |
GFXLight (const bool enabled, const GFXColor &vect, const GFXColor &diffuse=GFXColor(0, 0, 0, 1), const GFXColor &specular=GFXColor(0, 0, 0, 1), const GFXColor &ambient=GFXColor(0, 0, 0, 1), const GFXColor &attenuate=GFXColor(1, 0, 0), const GFXColor &direction=GFXColor(0, 0, 0), float exp=0.0f, float cutoff=180.0f, float size=0.0f) | |
void | SetProperties (enum LIGHT_TARGET, const GFXColor &color) |
GFXColor | GetProperties (enum LIGHT_TARGET) const |
void | setSize (float size_) |
float | getSize () const |
Vector | getPosition () const |
void | disable () |
void | enable () |
bool | attenuated () const |
void | apply_attenuate (bool attenuated) |
Public Attributes | |
int | target |
physical GL light its saved in More... | |
float | vect [3] |
last is w for positional, otherwise 3 for spec More... | |
int | options |
float | diffuse [4] |
float | specular [4] |
float | ambient [4] |
float | attenuate [3] |
float | direction [3] |
float | exp |
float | cutoff |
float | size |
Holds all information for a single light object.
Definition at line 341 of file gfxlib_struct.h.
|
inline |
GFXLight::GFXLight | ( | const bool | enabled, |
const GFXColor & | vect, | ||
const GFXColor & | diffuse = GFXColor( 0, 0, 0, 1 ) , |
||
const GFXColor & | specular = GFXColor( 0, 0, 0, 1 ) , |
||
const GFXColor & | ambient = GFXColor( 0, 0, 0, 1 ) , |
||
const GFXColor & | attenuate = GFXColor( 1, 0, 0 ) , |
||
const GFXColor & | direction = GFXColor( 0, 0, 0 ) , |
||
float | exp = 0.0f , |
||
float | cutoff = 180.0f , |
||
float | size = 0.0f |
||
) |
Definition at line 4 of file gfxlib_struct_server.cpp.
void GFXLight::apply_attenuate | ( | bool | attenuated) |
Definition at line 131 of file gl_light.cpp.
References GFX_ATTENUATED, and options.
Referenced by gfx_light::ResetProperties(), and SetProperties().
bool GFXLight::attenuated | ( | ) | const |
Definition at line 126 of file gl_light.cpp.
Referenced by gfx_light::FinesseClobberLight(), picklight(), gfx_light::ResetProperties(), and SetProperties().
void GFXLight::disable | ( | ) |
Definition at line 116 of file gl_light.cpp.
References GFX_LIGHT_ENABLED, and options.
Referenced by gfx_light::Create(), and gfx_light::Disable().
void GFXLight::enable | ( | ) |
Definition at line 121 of file gl_light.cpp.
References GFX_LIGHT_ENABLED, and options.
Referenced by gfx_light::Enable().
|
inline |
Definition at line 393 of file gfxlib_struct.h.
References Vector.
Referenced by GFXUploadLightState().
GFXColor GFXLight::GetProperties | ( | enum LIGHT_TARGET | lighttarg) | const |
|
inline |
Definition at line 391 of file gfxlib_struct.h.
References size.
Referenced by GFXUploadLightState().
void GFXLight::SetProperties | ( | enum LIGHT_TARGET | lighttarg, |
const GFXColor & | color | ||
) |
Definition at line 138 of file gl_light.cpp.
References GFXColor::a, AMBIENT, apply_attenuate(), ATTENUATE, attenuated(), GFXColor::b, DIFFUSE, EMISSION, GFXColor::g, POSITION, GFXColor::r, and SPECULAR.
Referenced by gfx_light::ResetProperties(), and Atmosphere::Update().
|
inline |
float GFXLight::ambient[4] |
Definition at line 351 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), gfx_light::CalculateBounds(), gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), MeshFX::MergeLights(), and gfx_light::ResetProperties().
float GFXLight::attenuate[3] |
Definition at line 352 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), attenuatedIntensity(), gfx_light::CalculateBounds(), gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), gfx_light::ResetProperties(), and MeshFX::Update().
float GFXLight::cutoff |
Definition at line 355 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), attenuatedIntensity(), NetBuffer::getGFXLight(), GFXLight(), and picklight().
float GFXLight::diffuse[4] |
Definition at line 349 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), attenuatedIntensity(), gfx_light::CalculateBounds(), gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), MeshFX::MergeLights(), and gfx_light::ResetProperties().
float GFXLight::direction[3] |
Definition at line 353 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), NetBuffer::getGFXLight(), and GFXLight().
float GFXLight::exp |
Definition at line 354 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), NetBuffer::getGFXLight(), and GFXLight().
int GFXLight::options |
Definition at line 348 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), apply_attenuate(), gfx_light::ClobberGLLight(), gfx_light::Create(), gfx_light::Disable(), disable(), gfx_light::dopickenables(), enable(), gfx_light::enabled(), NetBuffer::getGFXLight(), GFXLight(), gfx_light::Kill(), gfx_light::LocalLight(), MeshFX::MergeLights(), and gfx_light::TrashFromGLLights().
float GFXLight::size |
Definition at line 356 of file gfxlib_struct.h.
Referenced by getSize(), GFXLight(), and setSize().
float GFXLight::specular[4] |
Definition at line 350 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), attenuatedIntensity(), gfx_light::CalculateBounds(), gfx_light::ContextSwitchClobberLight(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), MeshFX::MergeLights(), and gfx_light::ResetProperties().
int GFXLight::target |
physical GL light its saved in
Definition at line 345 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), gfx_light::ClobberGLLight(), gfx_light::ContextSwitchClobberLight(), gfx_light::Disable(), gfx_light::Enable(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), gfx_light::Kill(), gfx_light::ResetProperties(), gfx_light::Target(), and gfx_light::TrashFromGLLights().
float GFXLight::vect[3] |
last is w for positional, otherwise 3 for spec
Definition at line 347 of file gfxlib_struct.h.
Referenced by NetBuffer::addGFXLight(), attenuatedIntensity(), gfx_light::CalculateBounds(), gfx_light::FinesseClobberLight(), NetBuffer::getGFXLight(), GFXLight(), MeshFX::MergeLights(), gfx_light::ResetProperties(), and gfx_light::SendGLPosition().