allow querying the bitmap texture underlying a 'Texture' object (if any)
parent
ad6c15177a
commit
fd85716e21
|
@ -74,6 +74,9 @@ public:
|
||||||
/// Serialize to a binary data stream
|
/// Serialize to a binary data stream
|
||||||
virtual void serialize(Stream *stream, InstanceManager *manager) const;
|
virtual void serialize(Stream *stream, InstanceManager *manager) const;
|
||||||
|
|
||||||
|
/// Return the underlying bitmap representation (if any)
|
||||||
|
virtual ref<Bitmap> getBitmap() const;
|
||||||
|
|
||||||
MTS_DECLARE_CLASS()
|
MTS_DECLARE_CLASS()
|
||||||
protected:
|
protected:
|
||||||
Texture(const Properties &props);
|
Texture(const Properties &props);
|
||||||
|
|
|
@ -47,6 +47,7 @@ Spectrum Texture::getMinimum() const { NotImplementedError("getMinimum"); }
|
||||||
Spectrum Texture::getMaximum() const { NotImplementedError("getMaximum"); }
|
Spectrum Texture::getMaximum() const { NotImplementedError("getMaximum"); }
|
||||||
bool Texture::isConstant() const { NotImplementedError("isConstant"); }
|
bool Texture::isConstant() const { NotImplementedError("isConstant"); }
|
||||||
bool Texture::usesRayDifferentials() const { NotImplementedError("usesRayDifferentials"); }
|
bool Texture::usesRayDifferentials() const { NotImplementedError("usesRayDifferentials"); }
|
||||||
|
ref<Bitmap> Texture::getBitmap() const { return NULL; }
|
||||||
|
|
||||||
ref<Texture> Texture::expand() {
|
ref<Texture> Texture::expand() {
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -400,6 +400,10 @@ public:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ref<Bitmap> getBitmap() const {
|
||||||
|
return m_mipmap1.get() ? m_mipmap1->toBitmap() : m_mipmap3->toBitmap();
|
||||||
|
}
|
||||||
|
|
||||||
Spectrum eval(const Point2 &uv, const Vector2 &d0, const Vector2 &d1) const {
|
Spectrum eval(const Point2 &uv, const Vector2 &d0, const Vector2 &d1) const {
|
||||||
stats::filteredLookups.incrementBase();
|
stats::filteredLookups.incrementBase();
|
||||||
++stats::filteredLookups;
|
++stats::filteredLookups;
|
||||||
|
|
Loading…
Reference in New Issue