Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::Texture Class Reference

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< Textureexpand ()
 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< BitmapgetBitmap (const Vector2i &sizeHint=Vector2i(-1,-1)) const
 Return a bitmap representation of the texture. More...
 
virtual const ClassgetClass () 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 PropertiesgetProperties () 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 ShadercreateShader (Renderer *renderer) const
 
virtual ~HWResource ()
 

Static Public Attributes

static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::ConfigurableObject
static Classm_theClass
 
- Static Public Attributes inherited from mitsuba::SerializableObject
static Classm_theClass
 
- Static Public Attributes inherited from Object
static Classm_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
 

Detailed Description

Base class of all textures. Computes values for an arbitrary surface point. Texture2D is a specialization to UV-based textures.

Constructor & Destructor Documentation

mitsuba::Texture::Texture ( const Properties props)
protected
mitsuba::Texture::Texture ( Stream stream,
InstanceManager manager 
)
protected
virtual mitsuba::Texture::~Texture ( )
protectedvirtual

Member Function Documentation

virtual Spectrum mitsuba::Texture::eval ( const Intersection its,
bool  filter = true 
) const
virtual

Return the texture value at its.

Parameters
filterSpecifies 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 void mitsuba::Texture::evalGradient ( const Intersection its,
Spectrum gradient 
) const
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.

Remarks
This function is usually implemented pointwise without any kind of filtering. The Python signature is dx, dy = tex.evalGradient(its).

Reimplemented in mitsuba::Texture2D.

virtual ref<Texture> mitsuba::Texture::expand ( )
virtual

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 Spectrum mitsuba::Texture::getAverage ( ) const
virtual
virtual ref<Bitmap> mitsuba::Texture::getBitmap ( const Vector2i sizeHint = Vector2i(-1,-1)) const
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 const Class* mitsuba::Texture::getClass ( ) const
virtual
virtual Spectrum mitsuba::Texture::getMaximum ( ) const
virtual
virtual Spectrum mitsuba::Texture::getMinimum ( ) const
virtual
virtual Vector3i mitsuba::Texture::getResolution ( ) const
virtual

Return the resolution in pixels, if applicable.

virtual bool mitsuba::Texture::isConstant ( ) const
virtual
virtual bool mitsuba::Texture::isMonochromatic ( ) const
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 void mitsuba::Texture::serialize ( Stream stream,
InstanceManager manager 
) const
virtual
virtual bool mitsuba::Texture::usesRayDifferentials ( ) const
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.

Member Data Documentation

Class* mitsuba::Texture::m_theClass
static

The documentation for this class was generated from the following file: