28#ifndef OGREIMAGERESAMPLER_H
29#define OGREIMAGERESAMPLER_H
117 unsigned int temp =
static_cast<unsigned int>(
sz_48 >> 32);
122 float szf = (
temp & 0xFFFF) / 65536.f;
126 temp =
static_cast<unsigned int>(
sy_48 >> 32);
130 float syf = (
temp & 0xFFFF) / 65536.f;
134 temp =
static_cast<unsigned int>(
sx_48 >> 32);
138 float sxf = (
temp & 0xFFFF) / 65536.f;
143#define UNPACK(dst,x,y,z) PixelUtil::unpackColour(&dst, src.format, \
144 srcdata + srcelemsize*((x)+(y)*src.rowPitch+(z)*src.slicePitch))
201 unsigned int temp =
static_cast<unsigned int>(
sz_48 >> 32);
206 float szf = (
temp & 0xFFFF) / 65536.f;
210 temp =
static_cast<unsigned int>(
sy_48 >> 32);
214 float syf = (
temp & 0xFFFF) / 65536.f;
218 temp =
static_cast<unsigned int>(
sx_48 >> 32);
222 float sxf = (
temp & 0xFFFF) / 65536.f;
225 float accum[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
227#define ACCUM3(x,y,z,factor) \
228 { float f = factor; \
229 size_t off = (x+y*src.rowPitch+z*src.slicePitch)*srcchannels; \
230 accum[0]+=srcdata[off+0]*f; accum[1]+=srcdata[off+1]*f; \
231 accum[2]+=srcdata[off+2]*f; }
233#define ACCUM4(x,y,z,factor) \
234 { float f = factor; \
235 size_t off = (x+y*src.rowPitch+z*src.slicePitch)*srcchannels; \
236 accum[0]+=srcdata[off+0]*f; accum[1]+=srcdata[off+1]*f; \
237 accum[2]+=srcdata[off+2]*f; accum[3]+=srcdata[off+3]*f; }
308 unsigned int temp =
static_cast<unsigned int>(
sy_48 >> 36);
310 unsigned int syf =
temp & 0xFFF;
318 temp =
static_cast<unsigned int>(
sx_48 >> 36);
320 unsigned int sxf =
temp & 0xFFF;
333 *
pdst++ =
static_cast<uchar>((accum + 0x800000) >> 24);
#define ACCUM4(x, y, z, factor)
#define ACCUM3(x, y, z, factor)
#define UNPACK(dst, x, y, z)
Class representing colour.
A primitive describing a volume (3D), image (2D) or line (1D) of pixels in memory.
size_t getSliceSkip() const
Get the number of elements between one past the right bottom pixel of one slice and the left top pixe...
size_t getRowSkip() const
Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of ...
size_t slicePitch
Number of elements between the top left pixel of one (depth) slice and the top left pixel of the next...
PixelFormat format
The pixel format.
size_t rowPitch
Number of elements between the leftmost pixel of one row and the left pixel of the next.
void * data
The data pointer.
static size_t getNumElemBytes(PixelFormat format)
Returns the size in bytes of an element of the given pixel format.
static void packColour(const ColourValue &colour, const PixelFormat pf, void *dest)
Pack a colour value to memory.
Reference-counted shared pointer, used for objects where implicit destruction is required.
unsigned long long uint64
uint32 getHeight() const
Get the height of this box.
uint32 getWidth() const
Get the width of this box.
uint32 getDepth() const
Get the depth of this box.
static void scale(const PixelBox &src, const PixelBox &dst)
static void scale(const PixelBox &src, const PixelBox &dst)
static void scale(const PixelBox &src, const PixelBox &dst)
static void scale(const PixelBox &src, const PixelBox &dst)