Detailed Description
- See also:
- Class UVGen, Class
ShadeContext.
- Description:
- A texture map implements this class and passes it into the
UVGen methods
EvalUVMap(), EvalUVMapMono(), and EvalDeriv()
to evaluate itself with tiling & mirroring. Each of the methods
of this class are used to sample the map at a single UV
coordinate.
#include <imtl.h>
List of all
members.
Public Member Functions
|
virtual |
~MapSampler
() |
virtual
AColor |
Sample
(ShadeContext
&sc, float u, float v)=0 |
virtual
AColor |
SampleFilter
(ShadeContext
&sc, float u, float v, float du, float dv)=0 |
virtual
void |
SetTileNumbers
(int iu, int iv) |
virtual
float |
SampleMono
(ShadeContext
&sc, float u, float v) |
virtual
float |
SampleMonoFilter
(ShadeContext
&sc, float u, float v, float du, float dv) |
Constructor & Destructor Documentation
Member Function Documentation
- Parameters:
- ShadeContext& sc
The ShadeContext.
float u
The U value in the range of 0.0 to 1.0
float v
The V value in the range of 0.0 to 1.0
- Returns:
- The sampled value as an AColor.
virtual AColor SampleFilter |
( |
ShadeContext & |
sc, |
|
|
float |
u, |
|
|
float |
v, |
|
|
float |
du, |
|
|
float |
dv |
|
) |
|
[pure virtual] |
- Parameters:
- ShadeContext& sc
The ShadeContext.
float u
The U value in the range of 0.0 to 1.0
float v
The V value in the range of 0.0 to 1.0
float du
This parameter can be considered the width of a small rectangle
center on u,v. The u and v value are guaranteed to be inside this
rectangle.
float dv
This parameter can be considered the height of a small rectangle
center on u,v. The u and v value are guaranteed to be inside this
rectangle.
- Returns:
- The sampled value as an AColor.
virtual void SetTileNumbers |
( |
int |
iu, |
|
|
int |
iv |
|
) |
|
[inline, virtual] |
virtual float SampleMono |
( |
ShadeContext & |
sc, |
|
|
float |
u, |
|
|
float |
v |
|
) |
|
[inline, virtual] |
- Parameters:
- ShadeContext& sc
The ShadeContext.
float u
The U value in the range of 0.0 to 1.0
float v
The V value in the range of 0.0 to 1.0
- Returns:
- The sampled value as an float.
- Default Implementation:
- { return Intens(Sample(sc,u,v)); }
{ return Intens(Sample(sc,u,v)); }
virtual float SampleMonoFilter |
( |
ShadeContext & |
sc, |
|
|
float |
u, |
|
|
float |
v, |
|
|
float |
du, |
|
|
float |
dv |
|
) |
|
[inline, virtual] |
- Parameters:
- ShadeContext& sc
The ShadeContext.
float u
The U value in the range of 0.0 to 1.0
float v
The V value in the range of 0.0 to 1.0
float du
This parameter can be considered the width of a small rectangle
center on u,v. The u and v value are
guaranteed to be inside this rectangle.
float dv
This parameter can be considered the height of a small rectangle
center on u,v. The u and v value are
guaranteed to be inside this rectangle.
- Returns:
- The sampled value as an float.
- Default Implementation:
- { return Intens(SampleFilter(sc,u,v,du,dv)); }
MapSampler MapSampler MapSampler
MapSampler MapSampler MapSampler MapSampler MapSampler MapSampler
MapSampler
MapSampler MapSampler MapSampler
MapSampler MapSampler MapSampler MapSampler MapSampler MapSampler
MapSampler