HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
IMG_TTMipSampler.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: IMG_TTMipSampler.h ( IMG Library, C++)
7
*
8
* COMMENTS: A general mipmap sampler for tiled textures
9
*/
10
11
#ifndef __IMG_TTMipSampler__
12
#define __IMG_TTMipSampler__
13
14
#include "
IMG_API.h
"
15
#include "
IMG_FileTTMap.h
"
16
#include <
UT/UT_NonCopyable.h
>
17
#include <
UT/UT_Vector3.h
>
18
19
class
IMG_TextureFilter
;
20
class
IMG_TTChannel
;
21
22
class
IMG_API
IMG_TTMipSampler
23
{
24
public
:
25
IMG_TTMipSampler
(
int
xres,
int
yres,
IMG_TTChannel
*ch);
26
~
IMG_TTMipSampler
();
27
28
UT_NON_COPYABLE
(
IMG_TTMipSampler
)
29
30
int64
getMemoryUsage(
bool
inclusive)
const
31
{
32
// NOTE: We don't own myChannel.
33
return
inclusive ?
sizeof
(*this) : 0;
34
}
35
36
/// This method returns raw pixel data. iu and iv are in screen space.
37
void
getPixel(
void
*pixel,
int
iu,
int
iv);
38
39
void
sample(
float
*
result
,
int
nchan,
40
float
u,
float
v
,
41
const
IMG_TextureFilter
&
filter
);
42
void
sample(
float
*
result
,
float
&visible,
int
nchan,
43
float
u,
float
v
,
float
du,
float
dv,
44
const
IMG_TextureFilter
&
filter
,
45
float
mipblend);
46
void
sampleBilinear(
float
*
result
,
int
nchan,
47
float
u,
float
v
,
float
&visible,
48
const
IMG_TextureFilter
&
filter
);
49
void
sampleBicubic(
float
*
result
,
int
nchan,
50
float
u,
float
v
,
float
&visible,
51
const
IMG_TextureFilter
&
filter
);
52
void
sampleBiquadratic(
float
*
result
,
int
nchan,
53
float
u,
float
v
,
float
&visible,
54
const
IMG_TextureFilter
&
filter
);
55
56
private
:
57
float
myXres, myYres;
// Float to minimize conversions
58
float
myXres5, myYres5;
// Half the xres/yres
59
int
myIXres, myIYres;
// Integer values for res
60
float
myDx, myDy;
// Size of a pixel in my map
61
IMG_TTChannel
*myChannel;
62
};
63
64
#endif
65
v
const GLdouble * v
Definition:
glcorearb.h:837
IMG_API.h
UT_Vector3.h
result
**But if you need a result
Definition:
thread.h:613
IMG_API
#define IMG_API
Definition:
IMG_API.h:10
IMG_TTChannel
Definition:
IMG_FileTTMap.h:31
UT_NON_COPYABLE
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
Definition:
UT_NonCopyable.h:31
int64
long long int64
Definition:
SYS_Types.h:116
UT_NonCopyable.h
IMG_TextureFilter
Modes for filtering.
Definition:
IMG_TextureFilter.h:47
IMG_FileTTMap.h
IMG_TTMipSampler
Definition:
IMG_TTMipSampler.h:22
filter
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition:
glcorearb.h:1297
IMG
IMG_TTMipSampler.h
Generated on Fri Nov 8 2024 03:39:24 for HDK by
1.8.6