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

Function QuadLight_set

tutorials/common/lights/quad_light.cpp:71–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70//! Set the parameters of an ispc-side QuadLight object
71extern "C" void QuadLight_set(void* super,
72 const Vec3fa& position,
73 const Vec3fa& edge2,
74 const Vec3fa& edge1,
75 const Vec3fa& radiance)
76{
77 QuadLight* self = (QuadLight*)super;
78 self->position = position;
79 self->edge1 = edge1;
80 self->edge2 = edge2;
81 self->radiance = radiance;
82
83 const Vec3fa ndirection = cross(edge2, edge1);
84 self->ppdf = rcp(length(ndirection));
85 self->nnormal = ndirection * self->ppdf;
86}
87
88//! Create an ispc-side QuadLight object
89extern "C" void* QuadLight_create()

Callers 1

QuadLight_createFunction · 0.85

Calls 3

crossFunction · 0.50
rcpFunction · 0.50
lengthFunction · 0.50

Tested by

no test coverage detected