BRL-CAD
|
#include "common.h"
#include "bu/vls.h"
#include "bu/mapped_file.h"
#include "vmath.h"
#include "rt/geom.h"
#include "rt/functab.h"
Go to the source code of this file.
Data Structures | |
struct | rt_texture |
Macros | |
#define | TXT_SRC_FILE 'f' |
#define | TXT_SRC_OBJECT 'o' |
#define | TXT_SRC_AUTO 0 |
#define | RT_TEXTURE_INIT_ZERO {{0,0,0}, BU_VLS_INIT_ZERO, 0, 0, 0, {0.0, 0.0}, 0, 0, NULL, NULL} |
#define | RT_HIT_UV(_ap, _stp, _hitp, _uvp) |
Functions | |
int | rt_texture_load (struct rt_texture *tp, const char *name, struct db_i *dbip) |
int | rt_texture_lookup (fastf_t *data, const struct rt_texture *tp, const struct uvcoord *uvp) |
This file is API pertaining to uv parameterization on objects.
Definition in file uv.h.
#define RT_TEXTURE_INIT_ZERO {{0,0,0}, BU_VLS_INIT_ZERO, 0, 0, 0, {0.0, 0.0}, 0, 0, NULL, NULL} |
initialize an rt_texture to zero
#define RT_HIT_UV | ( | _ap, | |
_stp, | |||
_hitp, | |||
_uvp | |||
) |
As rt_shootray() only calculates hit points and returns a list of partitions, applications must request that the corresponding UV coordinate be computed via: RT_HIT_UV(NULL, hitp, stp, rayp, 0);
These calculations are deferred to user code to avoid needless computation in other ray situations.
int rt_texture_load | ( | struct rt_texture * | tp, |
const char * | name, | ||
struct db_i * | dbip | ||
) |
loads a texture from either a file or database object.
TODO: replace txt_load_datasource in liboptical
int rt_texture_lookup | ( | fastf_t * | data, |
const struct rt_texture * | tp, | ||
const struct uvcoord * | uvp | ||
) |
Given a uv coordinate (0.0 <= u, v <= 1.0) and a texture, return a pointer to the corresponding texture data (as a fastf_t[3]).
TODO: replace txt_render in liboptical