void AmbientLight_Constructor(AmbientLight* self, const Vec3fa& radiance) { Light_Constructor(&self->super); self->radiance = radiance; self->super.sample = AmbientLight_sample; self->super.eval = AmbientLight_eval; }
//! Create an ispc-side PointLight object extern "C" void* PointLight_create() { PointLight* self = (PointLight*) alignedMalloc(sizeof(PointLight),16); Light_Constructor(&self->super); self->super.sample = PointLight_sample; self->super.eval = PointLight_eval; PointLight_set(self, Vec3fa(0.f), Vec3fa(1.f), 0.f); return self; }
//! Create an ispc-side DirectionalLight object extern "C" void* DirectionalLight_create() { DirectionalLight* self = (DirectionalLight*) alignedMalloc(sizeof(DirectionalLight)); Light_Constructor(&self->super); self->super.sample = DirectionalLight_sample; self->super.eval = DirectionalLight_eval; DirectionalLight_set(self, Vec3fa(0.f, 0.f, 1.f), Vec3fa(1.f), 1.f); return self; }