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

Base class of all 2D textures. More...

#include <mitsuba/render/texture.h>

+ Inheritance diagram for mitsuba::Texture2D:

Public Member Functions

Spectrum eval (const Intersection &its, bool filter=true) const
 Return the texture value at its. More...
 
void evalGradient (const Intersection &its, Spectrum *gradient) const
 Return the texture gradient at its. More...
 
virtual void serialize (Stream *stream, InstanceManager *manager) const
 Serialize to a binary data stream. More...
 
virtual Spectrum eval (const Point2 &uv) const =0
 Unfiltered texture lookup – Texture2D subclasses must provide this function. More...
 
virtual Spectrum eval (const Point2 &uv, const Vector2 &d0, const Vector2 &d1) const =0
 Filtered texture lookup – Texture2D subclasses must provide this function. More...
 
virtual void evalGradient (const Point2 &uv, Spectrum *gradient) const
 Unfiltered radient lookup lookup – Texture2D subclasses can optionally provide this function. 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::Texture
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...
 
- 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::Texture
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

 Texture2D (const Properties &props)
 
 Texture2D (Stream *stream, InstanceManager *manager)
 
virtual ~Texture2D ()
 
- Protected Member Functions inherited from mitsuba::Texture
 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...
 

Protected Attributes

Point2 m_uvOffset
 
Vector2 m_uvScale
 
- Protected Attributes inherited from mitsuba::ConfigurableObject
Properties m_properties
 

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...
 

Detailed Description

Base class of all 2D textures.

Constructor & Destructor Documentation

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

Member Function Documentation

Spectrum mitsuba::Texture2D::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 from mitsuba::Texture.

virtual Spectrum mitsuba::Texture2D::eval ( const Point2 uv) const
pure virtual

Unfiltered texture lookup – Texture2D subclasses must provide this function.

virtual Spectrum mitsuba::Texture2D::eval ( const Point2 uv,
const Vector2 d0,
const Vector2 d1 
) const
pure virtual

Filtered texture lookup – Texture2D subclasses must provide this function.

void mitsuba::Texture2D::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.

Reimplemented from mitsuba::Texture.

virtual void mitsuba::Texture2D::evalGradient ( const Point2 uv,
Spectrum gradient 
) const
virtual

Unfiltered radient lookup lookup – Texture2D subclasses can optionally provide this function.

virtual ref<Bitmap> mitsuba::Texture2D::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 from mitsuba::Texture.

virtual const Class* mitsuba::Texture2D::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::Texture.

virtual void mitsuba::Texture2D::serialize ( Stream stream,
InstanceManager manager 
) const
virtual

Serialize to a binary data stream.

Reimplemented from mitsuba::Texture.

Member Data Documentation

Class* mitsuba::Texture2D::m_theClass
static
Point2 mitsuba::Texture2D::m_uvOffset
protected
Vector2 mitsuba::Texture2D::m_uvScale
protected

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