Anonymous avatar Anonymous committed f921f90

correct some typos

Comments (0)

Files changed (12)

integrators/ardirectlighting.cpp

 	AddStringConstant(*this, "name", "Name of current surface integrator", "ardirectlighting");	
 }
 
-void ARDirectLightingIntegrator::RequestSamples(Sample *sample, const Scene &scene) {
+void ARDirectLightingIntegrator::RequestSamples(Sampler *sampler, const Scene &scene) {
 	// Allocate and request samples for light sampling
-	hints.RequestSamples(sample, scene, maxDepth + 1);
+	hints.RequestSamples(sampler, scene, maxDepth + 1);
 	vector<u_int> structure;
 	structure.push_back(1);	//scattering
-	scatterOffset = sample->AddxD(structure, maxDepth + 1);
+	scatterOffset = sampler->AddxD(structure, maxDepth + 1);
 }
 
 void ARDirectLightingIntegrator::Preprocess(const RandomGenerator &rng,

integrators/ardirectlighting.h

 	ARDirectLightingIntegrator(u_int md);
 
 	virtual u_int Li(const Scene &scene, const Sample &sample) const;
-	virtual void RequestSamples(Sample *sample, const Scene &scene);
+	virtual void RequestSamples(Sampler *sampler, const Scene &scene);
 	virtual void Preprocess(const RandomGenerator &rng, const Scene &scene);
 
 	static SurfaceIntegrator *CreateSurfaceIntegrator(const ParamSet &params);

integrators/arpath.cpp

 static const u_int passThroughLimit = 10000;
 
 // ARPathIntegrator Method Definitions
-void ARPathIntegrator::RequestSamples(Sample *sample, const Scene &scene)
+void ARPathIntegrator::RequestSamples(Sampler *sampler, const Scene &scene)
 {
 	vector<u_int> structure;
 	structure.push_back(2);	// bsdf direction sample for path
 	if (rrStrategy != RR_NONE)
 		structure.push_back(1);	// continue sample
 
-	sampleOffset = sample->AddxD(structure, maxDepth + 1);
+	sampleOffset = sampler->AddxD(structure, maxDepth + 1);
 
 	if (enableDirectLightSampling) {
 		// This is a bit tricky way to discover the kind of Renderer but otherwise
 			} else
 				assert (false);
 
-			hybridRendererLightSampleOffset = sample->AddxD(structure, maxDepth + 1);
+			hybridRendererLightSampleOffset = sampler->AddxD(structure, maxDepth + 1);
 		} else {
 			// Allocate and request samples for light sampling, RR, etc.
-			hints.RequestSamples(sample, scene, maxDepth + 1);
+			hints.RequestSamples(sampler, scene, maxDepth + 1);
 		}
 	}
 }
 ARPathState::ARPathState(const Scene &scene, ContributionBuffer *contribBuffer, RandomGenerator *rng) {
 	SetState(TO_INIT);
 
-	scene.surfaceIntegrator->RequestSamples(&sample, scene);
-	scene.volumeIntegrator->RequestSamples(&sample, scene);
 	scene.sampler->InitSample(&sample);
 	sample.contribBuffer = contribBuffer;
 	sample.camera = scene.camera->Clone();

integrators/arpath.h

 	}
 
 	virtual u_int Li(const Scene &scene, const Sample &sample) const;
-	virtual void RequestSamples(Sample *sample, const Scene &scene);
+	virtual void RequestSamples(Sampler *sampler, const Scene &scene);
 	virtual void Preprocess(const RandomGenerator &rng, const Scene &scene);
 
 	// DataParallel interface

integrators/depthfield.cpp

 	AddStringConstant(*this, "name", "Name of current surface integrator", "depthfield");	
 }
 
