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
|
||||
virtual void serialize(Stream *stream, InstanceManager *manager) const;
|
||||
|
||||
/// Return the underlying bitmap representation (if any)
|
||||
virtual ref<Bitmap> getBitmap() const;
|
||||
|
||||
MTS_DECLARE_CLASS()
|
||||
protected:
|
||||
Texture(const Properties &props);
|
||||
|
|
|
@ -47,6 +47,7 @@ Spectrum Texture::getMinimum() const { NotImplementedError("getMinimum"); }
|
|||
Spectrum Texture::getMaximum() const { NotImplementedError("getMaximum"); }
|
||||
bool Texture::isConstant() const { NotImplementedError("isConstant"); }
|
||||
bool Texture::usesRayDifferentials() const { NotImplementedError("usesRayDifferentials"); }
|
||||
ref<Bitmap> Texture::getBitmap() const { return NULL; }
|
||||
|
||||
ref<Texture> Texture::expand() {
|
||||
return this;
|
||||
|
|
|
@ -400,6 +400,10 @@ public:
|
|||
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 {
|
||||
stats::filteredLookups.incrementBase();
|
||||
++stats::filteredLookups;
|
||||
|
|
Loading…
Reference in New Issue