mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
Fix misc. typos
Found via `codespell -q 3 -S ./src/ext`
This commit is contained in:
parent
72b749ed22
commit
2fcf2e9864
9 changed files with 11 additions and 11 deletions
|
|
@ -99,7 +99,7 @@ function (sanitizer_check_compiler_flags FLAG_CANDIDATES NAME PREFIX)
|
||||||
|
|
||||||
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES)
|
||||||
foreach (LANG ${ENABLED_LANGUAGES})
|
foreach (LANG ${ENABLED_LANGUAGES})
|
||||||
# Sanitizer flags are not dependend on language, but the used compiler.
|
# Sanitizer flags are not dependent on language, but the used compiler.
|
||||||
# So instead of searching flags foreach language, search flags foreach
|
# So instead of searching flags foreach language, search flags foreach
|
||||||
# compiler used.
|
# compiler used.
|
||||||
set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
|
set(COMPILER ${CMAKE_${LANG}_COMPILER_ID})
|
||||||
|
|
|
||||||
|
|
@ -18672,7 +18672,7 @@ class GTEST_API_ UnitTest {
|
||||||
internal::UnitTestImpl* impl() { return impl_; }
|
internal::UnitTestImpl* impl() { return impl_; }
|
||||||
const internal::UnitTestImpl* impl() const { return impl_; }
|
const internal::UnitTestImpl* impl() const { return impl_; }
|
||||||
|
|
||||||
// These classes and funcions are friends as they need to access private
|
// These classes and functions are friends as they need to access private
|
||||||
// members of UnitTest.
|
// members of UnitTest.
|
||||||
friend class Test;
|
friend class Test;
|
||||||
friend class internal::AssertHelper;
|
friend class internal::AssertHelper;
|
||||||
|
|
|
||||||
|
|
@ -698,7 +698,7 @@ static std::ostream &operator<<(std::ostream &os, Tensor::Type value) {
|
||||||
os << "float64_t";
|
os << "float64_t";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
os << "unkown";
|
os << "unknown";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.useGPU && options.wavefront)
|
if (options.useGPU && options.wavefront)
|
||||||
Warning("Both --gpu and --wavefront were specified; --gpu takes precidence.");
|
Warning("Both --gpu and --wavefront were specified; --gpu takes precedence.");
|
||||||
|
|
||||||
if (options.pixelMaterial && options.wavefront) {
|
if (options.pixelMaterial && options.wavefront) {
|
||||||
Warning("Disabling --wavefront since --pixelmaterial was specified.");
|
Warning("Disabling --wavefront since --pixelmaterial was specified.");
|
||||||
|
|
|
||||||
|
|
@ -487,7 +487,7 @@ CoatedConductorMaterial *CoatedConductorMaterial::Create(
|
||||||
|
|
||||||
// SubsurfaceMaterial Method Definitions
|
// SubsurfaceMaterial Method Definitions
|
||||||
std::string SubsurfaceMaterial::ToString() const {
|
std::string SubsurfaceMaterial::ToString() const {
|
||||||
return StringPrintf("[ SubsurfaceMaterial displacment: %s scale: %f "
|
return StringPrintf("[ SubsurfaceMaterial displacement: %s scale: %f "
|
||||||
"sigma_a: %s sigma_s: %s "
|
"sigma_a: %s sigma_s: %s "
|
||||||
"reflectance: %s mfp: %s uRoughness: %s vRoughness: %s "
|
"reflectance: %s mfp: %s uRoughness: %s vRoughness: %s "
|
||||||
"eta: %f remapRoughness: %s ]",
|
"eta: %f remapRoughness: %s ]",
|
||||||
|
|
@ -568,7 +568,7 @@ SubsurfaceMaterial *SubsurfaceMaterial::Create(
|
||||||
|
|
||||||
// DiffuseTransmissionMaterial Method Definitions
|
// DiffuseTransmissionMaterial Method Definitions
|
||||||
std::string DiffuseTransmissionMaterial::ToString() const {
|
std::string DiffuseTransmissionMaterial::ToString() const {
|
||||||
return StringPrintf("[ DiffuseTransmissionMaterial displacment: %s reflectance: %s "
|
return StringPrintf("[ DiffuseTransmissionMaterial displacement: %s reflectance: %s "
|
||||||
"transmittance: %s sigma: %s ]",
|
"transmittance: %s sigma: %s ]",
|
||||||
displacement, reflectance, transmittance, sigma);
|
displacement, reflectance, transmittance, sigma);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1225,7 +1225,7 @@ GPUSpectrumImageTexture *GPUSpectrumImageTexture::Create(
|
||||||
textureCacheMutex.unlock();
|
textureCacheMutex.unlock();
|
||||||
isSingleChannel = true;
|
isSingleChannel = true;
|
||||||
} else {
|
} else {
|
||||||
Warning(loc, "%s: unable to decypher image format", filename);
|
Warning(loc, "%s: unable to decipher image format", filename);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
} // profile scope
|
} // profile scope
|
||||||
|
|
|
||||||
|
|
@ -943,7 +943,7 @@ static Imf::FrameBuffer imageToFrameBuffer(const Image &image,
|
||||||
size_t xStride = image.NChannels() * TexelBytes(image.Format());
|
size_t xStride = image.NChannels() * TexelBytes(image.Format());
|
||||||
size_t yStride = image.Resolution().x * xStride;
|
size_t yStride = image.Resolution().x * xStride;
|
||||||
// Would be nice to use PixelOffset(-dw.min.x, -dw.min.y) but
|
// Would be nice to use PixelOffset(-dw.min.x, -dw.min.y) but
|
||||||
// it checks to make sure the coordiantes are >= 0 (which
|
// it checks to make sure the coordinates are >= 0 (which
|
||||||
// usually makes sense...)
|
// usually makes sense...)
|
||||||
char *originPtr = (((char *)image.RawPointer({0, 0})) - dataWindow.min.x * xStride -
|
char *originPtr = (((char *)image.RawPointer({0, 0})) - dataWindow.min.x * xStride -
|
||||||
dataWindow.min.y * yStride);
|
dataWindow.min.y * yStride);
|
||||||
|
|
@ -1217,7 +1217,7 @@ static ImageAndMetadata ReadPNG(const std::string &name, Allocator alloc,
|
||||||
std::vector<unsigned char> buf;
|
std::vector<unsigned char> buf;
|
||||||
int bpp = state.info_png.color.bitdepth == 16 ? 16 : 8;
|
int bpp = state.info_png.color.bitdepth == 16 ? 16 : 8;
|
||||||
bool hasAlpha = (state.info_png.color.colortype == LCT_RGBA);
|
bool hasAlpha = (state.info_png.color.colortype == LCT_RGBA);
|
||||||
// Force RGB if it's palletted or whatever.
|
// Force RGB if it's paletted or whatever.
|
||||||
error =
|
error =
|
||||||
lodepng::decode(buf, width, height, (const unsigned char *)contents.data(),
|
lodepng::decode(buf, width, height, (const unsigned char *)contents.data(),
|
||||||
contents.size(), hasAlpha ? LCT_RGBA : LCT_RGB, bpp);
|
contents.size(), hasAlpha ? LCT_RGBA : LCT_RGB, bpp);
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ TEST(PiecewiseConstant1D, Continuous) {
|
||||||
EXPECT_FLOAT_EQ(dist.size() * 1. / 16., pdf);
|
EXPECT_FLOAT_EQ(dist.size() * 1. / 16., pdf);
|
||||||
EXPECT_EQ(0, offset);
|
EXPECT_EQ(0, offset);
|
||||||
|
|
||||||
// Right at the bounary between the 4 and the 8 segments.
|
// Right at the boundary between the 4 and the 8 segments.
|
||||||
EXPECT_FLOAT_EQ(.8, dist.Sample(0.5, &pdf, &offset));
|
EXPECT_FLOAT_EQ(.8, dist.Sample(0.5, &pdf, &offset));
|
||||||
|
|
||||||
// Middle of the 8 segment
|
// Middle of the 8 segment
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ void WavefrontPathIntegrator::SampleMediumInteraction(int wavefrontDepth) {
|
||||||
// Absorption--done.
|
// Absorption--done.
|
||||||
PBRT_DBG("absorbed\n");
|
PBRT_DBG("absorbed\n");
|
||||||
T_hat = SampledSpectrum(0.f);
|
T_hat = SampledSpectrum(0.f);
|
||||||
// Tell the medium to stop traveral.
|
// Tell the medium to stop traversal.
|
||||||
return false;
|
return false;
|
||||||
} else if (mode == 1) {
|
} else if (mode == 1) {
|
||||||
// Scattering.
|
// Scattering.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue