Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TCheckerboardTexture< OutputType > Class Template Reference

Texture representing checker patterns. More...

#include <TCheckerboardTexture.h>

Inheritance diagram for ph::TCheckerboardTexture< OutputType >:
ph::TTexture< OutputType >

Public Member Functions

 TCheckerboardTexture (real numUtiles, real numVtiles, const OutputType &oddValue, const OutputType &evenValue)
 
 TCheckerboardTexture (real numUtiles, real numVtiles, const std::shared_ptr< TTexture< OutputType > > &oddTexture, const std::shared_ptr< TTexture< OutputType > > &evenTexture)
 
void sample (const SampleLocation &sampleLocation, OutputType *out_value) const override
 
void setOddTexture (const std::shared_ptr< TTexture< OutputType > > &oddTexture)
 Sets the texture that is going to be used in odd cells.
 
void setEvenTexture (const std::shared_ptr< TTexture< OutputType > > &evenTexture)
 Sets the texture that is going to be used in even cells.
 
void setOddTextureScale (const math::Vector3R &sale)
 Sets the scale factors of cell texture. Larger u-, v- and w-scale makes texture appears to be larger in the corresponding direction, and vice versa.
 
void setEvenTextureScale (const math::Vector3R &scale)
 
- Public Member Functions inherited from ph::TTexture< OutputType >
 TTexture ()=default
 
virtual ~TTexture ()=default
 

Additional Inherited Members

- Public Types inherited from ph::TTexture< OutputType >
using Output = OutputType
 

Detailed Description

template<typename OutputType>
class ph::TCheckerboardTexture< OutputType >

Texture representing checker patterns.

A texture that is able to represent two inner textures alternately, producing pattern similar to a chessboard. We name the cells in the checkerboard in the following manner:

v +--—+--—+--—+ | even| odd| even| +--—+--—+--—+ | odd| even| odd| +--—+--—+--—+ | even| odd| even| +--—+--—+--—+ u

Constructor & Destructor Documentation

◆ TCheckerboardTexture() [1/2]

template<typename OutputType >
ph::TCheckerboardTexture< OutputType >::TCheckerboardTexture ( real numUtiles,
real numVtiles,
const OutputType & oddValue,
const OutputType & evenValue )
inline

◆ TCheckerboardTexture() [2/2]

template<typename OutputType >
ph::TCheckerboardTexture< OutputType >::TCheckerboardTexture ( real numUtiles,
real numVtiles,
const std::shared_ptr< TTexture< OutputType > > & oddTexture,
const std::shared_ptr< TTexture< OutputType > > & evenTexture )
inline

Member Function Documentation

◆ sample()

template<typename OutputType >
void ph::TCheckerboardTexture< OutputType >::sample ( const SampleLocation & sampleLocation,
OutputType * out_value ) const
inlineoverridevirtual

◆ setEvenTexture()

template<typename OutputType >
void ph::TCheckerboardTexture< OutputType >::setEvenTexture ( const std::shared_ptr< TTexture< OutputType > > & evenTexture)
inline

Sets the texture that is going to be used in even cells.

◆ setEvenTextureScale()

template<typename OutputType >
void ph::TCheckerboardTexture< OutputType >::setEvenTextureScale ( const math::Vector3R & scale)
inline

◆ setOddTexture()

template<typename OutputType >
void ph::TCheckerboardTexture< OutputType >::setOddTexture ( const std::shared_ptr< TTexture< OutputType > > & oddTexture)
inline

Sets the texture that is going to be used in odd cells.

◆ setOddTextureScale()

template<typename OutputType >
void ph::TCheckerboardTexture< OutputType >::setOddTextureScale ( const math::Vector3R & sale)
inline

Sets the scale factors of cell texture. Larger u-, v- and w-scale makes texture appears to be larger in the corresponding direction, and vice versa.


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