src/slg/bsdf/bsdf.cpp
// Used when hitting a volume scatter point
Used when hitting a volume scatter point
Used when hitting a volume scatter point
void BSDF::Init(const bool fixedFromLight, const Scene &scene, const luxrays::Ray &ray,
		const Volume &volume, const float t, const float passThroughEvent) {
	hitPoint.fromLight = fixedFromLight;
	hitPoint.passThroughEvent = passThroughEvent;
	hitPoint.p = ray(t);
	hitPoint.fixedDir = -ray.d;
	sceneObject = NULL;
	mesh = NULL;
	material = &volume;
	hitPoint.geometryN = Normal(-ray.d);
	hitPoint.shadeN = hitPoint.geometryN;
	CoordinateSystem(Vector(hitPoint.shadeN), &hitPoint.dpdu, &hitPoint.dpdv);
	hitPoint.dndu = hitPoint.dndv = Normal(0.f, 0.f, 0.f);
	hitPoint.intoObject = true;
	hitPoint.interiorVolume = &volume;
	hitPoint.exteriorVolume = &volume;
	hitPoint.color = Spectrum(1.f);
	hitPoint.alpha = 1.f;
	triangleLightSource = NULL;
	hitPoint.uv = UV(0.f, 0.f);
	hitPoint.objectID = NULL_INDEX;
	frame.SetFromZ(hitPoint.shadeN);
}
void BSDF :: Init ( const bool fixedFromLight , const Scene & scene , const luxrays :: Ray & ray , const Volume & volume , const float t , const float passThroughEvent ) { hitPoint . fromLight = fixedFromLight ; hitPoint . passThroughEvent = passThroughEvent ; hitPoint . p = ray ( t ) ; hitPoint . fixedDir = - ray . d ; sceneObject = NULL ; mesh = NULL ; material = & volume ; hitPoint . geometryN = Normal ( - ray . d ) ; hitPoint . shadeN = hitPoint . geometryN ; CoordinateSystem ( Vector ( hitPoint . shadeN ) , & hitPoint . dpdu , & hitPoint . dpdv ) ; hitPoint . dndu = hitPoint . dndv = Normal ( 0.f , 0.f , 0.f ) ; hitPoint . intoObject = true ; hitPoint . interiorVolume = & volume ; hitPoint . exteriorVolume = & volume ; hitPoint . color = Spectrum ( 1.f ) ; hitPoint . alpha = 1.f ; triangleLightSource = NULL ; hitPoint . uv = UV ( 0.f , 0.f ) ; hitPoint . objectID = NULL_INDEX ; frame . SetFromZ ( hitPoint . shadeN ) ; }
Used when hitting a volume scatter point
Used when hitting a volume scatter point
// Build the local reference system