载入中...
搜索中...
未找到
eve::graphics::Light2D类 参考

Declarative 2D light. Collected by RenderSystem (max 8 per canvas/frame). type: "point" | "dir" | "spot" (≤15 chars). 更多...

#include <Light.h>

类 eve::graphics::Light2D 继承关系图:

类

struct  Data
 Data public API. 更多...
 

Public 成员函数

void release () override
 Entity.
 
void setType (const std::string &type)
 
std::string getType ()
 
void setPosition (float x, float y)
 
float getX ()
 
float getY ()
 
void setDirection (float dx, float dy)
 
float getDirX ()
 
float getDirY ()
 
void setColor (float r, float g, float b, float intensity=1.f)
 
void setRadius (float radius)
 
float getRadius ()
 
void setSpotAngle (float degrees)
 Outer half-angle of a spot cone in degrees (clamped to (0, 89]).
 
float getSpotAngle ()
 Current outer half-angle in degrees.
 
void setSpotSoftness (float softness)
 Softness of the spot penumbra in [0, 1].
 
float getSpotSoftness ()
 Current spot softness in [0, 1].
 
void setEnabled (bool enabled)
 
bool isEnabled ()
 
void setVolumetric (bool enabled)
 
bool getVolumetric ()
 
void setVolumetricIntensity (float intensity)
 
float getVolumetricIntensity ()
 
void setVolumetricOnly (bool enabled)
 
bool getVolumetricOnly ()
 
void setCanvas (Canvas *canvas)
 

静态 Public 成员函数

static Light2D * createLight (const std::string &type="point")
 
static Light2D * createEmissiveProxy (float x, float y, float r, float g, float b, float intensity=1.f, float radius=200.f)
 Create a volumetric-only glow proxy (skips surface lighting).
 

详细描述

Declarative 2D light. Collected by RenderSystem (max 8 per canvas/frame). type: "point" | "dir" | "spot" (≤15 chars).

在文件 Light.h 第 64 行定义.

成员函数说明

◆ createEmissiveProxy()

Light2D * eve::graphics::Light2D::createEmissiveProxy ( float  x,
float  y,
float  r,
float  g,
float  b,
float  intensity = 1.f,
float  radius = 200.f 
)
static

Create a volumetric-only glow proxy (skips surface lighting).

参数
xWorld/canvas X of the glow core.
yWorld/canvas Y of the glow core.
rLinear HDR red.
gLinear HDR green.
bLinear HDR blue.
intensityNon-negative radiance scale.
radiusFalloff radius in canvas units. @ownership ECS owns the result. @lifetime Valid until ECS destroys the entity.

在文件 Light.cpp 第 15 行定义.

引用了 b, createLight(), g, r, radius, setColor(), setPosition(), setRadius(), setVolumetric(), setVolumetricIntensity(), setVolumetricOnly(), x , 以及 y.

◆ createLight()

Light2D * eve::graphics::Light2D::createLight ( const std::string &  type = "point")
static

在文件 Light.cpp 第 7 行定义.

引用了 setType() , 以及 type.

被这些函数引用 createEmissiveProxy() , 以及 eve::particles::ParticleLightSystem::update().

◆ getDirX()

float eve::graphics::Light2D::getDirX ( )

在文件 Light.cpp 第 50 行定义.

◆ getDirY()

float eve::graphics::Light2D::getDirY ( )

在文件 Light.cpp 第 51 行定义.

◆ getRadius()

float eve::graphics::Light2D::getRadius ( )

在文件 Light.cpp 第 62 行定义.

◆ getSpotAngle()

float eve::graphics::Light2D::getSpotAngle ( )

Current outer half-angle in degrees.

在文件 Light.cpp 第 67 行定义.

◆ getSpotSoftness()

float eve::graphics::Light2D::getSpotSoftness ( )

Current spot softness in [0, 1].

在文件 Light.cpp 第 72 行定义.

◆ getType()

std::string eve::graphics::Light2D::getType ( )

在文件 Light.cpp 第 35 行定义.

