MCPcopy Create free account
hub / github.com/RenderKit/embree / SpotLight_set

Function SpotLight_set

tutorials/common/lights/spot_light.cpp:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99//! Set the parameters of an ispc-side SpotLight object
100extern "C" void SpotLight_set(void* super,
101 const Vec3fa& position,
102 const Vec3fa& direction,
103 const Vec3fa& power,
104 float cosAngleMax,
105 float cosAngleScale,
106 float radius)
107{
108 SpotLight* self = (SpotLight*)super;
109 self->position = position;
110 self->frame = frame(direction);
111 self->power = power;
112 self->cosAngleMax = cosAngleMax;
113 self->cosAngleScale = cosAngleScale;
114 self->radius = radius;
115 self->diskPdf = uniformSampleDiskPDF(radius);
116}
117
118//! Create an ispc-side SpotLight object
119extern "C" void* SpotLight_create()

Callers 1

SpotLight_createFunction · 0.85

Calls 2

frameFunction · 0.85
uniformSampleDiskPDFFunction · 0.85

Tested by

no test coverage detected