8#include <Common/assertion.h>
19template<
typename T, std::
size_t N>
53 float64*
const out_u, float64*
const out_v)
const
61 *out_u = fu >= 0.0 ? fu : fu + 1.0;
62 *out_v = fv >= 0.0 ? fv : fv + 1.0;
72 PH_ASSERT_UNREACHABLE_SECTION();
75 PH_ASSERT(*out_u >= 0.0 && *out_u <= 1.0 &&
76 *out_v >= 0.0 && *out_v <= 1.0);
81 PH_ASSERT(widthPx > 0);
89 PH_ASSERT(heightPx > 0);
Definition SampleLocation.h:22
Definition TAbstractPixelTex2D.h:21
float64 getTexelSizeV() const
Definition TAbstractPixelTex2D.h:42
float64 m_texelSizeV
Definition TAbstractPixelTex2D.h:99
void setWrapMode(const ETexWrapMode mode)
Definition TAbstractPixelTex2D.h:45
void sample(const SampleLocation &sampleLocation, TTexPixel< T, N > *out_value) const override=0
uint32 getWidthPx() const
Definition TAbstractPixelTex2D.h:39
TAbstractPixelTex2D()
Definition TAbstractPixelTex2D.h:23
uint32 m_widthPx
Definition TAbstractPixelTex2D.h:96
void setWidthPx(const uint32 widthPx)
Definition TAbstractPixelTex2D.h:79
uint32 getHeightPx() const
Definition TAbstractPixelTex2D.h:40
ETexWrapMode m_wrapMode
Definition TAbstractPixelTex2D.h:100
float64 getTexelSizeU() const
Definition TAbstractPixelTex2D.h:41
float64 m_texelSizeU
Definition TAbstractPixelTex2D.h:98
void setHeightPx(const uint32 heightPx)
Definition TAbstractPixelTex2D.h:87
ETexWrapMode getWrapMode() const
Definition TAbstractPixelTex2D.h:43
uint32 m_heightPx
Definition TAbstractPixelTex2D.h:97
void normalizeUV(const float64 u, const float64 v, float64 *const out_u, float64 *const out_v) const
Definition TAbstractPixelTex2D.h:52
TAbstractPixelTex2D(const uint32 widthPx, const uint32 heightPx)
Definition TAbstractPixelTex2D.h:27
Definition TArithmeticArray.h:13
Miscellaneous math utilities.
T fractional_part(const T value)
Retrieve the fractional part of value (with the sign unchanged). The result is not guaranteed to be t...
Definition math.h:258
T clamp(const T value, const T lowerBound, const T upperBound)
Clamps a value to [lowerBound, upperBound]. None of value, lowerBound and upperBound can be NaN,...
Definition math.h:77
The root for all renderer implementations.
Definition EEngineProject.h:6
ETexWrapMode
Definition TAbstractPixelTex2D.h:14