Skip to main content

LightPoint

The LightPoint class represents a point light source such bulb, candle, or torch. It includes a radius parameter to attenuate light intensity based on the distance between the light and the receiver. The area radius simulates a spherical light source, producing accurate soft shadows. An optional cubemap intensity texture can be applied to simulate direction-dependent color modulation.

info

In shadow-map mode, this light renders up to six shadow viewports.

#include <scene/TellusimLightPoint.h>

Inheritance

Constructors

explicit LightPoint(const char *name = nullptr)
explicit LightPoint(Scene &scene, const char *name = nullptr)

Methods

Light radius.

void setRadius(float32_t radius)
float32_t getRadius() const

Light area radius.

void setAreaRadius(float32_t radius)
float32_t getAreaRadius() const

Intensity texture.

void setIntensityTexture(const char *file, uint32_t priority = 0)
void setIntensityTexture(const String &file, uint32_t priority = 0)
void setIntensityTexture(const char *hash, const char *file, uint32_t priority = 0)
void setIntensityTexture(const char *hash, Image &image, uint32_t priority = 0)
void setIntensityTexture(const char *hash, Texture &texture, uint32_t priority = 0)
String getIntensityTextureHash() const
String getIntensityTextureFile() const
Texture getIntensityTextureSource() const