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

Constant spectrum-valued texture. More...

#include <mitsuba/hw/basicshader.h>

+ Inheritance diagram for mitsuba::ConstantSpectrumTexture:

Public Member Functions

 ConstantSpectrumTexture (const Spectrum &value)
 
 ConstantSpectrumTexture (Stream *stream, InstanceManager *manager)
 
Spectrum eval (const Intersection &its, bool) const
 Return the texture value at its. More...
 
Spectrum getAverage () const
 Return the component-wise average value of the texture over its domain. More...
 
Spectrum getMaximum () const
 Return the component-wise maximum of the texture over its domain. More...
 
Spectrum getMinimum () const
 Return the component-wise minimum of the texture over its domain. More...
 
bool isConstant () const
 Return whether the texture takes on a constant value everywhere. More...
 
std::string toString () const
 Return a human-readable string representation of the object's contents. More...
 
bool usesRayDifferentials () const
 Does this texture perform any pre-filtering when ray differentials are available? More...
 
bool isMonochromatic () const
 Return whether the texture is monochromatic / spectrally uniform. More...
 
ShadercreateShader (Renderer *renderer) const
 
ref< BitmapgetBitmap (const Vector2i &resolutionHint) const
 Return a bitmap representation of the texture. More...
 
void serialize (Stream *stream, InstanceManager *manager) const
 Serialize to a binary data stream. More...
 
virtual const ClassgetClass () const
 Retrieve this object's class. More...
 
- Public Member Functions inherited from mitsuba::Texture
virtual void evalGradient (const Intersection &its, Spectrum *gradient) const
 Return the texture gradient at its. More...
 
virtual Vector3i getResolution () const
 Return the resolution in pixels, if applicable. 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...
 
- Public Member Functions inherited from mitsuba::HWResource
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 Attributes

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

Detailed Description

Constant spectrum-valued texture.

Includes a Shader implementation for hardware rendering

Constructor & Destructor Documentation

mitsuba::ConstantSpectrumTexture::ConstantSpectrumTexture ( const Spectrum value)
inline
mitsuba::ConstantSpectrumTexture::ConstantSpectrumTexture ( Stream stream,
InstanceManager manager 
)

Member Function Documentation

Shader* mitsuba::ConstantSpectrumTexture::createShader ( Renderer renderer) const
virtual

Reimplemented from mitsuba::HWResource.

Spectrum mitsuba::ConstantSpectrumTexture::eval ( const Intersection its,
bool  filter 
) const
inlinevirtual

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.

Spectrum mitsuba::ConstantSpectrumTexture::getAverage ( ) const
inlinevirtual

Return the component-wise average value of the texture over its domain.

Reimplemented from mitsuba::Texture.

ref<Bitmap> mitsuba::ConstantSpectrumTexture::getBitmap ( const Vector2i sizeHint) 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::ConstantSpectrumTexture::getClass ( ) const
virtual

Retrieve this object's class.

Reimplemented from mitsuba::Texture.

Spectrum mitsuba::ConstantSpectrumTexture::getMaximum ( ) const
inlinevirtual

Return the component-wise maximum of the texture over its domain.

Reimplemented from mitsuba::Texture.

Spectrum mitsuba::ConstantSpectrumTexture::getMinimum ( ) const
inlinevirtual

Return the component-wise minimum of the texture over its domain.

Reimplemented from mitsuba::Texture.

bool mitsuba::ConstantSpectrumTexture::isConstant ( ) const
inlinevirtual

Return whether the texture takes on a constant value everywhere.

Reimplemented from mitsuba::Texture.

bool mitsuba::ConstantSpectrumTexture::isMonochromatic ( ) const
inlinevirtual

Return whether the texture is monochromatic / spectrally uniform.

The implementation may conservatively return false if it is not sure.

Reimplemented from mitsuba::Texture.

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

Serialize to a binary data stream.

Reimplemented from mitsuba::Texture.

std::string mitsuba::ConstantSpectrumTexture::toString ( ) const
inlinevirtual

Return a human-readable string representation of the object's contents.

This function is mainly useful for debugging purposes and should ideally be implemented by all subclasses. The default implementation simply returns MyObject[unknown], where MyObject is the name of the subclass.

Reimplemented from Object.

bool mitsuba::ConstantSpectrumTexture::usesRayDifferentials ( ) const
inlinevirtual

Does this texture perform any pre-filtering when ray differentials are available?

Reimplemented from mitsuba::Texture.

Member Data Documentation

Class* mitsuba::ConstantSpectrumTexture::m_theClass
static
Spectrum mitsuba::ConstantSpectrumTexture::m_value
protected

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