载入中...
搜索中...
未找到
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).
成员函数说明
◆ createEmissiveProxy()
|
static |
Create a volumetric-only glow proxy (skips surface lighting).
- 参数
-
x World/canvas X of the glow core. y World/canvas Y of the glow core. r Linear HDR red. g Linear HDR green. b Linear HDR blue. intensity Non-negative radiance scale. radius Falloff radius in canvas units. @ownership ECS owns the result. @lifetime Valid until ECS destroys the entity.
引用了 b, createLight(), g, r, radius, setColor(), setPosition(), setRadius(), setVolumetric(), setVolumetricIntensity(), setVolumetricOnly(), x , 以及 y.
◆ createLight()
|
static |
◆ getDirX()
◆ getDirY()
◆ getRadius()
◆ getSpotAngle()
| float eve::graphics::Light2D::getSpotAngle | ( | ) |
◆ getSpotSoftness()
| float eve::graphics::Light2D::getSpotSoftness | ( | ) |
◆ getType()
◆ getVolumetric()
◆ getVolumetricIntensity()
◆ getVolumetricOnly()
◆ getX()
◆ getY()
◆ isEnabled()
◆ release()
◆ setCanvas()
| void eve::graphics::Light2D::setCanvas | ( | Canvas * | canvas | ) |
◆ setColor()
| void eve::graphics::Light2D::setColor | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | intensity = 1.f |
||
| ) |
◆ setDirection()
| void eve::graphics::Light2D::setDirection | ( | float | dx, |
| float | dy | ||
| ) |
◆ setEnabled()
| void eve::graphics::Light2D::setEnabled | ( | bool | enabled | ) |
◆ setPosition()
| void eve::graphics::Light2D::setPosition | ( | float | x, |
| float | y | ||
| ) |
◆ setRadius()
| void eve::graphics::Light2D::setRadius | ( | float | radius | ) |
引用了 radius.
被这些函数引用 createEmissiveProxy() , 以及 eve::particles::ParticleLightSystem::update().
◆ setSpotAngle()
| void eve::graphics::Light2D::setSpotAngle | ( | float | degrees | ) |
◆ setSpotSoftness()
| void eve::graphics::Light2D::setSpotSoftness | ( | float | softness | ) |
◆ setType()
| void eve::graphics::Light2D::setType | ( | const std::string & | type | ) |
◆ setVolumetric()
| void eve::graphics::Light2D::setVolumetric | ( | bool | enabled | ) |
◆ setVolumetricIntensity()
| void eve::graphics::Light2D::setVolumetricIntensity | ( | float | intensity | ) |
被这些函数引用 createEmissiveProxy().
◆ setVolumetricOnly()
| void eve::graphics::Light2D::setVolumetricOnly | ( | bool | enabled | ) |
该类的文档由以下文件生成: