Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations | Functions | Variables

imagetexture.c File Reference

#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <math.h>
#include <float.h>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "DNA_image_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_image.h"
#include "BKE_texture.h"
#include "BKE_library.h"
#include "RE_render_ext.h"
#include "renderpipeline.h"
#include "render_types.h"
#include "texture.h"

Go to the source code of this file.

Classes

struct  afdata_t

Defines

#define EWA_MAXIDX   255
#define ISNAN(x)   ((x) != (x))

Typedefs

typedef struct afdata_t afdata_t

Enumerations

enum  { TXC_XMIR = 1, TXC_YMIR, TXC_REPT, TXC_EXTD }

Functions

static void boxsample (ImBuf *ibuf, float minx, float miny, float maxx, float maxy, TexResult *texres, const short imaprepeat, const short imapextend)
static void ibuf_get_color (float *col, struct ImBuf *ibuf, int x, int y)
int imagewrap (Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResult *texres)
static void clipx_rctf_swap (rctf *stack, short *count, float x1, float x2)
static void clipy_rctf_swap (rctf *stack, short *count, float y1, float y2)
static float square_rctf (rctf *rf)
static float clipx_rctf (rctf *rf, float x1, float x2)
static float clipy_rctf (rctf *rf, float y1, float y2)
static void boxsampleclip (struct ImBuf *ibuf, rctf *rf, TexResult *texres)
static int ibuf_get_color_clip (float *col, ImBuf *ibuf, int x, int y, int extflag)
static int ibuf_get_color_clip_bilerp (float *col, ImBuf *ibuf, float u, float v, int intpol, int extflag)
static void area_sample (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD)
static void radangle2imp (float a2, float b2, float th, float *A, float *B, float *C, float *F)
static void imp2radangle (float A, float B, float C, float F, float *a, float *b, float *th, float *ecc)
static void ewa_eval (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD)
static void feline_eval (TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata_t *AFD)
static void alpha_clip_aniso (ImBuf *ibuf, float minx, float miny, float maxx, float maxy, int extflag, TexResult *texres)
static void image_mipmap_test (Tex *tex, ImBuf *ibuf)
static int imagewraposa_aniso (Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], float dxt[3], float dyt[3], TexResult *texres)
int imagewraposa (Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const float DXT[3], const float DYT[3], TexResult *texres)
void image_sample (Image *ima, float fx, float fy, float dx, float dy, float *result)
void ibuf_sample (ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result)

Variables

struct Render R
static float EWA_WTS [EWA_MAXIDX+1]

Detailed Description

Definition in file imagetexture.c.


Define Documentation

#define EWA_MAXIDX   255

Definition at line 761 of file imagetexture.c.

Referenced by ewa_eval(), and feline_eval().

#define ISNAN (   x)    ((x) != (x))

Definition at line 801 of file imagetexture.c.

Referenced by imagewraposa_aniso().


Typedef Documentation

typedef struct afdata_t afdata_t

Enumeration Type Documentation

anonymous enum
Enumerator:
TXC_XMIR 
TXC_YMIR 
TXC_REPT 
TXC_EXTD 

Definition at line 639 of file imagetexture.c.


Function Documentation

static void alpha_clip_aniso ( ImBuf ibuf,
float  minx,
float  miny,
float  maxx,
float  maxy,
int  extflag,
TexResult texres 
) [static]
static void area_sample ( TexResult texr,
ImBuf ibuf,
float  fx,
float  fy,
afdata_t AFD 
) [static]
static void boxsample ( ImBuf ibuf,
float  minx,
float  miny,
float  maxx,
float  maxy,
TexResult texres,
const short  imaprepeat,
const short  imapextend 
) [static]
static void boxsampleclip ( struct ImBuf ibuf,
rctf rf,
TexResult texres 
) [static]
static float clipx_rctf ( rctf rf,
float  x1,
float  x2 
) [static]

Definition at line 407 of file imagetexture.c.

References size(), rctf::xmax, and rctf::xmin.

Referenced by alpha_clip_aniso(), and boxsample().

static void clipx_rctf_swap ( rctf stack,
short *  count,
float  x1,
float  x2 
) [static]

Definition at line 293 of file imagetexture.c.

References stack, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by boxsample().

static float clipy_rctf ( rctf rf,
float  y1,
float  y2 
) [static]

Definition at line 429 of file imagetexture.c.

References size(), rctf::ymax, and rctf::ymin.

Referenced by alpha_clip_aniso(), and boxsample().

static void clipy_rctf_swap ( rctf stack,
short *  count,
float  y1,
float  y2 
) [static]

Definition at line 346 of file imagetexture.c.

References stack, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by boxsample().

static void ewa_eval ( TexResult texr,
ImBuf ibuf,
float  fx,
float  fy,
afdata_t AFD 
) [static]
static void feline_eval ( TexResult texr,
ImBuf ibuf,
float  fx,
float  fy,
afdata_t AFD 
) [static]
static void ibuf_get_color ( float *  col,
struct ImBuf ibuf,
int  x,
int  y 
) [static]

Definition at line 84 of file imagetexture.c.

References ImBuf::channels, copy_v3_v3(), copy_v4_v4(), ImBuf::rect, ImBuf::rect_float, and ImBuf::x.

Referenced by boxsampleclip(), and imagewrap().

static int ibuf_get_color_clip ( float *  col,
ImBuf ibuf,
int  x,
int  y,
int  extflag 
) [static]
static int ibuf_get_color_clip_bilerp ( float *  col,
ImBuf ibuf,
float  u,
float  v,
int  intpol,
int  extflag 
) [static]

Definition at line 701 of file imagetexture.c.

References floorf, and ibuf_get_color_clip().

Referenced by area_sample(), and feline_eval().

void ibuf_sample ( ImBuf ibuf,
float  fx,
float  fy,
float  dx,
float  dy,
float *  result 
)
static void image_mipmap_test ( Tex tex,
ImBuf ibuf 
) [static]
void image_sample ( Image ima,
float  fx,
float  fy,
float  dx,
float  dy,
float *  result 
)
int imagewrap ( Tex tex,
Image ima,
ImBuf ibuf,
const float  texvec[3],
TexResult texres 
)
int imagewraposa ( Tex tex,
Image ima,
ImBuf ibuf,
const float  texvec[3],
const float  DXT[3],
const float  DYT[3],
TexResult texres 
)
static int imagewraposa_aniso ( Tex tex,
Image ima,
ImBuf ibuf,
const float  texvec[3],
float  dxt[3],
float  dyt[3],
TexResult texres 
) [static]
static void imp2radangle ( float  A,
float  B,
float  C,
float  F,
float *  a,
float *  b,
float *  th,
float *  ecc 
) [static]

Definition at line 817 of file imagetexture.c.

References atan2f, C, simple_enum_gen::d, credits_svn_gen::e, M_PI, and sqrtf.

Referenced by ewa_eval(), and imagewraposa_aniso().

static void radangle2imp ( float  a2,
float  b2,
float  th,
float *  A,
float *  B,
float *  C,
float *  F 
) [static]

Definition at line 805 of file imagetexture.c.

References cosf, and sinf.

Referenced by ewa_eval().

static float square_rctf ( rctf rf) [static]

Definition at line 398 of file imagetexture.c.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by boxsample().


Variable Documentation

float EWA_WTS[EWA_MAXIDX+1] [static]

Definition at line 762 of file imagetexture.c.

Referenced by ewa_eval(), and feline_eval().

struct Render R

Definition at line 127 of file pipeline.c.