◆ getVolumetric()

bool eve::graphics::Light2D::getVolumetric ( )

在文件 Light.cpp 第 78 行定义.

◆ getVolumetricIntensity()

float eve::graphics::Light2D::getVolumetricIntensity ( )

在文件 Light.cpp 第 83 行定义.

◆ getVolumetricOnly()

bool eve::graphics::Light2D::getVolumetricOnly ( )

在文件 Light.cpp 第 86 行定义.

◆ getX()

float eve::graphics::Light2D::getX ( )

在文件 Light.cpp 第 42 行定义.

◆ getY()

float eve::graphics::Light2D::getY ( )

在文件 Light.cpp 第 43 行定义.

◆ isEnabled()

bool eve::graphics::Light2D::isEnabled ( )

在文件 Light.cpp 第 75 行定义.

◆ release()

void eve::graphics::Light2D::release ( )
inlineoverride

Entity.

Release.

在文件 Light.h 第 70 行定义.

◆ setCanvas()

void eve::graphics::Light2D::setCanvas ( Canvas *  canvas)

在文件 Light.cpp 第 88 行定义.

被这些函数引用 eve::particles::ParticleLightSystem::update().

◆ setColor()

void eve::graphics::Light2D::setColor ( float  r,
float  g,
float  b,
float  intensity = 1.f 
)

在文件 Light.cpp 第 53 行定义.

引用了 b, d, g , 以及 r.

被这些函数引用 createEmissiveProxy() , 以及 eve::particles::ParticleLightSystem::update().

◆ setDirection()

void eve::graphics::Light2D::setDirection ( float  dx,
float  dy 
)

在文件 Light.cpp 第 45 行定义.

引用了 dx , 以及 dy.

◆ setEnabled()

void eve::graphics::Light2D::setEnabled ( bool  enabled)

在文件 Light.cpp 第 74 行定义.

引用了 enabled.

被这些函数引用 eve::particles::ParticleLightSystem::update().

◆ setPosition()

void eve::graphics::Light2D::setPosition ( float  x,
float  y 
)

在文件 Light.cpp 第 37 行定义.

引用了 x , 以及 y.

被这些函数引用 createEmissiveProxy() , 以及 eve::particles::ParticleLightSystem::update().

◆ setRadius()

void eve::graphics::Light2D::setRadius ( float  radius)

在文件 Light.cpp 第 61 行定义.

引用了 radius.

被这些函数引用 createEmissiveProxy() , 以及 eve::particles::ParticleLightSystem::update().

◆ setSpotAngle()

void eve::graphics::Light2D::setSpotAngle ( float  degrees)

Outer half-angle of a spot cone in degrees (clamped to (0, 89]).

参数
degreesHalf-angle; full flashlight aperture is 2× this value.

在文件 Light.cpp 第 64 行定义.

引用了 degrees.

◆ setSpotSoftness()

void eve::graphics::Light2D::setSpotSoftness ( float  softness)

Softness of the spot penumbra in [0, 1].

参数
softness0 keeps a hard rim; 1 widens the inner falloff to the axis.

在文件 Light.cpp 第 69 行定义.

◆ setType()

void eve::graphics::Light2D::setType ( const std::string &  type)

在文件 Light.cpp 第 27 行定义.

引用了 d , 以及 type.

被这些函数引用 createLight().

◆ setVolumetric()

void eve::graphics::Light2D::setVolumetric ( bool  enabled)

在文件 Light.cpp 第 77 行定义.

引用了 enabled.

被这些函数引用 createEmissiveProxy().

◆ setVolumetricIntensity()

void eve::graphics::Light2D::setVolumetricIntensity ( float  intensity)

在文件 Light.cpp 第 80 行定义.

被这些函数引用 createEmissiveProxy().

◆ setVolumetricOnly()

void eve::graphics::Light2D::setVolumetricOnly ( bool  enabled)

在文件 Light.cpp 第 85 行定义.

引用了 enabled.

被这些函数引用 createEmissiveProxy().


该类的文档由以下文件生成: