removed a few win32 compilation warnings

metadata
Wenzel Jakob 2011-04-30 17:56:19 +02:00
parent ebd70aede4
commit 7557927f69
6 changed files with 12 additions and 12 deletions

View File

@ -214,7 +214,7 @@ public:
inline void setSize(const Point3i &size) { m_size = size; } inline void setSize(const Point3i &size) { m_size = size; }
/// Get the maximal anisotropy /// Get the maximal anisotropy
inline float getMaxAnisotropy() const { return m_maxAnisotropy; } inline Float getMaxAnisotropy() const { return m_maxAnisotropy; }
/** \brief Set the maximal anisotropy. /** \brief Set the maximal anisotropy.
* *
@ -222,7 +222,7 @@ public:
* texture filtering. A value of 0 (default) will * texture filtering. A value of 0 (default) will
* use the global max. anisotropy value * use the global max. anisotropy value
*/ */
inline void setMaxAnisotropy(float maxAnisotropy) { m_maxAnisotropy = maxAnisotropy; } inline void setMaxAnisotropy(Float maxAnisotropy) { m_maxAnisotropy = maxAnisotropy; }
/// Return whether mipmapping is enabled /// Return whether mipmapping is enabled
inline bool isMipMapped() const { return m_mipmapped; } inline bool isMipMapped() const { return m_mipmapped; }
@ -363,7 +363,7 @@ protected:
EDepthMode m_depthMode; EDepthMode m_depthMode;
bool m_mipmapped; bool m_mipmapped;
mutable PrimitiveThreadLocal<std::set<int> > m_textureUnits; mutable PrimitiveThreadLocal<std::set<int> > m_textureUnits;
float m_maxAnisotropy; Float m_maxAnisotropy;
int m_samples; int m_samples;
std::vector<Bitmap *> m_bitmaps; std::vector<Bitmap *> m_bitmaps;
Point3i m_size; Point3i m_size;

View File

