ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
Loading...
Searching...
No Matches
anonymous_namespace{lighting.cpp} Namespace Reference

Functions

float hash (uint32_t x)
 
float noise (double x)
 
float wrap (float time, float length)
 
asw::Color scale_color (const asw::Color &color, float amount)
 
void textured_fan (const asw::Texture &texture, const Vec2< float > &center, float radius, const Polygonf &points, const asw::Color &color, bool closed)
 
Polygonf arc (const Vec2< float > &center, float radius, float direction, float cone)
 
std::size_t cell (int x, int y, int width)
 
bool is_spot (float cone)
 

Variables

constexpr float TAU = std::numbers::pi_v<float> * 2.0F
 
constexpr int GRADIENT_SIZE = 256
 
constexpr float SHADOW_FAR = 100000.0F
 

Function Documentation

◆ arc()

Polygonf anonymous_namespace{lighting.cpp}::arc ( const Vec2< float > & center,
float radius,
float direction,
float cone )

Definition at line 97 of file lighting.cpp.

◆ cell()

std::size_t anonymous_namespace{lighting.cpp}::cell ( int x,
int y,
int width )

Definition at line 111 of file lighting.cpp.

◆ hash()

float anonymous_namespace{lighting.cpp}::hash ( uint32_t x)

Definition at line 27 of file lighting.cpp.

◆ is_spot()

bool anonymous_namespace{lighting.cpp}::is_spot ( float cone)

Definition at line 117 of file lighting.cpp.

◆ noise()

float anonymous_namespace{lighting.cpp}::noise ( double x)

Definition at line 36 of file lighting.cpp.

◆ scale_color()

asw::Color anonymous_namespace{lighting.cpp}::scale_color ( const asw::Color & color,
float amount )

Definition at line 51 of file lighting.cpp.

◆ textured_fan()

void anonymous_namespace{lighting.cpp}::textured_fan ( const asw::Texture & texture,
const Vec2< float > & center,
float radius,
const Polygonf & points,
const asw::Color & color,
bool closed )

Definition at line 60 of file lighting.cpp.

◆ wrap()

float anonymous_namespace{lighting.cpp}::wrap ( float time,
float length )

Definition at line 45 of file lighting.cpp.

Variable Documentation

◆ GRADIENT_SIZE

int anonymous_namespace{lighting.cpp}::GRADIENT_SIZE = 256
constexpr

Definition at line 18 of file lighting.cpp.

◆ SHADOW_FAR

float anonymous_namespace{lighting.cpp}::SHADOW_FAR = 100000.0F
constexpr

Definition at line 21 of file lighting.cpp.

◆ TAU

float anonymous_namespace{lighting.cpp}::TAU = std::numbers::pi_v<float> * 2.0F
constexpr

Definition at line 15 of file lighting.cpp.