-void DepthfieldIntegrator::RequestSamples(Sample *sample, const Scene &scene) {
+void DepthfieldIntegrator::RequestSamples(Sampler *sampler, const Scene &scene) {
 	// Allocate and request samples for light sampling
-	hints.RequestSamples(sample, scene, maxDepth + 1);
+	hints.RequestSamples(sampler, scene, maxDepth + 1);
 	vector<u_int> structure;
 	structure.push_back(1);	//scattering
-	scatterOffset = sample->AddxD(structure, maxDepth + 1);
+	scatterOffset = sampler->AddxD(structure, maxDepth + 1);
 }
 
 void DepthfieldIntegrator::Preprocess(const RandomGenerator &rng,

integrators/depthfield.h

 	DepthfieldIntegrator(u_int md);
 
 	virtual u_int Li(const Scene &scene, const Sample &sample) const;
-	virtual void RequestSamples(Sample *sample, const Scene &scene);
+	virtual void RequestSamples(Sampler *sampler, const Scene &scene);
 	virtual void Preprocess(const RandomGenerator &rng, const Scene &scene);
 
 	static SurfaceIntegrator *CreateSurfaceIntegrator(const ParamSet &params);

integrators/envpath.cpp

 static const u_int passThroughLimit = 10000;
 
 // ENVPathIntegrator Method Definitions
-void ENVPathIntegrator::RequestSamples(Sample *sample, const Scene &scene)
+void ENVPathIntegrator::RequestSamples(Sampler *sampler, const Scene &scene)
 {
 	vector<u_int> structure;
 	structure.push_back(2);	// bsdf direction sample for path
 	if (rrStrategy != RR_NONE)
 		structure.push_back(1);	// continue sample
 
-	sampleOffset = sample->AddxD(structure, maxDepth + 1);
+	sampleOffset = sampler->AddxD(structure, maxDepth + 1);
 
 	if (enableDirectLightSampling) {
 		// This is a bit tricky way to discover the kind of Renderer but otherwise
 			} else
 				assert (false);
 
-			hybridRendererLightSampleOffset = sample->AddxD(structure, maxDepth + 1);
+			hybridRendererLightSampleOffset = sampler->AddxD(structure, maxDepth + 1);
 		} else {
 			// Allocate and request samples for light sampling, RR, etc.
-			hints.RequestSamples(sample, scene, maxDepth + 1);
+			hints.RequestSamples(sampler, scene, maxDepth + 1);
 		}
 	}
 }
 ENVPathState::ENVPathState(const Scene &scene, ContributionBuffer *contribBuffer, RandomGenerator *rng) {
 	SetState(TO_INIT);
 
-	scene.surfaceIntegrator->RequestSamples(&sample, scene);
-	scene.volumeIntegrator->RequestSamples(&sample, scene);
 	scene.sampler->InitSample(&sample);
 	sample.contribBuffer = contribBuffer;
 	sample.camera = scene.camera->Clone();

integrators/envpath.h

 	}
 
 	virtual u_int Li(const Scene &scene, const Sample &sample) const;
-	virtual void RequestSamples(Sample *sample, const Scene &scene);
+	virtual void RequestSamples(Sampler *sampler, const Scene &scene);
 	virtual void Preprocess(const RandomGenerator &rng, const Scene &scene);
 
 	// DataParallel interface
 	// Aldo - copy WUV, if present
 	if (WUV) {
 		wuv = new Point[nverts];
-		for (u_int i  = 0; i < nverts; ++i)
+		for (u_int i  = 0; i < nverts; ++i){
 			wuv[i] = WUV[i];
+		}
 	} else
 		wuv = NULL;
 
 	vector<int> quadsToSplit;
 	if (nquads == 0)
 		quadVertexIndex = NULL;
