Tachyon (current)
Current Main Branch
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "macros.h"
#include "texture.h"
#include "coordsys.h"
#include "imap.h"
#include "vector.h"
#include "box.h"
#include "util.h"
Go to the source code of this file.
Macros | |
#define | TACHYON_INTERNAL 1 |
#define | NMAX 28 |
Functions | |
texture * | new_texture (void) |
texture * | new_standard_texture (void) |
texture * | new_vcstri_texture (void) |
void | free_standard_texture (void *voidtex) |
color | solid_background_texture (ray *ry) |
color | sky_sphere_background_texture (ray *ry) |
color | sky_plane_background_texture (ray *ry) |
color | constant_texture (const vector *hit, const texture *tx, const ray *ry) |
color | image_cyl_texture (const vector *hit, const texture *tx, const ray *ry) |
color | image_sphere_texture (const vector *hit, const texture *tx, const ray *ry) |
color | image_plane_texture (const vector *hit, const texture *tx, const ray *ry) |
color | image_volume_texture (const vector *hit, const texture *tx, const ray *ry) |
color | grit_texture (const vector *hit, const texture *tx, const ray *ry) |
color | checker_texture (const vector *hit, const texture *tx, const ray *ry) |
color | cyl_checker_texture (const vector *hit, const texture *tx, const ray *ry) |
color | wood_texture (const vector *hit, const texture *tx, const ray *ry) |
void | InitNoise (void) |
int | Noise (flt x, flt y, flt z) |
color | marble_texture (const vector *hit, const texture *tx, const ray *ry) |
color | gnoise_texture (const vector *hit, const texture *tx, const ray *ry) |
void | InitTextures (void) |
void | FreeTextures (void) |
Variables | |
static texture_methods | normal_methods |
static texture_methods | standard_methods |
static texture_methods | vcstri_methods |
short int | NoiseMatrix [NMAX][NMAX][NMAX] |
#define NMAX 28 |
Definition at line 405 of file texture.c.
Referenced by InitNoise(), and Noise().
color checker_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
color constant_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 149 of file texture.c.
Referenced by apitextotex(), and newscalarvol().
color cyl_checker_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 337 of file texture.c.
References FABS, and xyztocyl().
Referenced by apitextotex().
void free_standard_texture | ( | void * | voidtex | ) |
Definition at line 59 of file texture.c.
References FreeMIPMap(), image_cyl_texture(), image_plane_texture(), image_sphere_texture(), and image_volume_texture().
void FreeTextures | ( | void | ) |
Definition at line 540 of file texture.c.
References FreeImages().
Referenced by rt_deletescene(), and rt_finalize().
color gnoise_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
color grit_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 291 of file texture.c.
Referenced by apitextotex().
color image_cyl_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 155 of file texture.c.
References FABS, MIPMap(), SQRT, and xyztocyl().
Referenced by apitextotex(), and free_standard_texture().
color image_plane_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 219 of file texture.c.
References FABS, MIPMap(), and VDOT.
Referenced by apitextotex(), and free_standard_texture().
color image_sphere_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 187 of file texture.c.
References FABS, MIPMap(), SQRT, and xyztospr().
Referenced by apitextotex(), and free_standard_texture().
color image_volume_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 252 of file texture.c.
References FABS, VDOT, and VolMIPMap().
Referenced by apitextotex(), and free_standard_texture().
void InitNoise | ( | void | ) |
Definition at line 408 of file texture.c.
References NMAX, NoiseMatrix, rt_rand(), and RT_RAND_MAX_INV.
Referenced by InitTextures().
void InitTextures | ( | void | ) |
Definition at line 535 of file texture.c.
References InitNoise(), and ResetImages().
Referenced by rt_initialize(), rt_initialize_mpi_comm(), rt_initialize_mpi_comm_split(), rt_initialize_mpi_comm_world(), and rt_initialize_nompi().
color marble_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
texture* new_standard_texture | ( | void | ) |
Definition at line 45 of file texture.c.
References standard_methods.
Referenced by rt_texture(), and rt_texture_copy_standard().
texture* new_texture | ( | void | ) |
Definition at line 38 of file texture.c.
References normal_methods.
texture* new_vcstri_texture | ( | void | ) |
Definition at line 52 of file texture.c.
References vcstri_methods.
Referenced by rt_texture_copy_vcstri().
Definition at line 432 of file texture.c.
References FABS, NMAX, and NoiseMatrix.
Referenced by gnoise_texture(), and marble_texture().
color sky_plane_background_texture | ( | ray * | ry | ) |
Definition at line 116 of file texture.c.
References rt_rand(), RT_RAND_MAX_INV, tea4(), and VDot().
Referenced by rt_background_mode().
color sky_sphere_background_texture | ( | ray * | ry | ) |
Definition at line 83 of file texture.c.
References rt_rand(), RT_RAND_MAX_INV, tea4(), and VDot().
Referenced by rt_background_mode().
color solid_background_texture | ( | ray * | ry | ) |
Definition at line 77 of file texture.c.
Referenced by rt_background_mode().
color wood_texture | ( | const vector * | hit, |
const texture * | tx, | ||
const ray * | ry | ||
) |
Definition at line 406 of file texture.c.
Referenced by InitNoise(), and Noise().
|
static |
|
static |
|
static |
Definition at line 34 of file texture.c.
Referenced by new_vcstri_texture().