Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Static Public Member Functions | List of all members
LDRBitmapFilm Class Referencefinal

Public Member Functions

 LM_COMPONENT_IMPL_DEF ("ldr")
 
virtual bool Load (const ConfigNode &node, const Assets &assets) override
 
virtual int Width () const override
 
virtual int Height () const override
 
virtual void RecordContribution (const Math::Vec2 &rasterPos, const Math::Vec3 &contrb) override
 
virtual void AccumulateContribution (const Math::Vec2 &rasterPos, const Math::Vec3 &contrb) override
 
virtual void AccumulateContribution (const Film &film) override
 
virtual void Rescale (const Math::Float &weight) override
 
virtual FilmClone () const override
 
virtual void Clear () override
 
virtual bool Save (const std::string &path) const override
 
virtual bool RescaleAndSave (const std::string &path, const Math::Float &weight) const override
 
virtual void Allocate (int width, int height) override
 
virtual void SetImageType (BitmapImageType type) override
 
virtual BitmapImageType ImageType () const override
 
virtual BitmapImageBitmap () override
 
- Public Member Functions inherited from Film
 LM_ASSET_INTERFACE_DEF ("film","films")
 
 LM_ASSET_NO_DEPENDENCIES ()
 
- Public Member Functions inherited from Asset
LM_PUBLIC_API std::string ID () const
 
LM_HIDDEN_API void SetID (const std::string &id)
 
- Public Member Functions inherited from Component
virtual std::string ComponentInterfaceTypeName () const =0
 
virtual std::string ComponentImplTypeName () const =0
 
- Public Member Functions inherited from SIMDAlignedType
void * operator new (std::size_t size) throw (std::bad_alloc)
 
void operator delete (void *p)
 

Static Public Member Functions

static void FreeImageErrorCallback (FREE_IMAGE_FORMAT fif, const char *message)
 
Inheritance diagram for LDRBitmapFilm:
BitmapFilm Film Asset Component SIMDAlignedType

Member Function Documentation

void LDRBitmapFilm::AccumulateContribution ( const Math::Vec2 &  rasterPos,
const Math::Vec3 &  contrb 
)
overridevirtual

Accumulate the contribution to the raster position. This function accumulates #contrb to the position specified by #rasterPos.

Parameters
rasterPosRaster position.
contrbContribution.

Implements Film.

void LDRBitmapFilm::AccumulateContribution ( const Film film)
overridevirtual

Accumulate the contribution to the entire film. This function accumulates the contribution of the other film. The other film must be same size and type.

Parameters
filmOther film.

Implements Film.

void LDRBitmapFilm::Allocate ( int  width,
int  height 
)
overridevirtual

Allocate the film with given width and height.

Parameters
widthWidth of the film.
heightHeight of the film.

Implements BitmapFilm.

virtual BitmapImage& LDRBitmapFilm::Bitmap ( )
inlineoverridevirtual

Get internal bitmap data.

Returns
A bitmap.

Implements BitmapFilm.

Film * LDRBitmapFilm::Clone ( ) const
overridevirtual

Clone the film.

Returns
Duplicated film.

Implements Film.

virtual int LDRBitmapFilm::Height ( ) const
inlineoverridevirtual

Get the height of the film.

Returns
Height of the film.

Implements Film.

virtual BitmapImageType LDRBitmapFilm::ImageType ( ) const
inlineoverridevirtual

Get bitmap image type.

Returns
Bitmap image type.

Implements BitmapFilm.

bool LDRBitmapFilm::Load ( const ConfigNode node,
const Assets assets 
)
overridevirtual

Load an asset. Configure and initialize the asset by the XML elements given by #node. Some assets have references to the other assets, so #assets is also required. Dependent asset must be loaded beforehand.

Parameters
nodeXML node for the configuration.
assetsAsset manager.
trueSucceeded to load.
falseFailed to load.

Implements Asset.

void LDRBitmapFilm::RecordContribution ( const Math::Vec2 &  rasterPos,
const Math::Vec3 &  contrb 
)
overridevirtual

Record the contribution to the raster position. This function records #contrb to the position specified by #rasterPos.

Parameters
rasterPosRaster position.
contrbContribution.

Implements Film.

void LDRBitmapFilm::Rescale ( const Math::Float &  weight)
overridevirtual

Rescale the pixel values by constant weight.

Parameters
weightRescaling weight.

Implements Film.

bool LDRBitmapFilm::RescaleAndSave ( const std::string &  path,
const Math::Float &  weight 
) const
overridevirtual

Rescale and save as image. Save the film as image after rescaling values for each pixel.

Parameters
pathPath to the output image.
weightRescaling weight.
Return values
trueSucceeded to save the image.
falseFailed to save the image.

Implements BitmapFilm.

virtual bool LDRBitmapFilm::Save ( const std::string &  path) const
inlineoverridevirtual

Save as image. Saves the film as image. If #path is empty, the default path is used.

Parameters
pathPath to the output image.
Return values
trueSucceeded to save the image.
falseFailed to save the image.

Implements BitmapFilm.

virtual void LDRBitmapFilm::SetImageType ( BitmapImageType  type)
inlineoverridevirtual

Set bitmap image type.

Parameters
typeBitmap image type.

Implements BitmapFilm.

virtual int LDRBitmapFilm::Width ( ) const
inlineoverridevirtual

Get the width of the film.

Returns
Width of the film.

Implements Film.


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