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

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

#include <Light.h>

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

类

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 z)
 
float getX ()
 
float getY ()
 
float getZ ()
 
void setDirection (float dx, float dy, float dz)
 
float getDirX ()
 
float getDirY ()
 
float getDirZ ()
 
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 3D spot cone in degrees (clamped to (0, 89]).
 
float getSpotAngle ()
 Current spot 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 setCastShadow (bool cast)
 
bool getCastShadow ()
 
void setShadowMethod (const std::string &method)
 Request a shadow technique: auto, none, csm, perspective, cube. Invalid names leave the previous method unchanged.
 
std::string getShadowMethod ()
 Current shadow method name (auto / none / csm / perspective / cube).
 
void setShadowBias (float bias)
 
float getShadowBias ()
 
void setShadowStrength (float strength)
 
float getShadowStrength ()
 
void setVolumetric (bool enabled)
 
bool getVolumetric ()
 
void setVolumetricIntensity (float intensity)
 
float getVolumetricIntensity ()
 
void setVolumetricOnly (bool enabled)
 
bool getVolumetricOnly ()
 

静态 Public 成员函数

static Light3D * createLight (const std::string &type="point")
 
static Light3D * createEmissiveProxy (float x, float y, float z, float r, float g, float b, float intensity=1.f, float radius=8.f)
 Create a volumetric-only point glow proxy for emissive props. Pair with a PBR emissive material + bloom for the surface look; this light drives froxel / raymarch shafts without double-lighting the mesh. @ownership ECS owns the result. @lifetime Valid until ECS destroys the entity.
 

详细描述

Declarative 3D light. Collected by RenderSystem3D (max 8 per frame). type: "point" | "dir" | "spot" (≤15 chars).

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

成员函数说明

◆ createEmissiveProxy()

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

Create a volumetric-only point glow proxy for emissive props. Pair with a PBR emissive material + bloom for the surface look; this light drives froxel / raymarch shafts without double-lighting the mesh. @ownership ECS owns the result. @lifetime Valid until ECS destroys the entity.

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

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

◆ createLight()

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

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

引用了 setType() , 以及 type.

被这些函数引用 eve::daynight::DayNight::addFirefly(), createEmissiveProxy() , 以及 eve::daynight::DayNight::init().

◆ getCastShadow()

bool eve::graphics::Light3D::getCastShadow ( )

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

◆ getDirX()

float eve::graphics::Light3D::getDirX ( )

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

◆ getDirY()

float eve::graphics::Light3D::getDirY ( )

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

◆ getDirZ()

float eve::graphics::Light3D::getDirZ ( )

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

◆ getRadius()

float eve::graphics::Light3D::getRadius ( )

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

◆ getShadowBias()

float eve::graphics::Light3D::getShadowBias ( )

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

◆ getShadowMethod()

std::string eve::graphics::Light3D::getShadowMethod ( )

Current shadow method name (auto / none / csm / perspective / cube).

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

◆ getShadowStrength()

float eve::graphics::Light3D::getShadowStrength ( )

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

◆ getSpotAngle()

float eve::graphics::Light3D::getSpotAngle ( )

Current spot outer half-angle in degrees.

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

◆ getSpotSoftness()

float eve::graphics::Light3D::getSpotSoftness ( )

Current spot softness in [0, 1].

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

◆ getType()

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

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

◆ getVolumetric()

bool eve::graphics::Light3D::getVolumetric ( )

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

◆ getVolumetricIntensity()

float eve::graphics::Light3D::getVolumetricIntensity ( )

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

◆ getVolumetricOnly()

bool eve::graphics::Light3D::getVolumetricOnly ( )

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

◆ getX()

float eve::graphics::Light3D::getX ( )

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

◆ getY()

float eve::graphics::Light3D::getY ( )

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

◆ getZ()

float eve::graphics::Light3D::getZ ( )

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

◆ isEnabled()

bool eve::graphics::Light3D::isEnabled ( )

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

◆ release()

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

Entity.

Release.

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

◆ setCastShadow()

void eve::graphics::Light3D::setCastShadow ( bool  cast)

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

被这些函数引用 createEmissiveProxy().

◆ setColor()

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

◆ setDirection()

void eve::graphics::Light3D::setDirection ( float  dx,
float  dy,
float  dz 
)

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

引用了 d, dx, dy , 以及 dz.

被这些函数引用 eve::daynight::DayNight::init() , 以及 eve::daynight::DayNight::update().

◆ setEnabled()

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

◆ setPosition()

void eve::graphics::Light3D::setPosition ( float  x,
float  y,
float  z 
)

◆ setRadius()

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

◆ setShadowBias()

void eve::graphics::Light3D::setShadowBias ( float  bias)

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

引用了 bias.

◆ setShadowMethod()

void eve::graphics::Light3D::setShadowMethod ( const std::string &  method)

Request a shadow technique: auto, none, csm, perspective, cube. Invalid names leave the previous method unchanged.

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

引用了 a, b, method , 以及 value.

◆ setShadowStrength()

void eve::graphics::Light3D::setShadowStrength ( float  strength)

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

引用了 strength.

◆ setSpotAngle()

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

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

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

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

引用了 degrees.

◆ setSpotSoftness()

void eve::graphics::Light3D::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 第 159 行定义.

◆ setType()

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

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

引用了 d , 以及 type.

被这些函数引用 createLight().

◆ setVolumetric()

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

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

引用了 enabled.

被这些函数引用 createEmissiveProxy().

◆ setVolumetricIntensity()

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

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

被这些函数引用 createEmissiveProxy().

◆ setVolumetricOnly()

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

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

引用了 enabled.

被这些函数引用 createEmissiveProxy().


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