-	else { LOG(LUX_INFO, LUX_NOERROR) << "NQUaDS nao nulo: "<< nquads<< "Must subdivide?: "<< mustSubdivide;
+	else { //LOG(LUX_INFO, LUX_NOERROR) << "NQUaDS nao nulo: "<< nquads<< "Must subdivide?: "<< mustSubdivide;
 		// Dade - check quads and split them if required
 		for (u_int i = 0; i < nquads; i++) {
 			const u_int idx = 4 * i;
 
 	// Possibly subdivide the triangles
 	if (mustSubdivide) {
+		LOG(LUX_INFO, LUX_NOERROR) << "Refine: must Subdivide ";
 		MeshSubdivType concreteSubdivType = subdivType;
 		switch (concreteSubdivType) {
 			case SUBDIV_LOOP: {
 				delete[] n;
 				delete[] uvs;
 				delete[] triVertexIndex;
-
+LOG(LUX_INFO, LUX_NOERROR) << "Refine:loop subdiv ";
 				// Copy the new mesh data
 				nverts = res->nverts;
 				ntris = res->ntris;
 	const Point &p3 = p[v2];
 	const Vector e1 = p2 - p1;
 	const Vector e2 = p3 - p1;
-LOG(LUX_INFO, LUX_NOERROR) << "Mesh::GetIntersection ";
 	// Fill in _DifferentialGeometry_ from triangle hit
 	// Compute triangle partial derivatives
 	Vector dpdu, dpdv;
 
 void Mesh::GetShadingGeometry(const Transform &obj2world,
 	const DifferentialGeometry &dg, DifferentialGeometry *dgShading) const
-{ LOG(LUX_INFO, LUX_NOERROR) << "Mesh::GetShadingGeometry";
-
+{
 	if (!n) {
 		*dgShading = dg;
 		dgShading->Scale = ( GetScale(0)+GetScale(1)+GetScale(2) )/3.f;
 
 	bool  proj_text = params.FindOneBool( "projection", false );
 	Point  cam = params.FindOnePoint( "cam", Point(0,0,0) );
-LOG(LUX_INFO, LUX_NOERROR) << "Mesh Criando Shape 1";
 	return new Mesh(o2w, reverseOrientation, name,
 		shpType, proj_text, cam, accelType,
 		npi, P, N, UV, WUV,
 	accelTypeStr = params.FindOneString("acceltype", accelTypeStr);
  	string subdivscheme = params.FindOneString("subdivscheme", "loop");
 	int nSubdivLevels = max(0, params.FindOneInt("nsubdivlevels", params.FindOneInt("nlevels", 0)));
-LOG(LUX_INFO, LUX_NOERROR) << "Mesh Criando Shape 2";
 	return CreateShape(o2w, reverseOrientation, params,
 		accelTypeStr, triTypeStr, quadTypeStr,
 		triIndices, triIndicesCount,
 }
 
 Shape *Mesh::CreateShape(const Transform &o2w, bool reverseOrientation, const ParamSet &params) {
-	LOG(LUX_INFO, LUX_NOERROR) << "Mesh create shape 0:";
 	return ::CreateShape( o2w, reverseOrientation, params, "auto", "auto");
 }
 
 static DynamicLoader::RegisterShape<Mesh> r("mesh");
 
 Shape* Mesh::BaryMesh::CreateShape(const Transform &o2w, bool reverseOrientation, const ParamSet &params) {
-	LOG(LUX_INFO, LUX_NOERROR) << "Mesh create shape 1:";
 	return ::CreateShape( o2w, reverseOrientation, params, "auto", "bary");
 }
 

shapes/meshbarytriangle.cpp

 }
 
 bool MeshBaryTriangle::Intersect(const Ray &ray, Intersection* isect, bool null_shp_isect) const
-{//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Barytriangle intersect ";
+{LOG(LUX_INFO, LUX_NOERROR) << "Mesh Barytriangle intersect ";
 	Vector e1, e2, s1;
 	// Compute $\VEC{s}_1$
 

shapes/meshquadrilateral.cpp

 	// by Ares Lagae and Philip Dutr�
 	// http://www.cs.kuleuven.be/~graphics/CGRG.PUBLICATIONS/LagaeDutre2005AnEfficientRayQuadrilateralIntersectionTest/
 	// http://jgt.akpeters.com/papers/LagaeDutre05/erqit.cpp.html
-//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Quadrilateral intersect ";
+LOG(LUX_INFO, LUX_NOERROR) << "Mesh Quadrilateral intersect ";
 	if (!idx)
 		return false;
 

shapes/meshwaldtriangle.cpp

 bool MeshWaldTriangle::Intersect(const Ray &ray, Intersection *isect, bool null_shp_isect) const
 {//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Waldtriangle intersect ";
 	//look if shape is a null type
-    if ( null_shp_isect && GetPrimitiveType() == ShapeType(AR_SHAPE) ) return false;
+	if ( null_shp_isect && GetPrimitiveType() == ShapeType(AR_SHAPE) ) return false;
 
 	float o0, o1, o2, d0, d1, d2;
 	switch (intersectionType) {
 	Point wtext = pp;
 	if (mesh->wuv) {
 		wtext = Point(b0 * mesh->wuv[v[0]] + uu * mesh->wuv[v[1]] + vv * mesh->wuv[v[2]]);
+		//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Wald WUV: "<< mesh->wuv[v[0]] << "  "<< mesh->wuv[v[1]] << "  "<< mesh->wuv[v[2]];
 	}
-//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Wald: "<< wtext;
+	//LOG(LUX_INFO, LUX_NOERROR) << "Mesh Wald: "<< wtext;
 	isect->dg = DifferentialGeometry(pp, normalizedNormal, dpdu, dpdv,
 		Normal(0, 0, 0), Normal(0, 0, 0), tu, tv, this, 0.f, wtext);
 	isect->Set(mesh->WorldToObject, this, mesh->GetMaterial(),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.