The spica renderer
Main Page
Modules
Classes
Files
File List
sources
core
constant.h
1
#ifdef _MSC_VER
2
#pragma once
3
#endif
4
5
#ifndef _SPICA_TEXTURE_CONSTANT_H_
6
#define _SPICA_TEXTURE_CONSTANT_H_
7
8
#include "texture.h"
9
10
namespace
spica {
11
12
template
<
class
T>
13
class
ConstantTexture
:
public
Texture
<T> {
14
public
:
15
explicit
ConstantTexture
(
const
T& value) : value_{ value } {}
16
T evaluate(
const
SurfaceInteraction
& isect)
const
{
return
value_; }
17
18
private
:
19
T value_;
20
};
// class ConstantTexture
21
22
}
// namespace spica
23
24
#endif // _SPICA_TEXTURE_CONSTANT_H_
spica::SurfaceInteraction
Definition:
interaction.h:68
spica::Texture
Texture interface.
Definition:
render.hpp:60
spica::ConstantTexture
Definition:
constant.h:13
Generated by
1.8.6