00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __IMG_TTMipSampler__
00020 #define __IMG_TTMipSampler__
00021
00022 #include "IMG_API.h"
00023 #include <UT/UT_Vector3.h>
00024 #include "IMG_FileTTMap.h"
00025
00026 class IMG_TTFilterInfo;
00027 class IMG_TTChannel;
00028
00029 class IMG_API IMG_TTMipSampler {
00030 public:
00031 IMG_TTMipSampler(int xres, int yres, IMG_TTChannel *ch);
00032 ~IMG_TTMipSampler();
00033
00034
00035 void getPixel(void *pixel, int iu, int iv);
00036
00037
00038 void sample(float *result, int nchan,
00039 float u, float v);
00040 void bilerp(float *result, int nchan,
00041 float u, float v,
00042 UT_FilterWrap uwrap, UT_FilterWrap vwrap,
00043 float cscale);
00044 void sample(float *result, int nchan,
00045 float u, float v, float du, float dv,
00046 const IMG_TTFilterInfo &filter,
00047 const UT_Vector3 &zeqn,
00048 float cscale);
00049
00050 private:
00051 float myXres, myYres;
00052 float myXres5, myYres5;
00053 int myIXres, myIYres;
00054 float myDx, myDy;
00055 IMG_TTChannel *myChannel;
00056 };
00057
00058 #endif
00059