@ -293,7 +293,7 @@ public:
Spectrum flux, contrib; Spectrum flux, contrib;
if (gp.depth != -1) { if (gp.depth != -1) {
M = photonMap->estimateRadianceRaw( M = (Float) photonMap->estimateRadianceRaw(
gp.its, gp.radius, flux, m_maxDepth-gp.depth); gp.its, gp.radius, flux, m_maxDepth-gp.depth);
} else { } else {
M = 0; M = 0;
@ -305,7 +305,7 @@ public:
} else { } else {
Float ratio = (N + m_alpha * M) / (N + M); Float ratio = (N + m_alpha * M) / (N + M);
gp.flux = (gp.flux + gp.weight * (flux + gp.flux = (gp.flux + gp.weight * (flux +
gp.emission * proc->getShotParticles() * M_PI * gp.radius*gp.radius)) * ratio; gp.emission * (Float) proc->getShotParticles() * M_PI * gp.radius*gp.radius)) * ratio;
gp.radius = gp.radius * std::sqrt(ratio); gp.radius = gp.radius * std::sqrt(ratio);
gp.N = N + m_alpha * M; gp.N = N + m_alpha * M;
contrib = gp.flux / ((Float) m_totalEmitted * gp.radius*gp.radius * M_PI); contrib = gp.flux / ((Float) m_totalEmitted * gp.radius*gp.radius * M_PI);

View File

@ -242,7 +242,7 @@ void GLTexture::refresh() {
//Assert(m_size.x == m_size.y); //Assert(m_size.x == m_size.y);
/* Anisotropic texture filtering */ /* Anisotropic texture filtering */
float anisotropy = getMaxAnisotropy(); float anisotropy = (float) getMaxAnisotropy();
if (anisotropy > 1.0f) { if (anisotropy > 1.0f) {
if (isMipMapped() && m_filterType == EMipMapLinear) { if (isMipMapped() && m_filterType == EMipMapLinear) {
/* Only use anisotropy when it makes sense - otherwise some /* Only use anisotropy when it makes sense - otherwise some

View File

@ -34,7 +34,7 @@ public:
SpotLuminaire(const Properties &props) : Luminaire(props) { SpotLuminaire(const Properties &props) : Luminaire(props) {
m_intensity = props.getSpectrum("intensity", Spectrum(1.0f)); m_intensity = props.getSpectrum("intensity", Spectrum(1.0f));
m_cutoffAngle = props.getFloat("cutoffAngle", 20); m_cutoffAngle = props.getFloat("cutoffAngle", 20);
m_beamWidth = props.getFloat("beamWidth", m_cutoffAngle * 3.0/4.0); m_beamWidth = props.getFloat("beamWidth", m_cutoffAngle * 3.0f/4.0f);
m_beamWidth = degToRad(m_beamWidth); m_beamWidth = degToRad(m_beamWidth);
m_cutoffAngle = degToRad(m_cutoffAngle); m_cutoffAngle = degToRad(m_cutoffAngle);
Assert(m_cutoffAngle >= m_beamWidth); Assert(m_cutoffAngle >= m_beamWidth);
@ -57,7 +57,7 @@ public:
m_cosCutoffAngle = std::cos(m_cutoffAngle); m_cosCutoffAngle = std::cos(m_cutoffAngle);
m_position = m_luminaireToWorld(Point(0, 0, 0)); m_position = m_luminaireToWorld(Point(0, 0, 0));
m_uvFactor = std::tan(m_beamWidth/2); m_uvFactor = std::tan(m_beamWidth/2);
m_invTransitionWidth = 1.0 / (m_cutoffAngle - m_beamWidth); m_invTransitionWidth = 1.0f / (m_cutoffAngle - m_beamWidth);
} }
void serialize(Stream *stream, InstanceManager *manager) const { void serialize(Stream *stream, InstanceManager *manager) const {
@ -91,8 +91,8 @@ public:
if (m_texture->getClass() != MTS_CLASS(ConstantTexture)) { if (m_texture->getClass() != MTS_CLASS(ConstantTexture)) {
Intersection its; Intersection its;
its.hasUVPartials = false; its.hasUVPartials = false;
its.uv.x = .5+localDir.x / (localDir.z / m_uvFactor); its.uv.x = 0.5f + localDir.x / (localDir.z / m_uvFactor);
its.uv.y = .5+localDir.y / (localDir.z / m_uvFactor); its.uv.y = 0.5f + localDir.y / (localDir.z / m_uvFactor);
result *= m_texture->getValue(its); result *= m_texture->getValue(its);
} }

View File

@ -141,7 +141,7 @@ public:
if (phi < 0) if (phi < 0)
phi += 2*M_PI; phi += 2*M_PI;
its.uv.x = phi * (0.5 * INV_PI); its.uv.x = phi * (0.5f * INV_PI);
its.uv.y = theta * INV_PI; its.uv.y = theta * INV_PI;
its.dpdu = m_objectToWorld(Vector(-local.y, local.x, 0) * (2*M_PI)); its.dpdu = m_objectToWorld(Vector(-local.y, local.x, 0) * (2*M_PI));
its.geoFrame.n = normalize(its.p - m_center); its.geoFrame.n = normalize(its.p - m_center);

View File

@ -293,7 +293,7 @@ public:
m_gpuTexture->setWrapType(GPUTexture::ERepeat); m_gpuTexture->setWrapType(GPUTexture::ERepeat);
else else
m_gpuTexture->setWrapType(GPUTexture::EClampToEdge); m_gpuTexture->setWrapType(GPUTexture::EClampToEdge);
m_gpuTexture->setMaxAnisotropy((int) maxAnisotropy); m_gpuTexture->setMaxAnisotropy(maxAnisotropy);
m_gpuTexture->init(); m_gpuTexture->init();
/* Release the memory on the host side */ /* Release the memory on the host side */
m_gpuTexture->setBitmap(0, NULL); m_gpuTexture->setBitmap(0, NULL);