Base class of all textures. Computes values for an arbitrary surface point. Texture2D is a specialization to UV-based textures. More...
#include <mitsuba/render/texture.h>
Inheritance diagram for mitsuba::Texture:Public Member Functions | |
| virtual Spectrum | eval (const Intersection &its, bool filter=true) const |
Return the texture value at its. More... | |
| virtual void | evalGradient (const Intersection &its, Spectrum *gradient) const |
Return the texture gradient at its. More... | |
| virtual Spectrum | getAverage () const |
| Return the component-wise average value of the texture over its domain. More... | |
| virtual Spectrum | getMinimum () const |
| Return the component-wise minimum of the texture over its domain. More... | |
| virtual Spectrum | getMaximum () const |
| Return the component-wise maximum of the texture over its domain. More... | |
| virtual Vector3i | getResolution () const |
| Return the resolution in pixels, if applicable. More... | |
| virtual bool | isConstant () const |
| Return whether the texture takes on a constant value everywhere. More... | |
| virtual bool | isMonochromatic () const |
| Return whether the texture is monochromatic / spectrally uniform. More... | |
| virtual bool | usesRayDifferentials () const |
| Does this texture perform any pre-filtering when ray differentials are available? More... | |
| virtual ref< Texture > | expand () |
| Some textures are only proxies for an actual implementation. This function returns the actual texture implementation to be used. More... | |
| virtual void | serialize (Stream *stream, InstanceManager *manager) const |
| Serialize to a binary data stream. More... | |
| virtual ref< Bitmap > | getBitmap (const Vector2i &sizeHint=Vector2i(-1,-1)) const |
| Return a bitmap representation of the texture. More... | |
| virtual const Class * | getClass () const |
| Retrieve this object's class. More... | |
Public Member Functions inherited from mitsuba::ConfigurableObject | |
| virtual void | setParent (ConfigurableObject *parent) |
| Notify the ConfigurableObject instance about its parent object. More... | |
| virtual void | addChild (const std::string &name, ConfigurableObject *child) |
| Add a child (default implementation throws an error) More... | |
| void | addChild (ConfigurableObject *child) |
| Add an unnamed child. More... | |
| virtual void | configure () |
| Configure the object (called once after construction and addition of all child ConfigurableObject instances)) More... | |
| const std::string & | getID () const |
| Return the identifier associated with this instance (or "unnamed") More... | |
| void | setID (const std::string &name) |
| Set the identifier associated with this instance. More... | |
| const Properties & | getProperties () const |
| Return the properties object that was originally used to create this instance. More... | |
Public Member Functions inherited from mitsuba::SerializableObject | |
| SerializableObject (Stream *stream, InstanceManager *manager) | |
| Unserialize a serializable object. More... | |
Public Member Functions inherited from Object | |
| Object () | |
| Construct a new object. More... | |
| int | getRefCount () const |
| Return the current reference count. More... | |
| void | incRef () const |
| Increase the reference count of the object by one. More... | |
| void | decRef (bool autoDeallocate=true) const |
| Decrease the reference count of the object and possibly deallocate it. More... | |
| virtual std::string | toString () const |
| Return a human-readable string representation of the object's contents. More... | |
Public Member Functions inherited from mitsuba::HWResource | |
| virtual Shader * | createShader (Renderer *renderer) const |
| virtual | ~HWResource () |
Static Public Attributes | |
| static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::ConfigurableObject | |
| static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::SerializableObject | |
| static Class * | m_theClass |
Static Public Attributes inherited from Object | |
| static Class * | m_theClass |
| Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
| Texture (const Properties &props) | |
| Texture (Stream *stream, InstanceManager *manager) | |
| virtual | ~Texture () |
Protected Member Functions inherited from mitsuba::ConfigurableObject | |
| virtual | ~ConfigurableObject () |
| Virtual destructor. More... | |
| ConfigurableObject (const Properties &props) | |
| Construct a configurable object. More... | |
| ConfigurableObject (Stream *stream, InstanceManager *manager) | |
| Unserialize a configurable object. More... | |
Protected Member Functions inherited from mitsuba::SerializableObject | |
| SerializableObject () | |
| Construct a serializable object. More... | |
| virtual | ~SerializableObject () |
| Virtual deconstructor. More... | |
Protected Member Functions inherited from Object | |
| virtual | ~Object () |
| Virtual private deconstructor. (Will only be called by ref) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | staticInitialization () |
| Initializes the built-in reference count debugger (if enabled) More... | |
| static void | staticShutdown () |
| Free the memory taken by staticInitialization() More... | |
Protected Attributes inherited from mitsuba::ConfigurableObject | |
| Properties | m_properties |
Base class of all textures. Computes values for an arbitrary surface point. Texture2D is a specialization to UV-based textures.
|
protected |
|
protected |
|
protectedvirtual |
|
virtual |
Return the texture value at its.
| filter | Specifies whether a filtered texture lookup is desired. Note that this does not mean that filtering will actually be used. |
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::Texture2D, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return the texture gradient at its.
The parameter gradient should point to an array with space for two Spectrum data structures corresponding to the U and V derivative.
dx, dy = tex.evalGradient(its). Reimplemented in mitsuba::Texture2D.
Some textures are only proxies for an actual implementation. This function returns the actual texture implementation to be used.
The default implementation returns this.
|
virtual |
Return the component-wise average value of the texture over its domain.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return a bitmap representation of the texture.
When the class implementing this interface is a bitmap-backed texture, this function directly returns the underlying bitmap. When it is procedural, a bitmap version must first be generated. In this case, the parameter sizeHint is used to control the target size. The default value -1, -1 allows the implementation to choose a suitable size by itself.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::Texture2D, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::ConfigurableObject.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::Texture2D, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return the component-wise maximum of the texture over its domain.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return the component-wise minimum of the texture over its domain.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return the resolution in pixels, if applicable.
|
virtual |
Return whether the texture takes on a constant value everywhere.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Return whether the texture is monochromatic / spectrally uniform.
The implementation may conservatively return false if it is not sure.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Serialize to a binary data stream.
Reimplemented from mitsuba::ConfigurableObject.
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, mitsuba::Texture2D, and mitsuba::ConstantSpectrumTexture.
|
virtual |
Does this texture perform any pre-filtering when ray differentials are available?
Reimplemented in mitsuba::SpectrumProductTexture, mitsuba::SpectrumSubtractionTexture, mitsuba::SpectrumAdditionTexture, mitsuba::ConstantFloatTexture, and mitsuba::ConstantSpectrumTexture.
|
static |