|
Doxygen Source Code Documentation
Main Page Alphabetical List Data Structures File List Data Fields Globals Search
vp_global.h File Reference#include "config.h"
#include "volpack.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <stdarg.h>
#include <string.h>
Go to the source code of this file.
|
Data Structures |
struct | _gbuffer |
struct | _vp_context |
struct | ConstructionBuffer |
struct | GrayIntPixel |
struct | MinMaxOctree |
struct | MMOctreeLevel |
struct | RGBIntPixel |
struct | RLEVoxels |
struct | RunData |
struct | ScanOffset |
struct | Trapezoid |
Defines |
#define | index strchr |
#define | rindex strrchr |
#define | bcopy(s, d, n) memcpy ((d), (s), (n)) |
#define | bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) |
#define | bzero(s, n) memset ((s), 0, (n)) |
#define | DECLARE_HIRES_TIME(t) |
#define | GET_HIRES_TIME(vpc, t) |
#define | STORE_HIRES_TIME(vpc, code, t0, t1) |
#define | COPY_HIRES_TIME(t0, t1) |
#define | DECLARE_TIME(t) |
#define | GET_TIME(vpc, t) |
#define | STORE_TIME(vpc, code, t0, t1) |
#define | USE_RLEVOLUME 10 |
#define | USE_RAWVOLUME 11 |
#define | CALLBACK_SHADER 20 |
#define | LOOKUP_SHADER 21 |
#define | EXT_SURFACE 0 |
#define | INT_SURFACE 1 |
#define | MATL_AMB_R 0 |
#define | MATL_DIFF_R 1 |
#define | MATL_SPEC_R 2 |
#define | MATL_AMB_G 3 |
#define | MATL_DIFF_G 4 |
#define | MATL_SPEC_G 5 |
#define | MATL_AMB_B 6 |
#define | MATL_DIFF_B 7 |
#define | MATL_SPEC_B 8 |
#define | MATL_SHINY 9 |
#define | NUM_MATL_PROPS 10 |
#define | DEFAULT_AMBIENT (0.1*255.0) |
#define | DEFAULT_DIFFUSE (0.4*255.0) |
#define | DEFAULT_SPECULAR (0.5*255.0) |
#define | DEFAULT_SHINYNESS 10.0 |
#define | DEFAULT_DC_QUANTIZATION (1./255.) |
#define | WARP_WEIGHT_INDEX_BITS 6 |
#define | WARP_WEIGHT_ENTRIES (1 << WARP_WEIGHT_INDEX_BITS) |
#define | VP_MAX_OCTREE_LEVELS 16 |
#define | MM_K_BIT 4 |
#define | MM_J_BIT 2 |
#define | MM_I_BIT 1 |
#define | MM_EMPTY 0 |
#define | MM_FULL 1 |
#define | MM_PARTFULL 2 |
#define | INDEX_RUN_IS_ZERO 0x7000 |
#define | NULL 0 |
#define | MAX(a, b) (((a)<(b)) ? (b) : (a)) |
#define | MIN(a, b) (((a)>(b)) ? (b) : (a)) |
#define | Alloc(context, ptr, type, size, use) |
#define | Dealloc(context, ptr) |
#define | Debug(x) |
#define | ASSERT(expr) |
#define | ReportStatus(context, frac) |
#define | ByteField(voxel, offset) (*((unsigned char *)(voxel) + (offset))) |
#define | ShortField(voxel, offset) |
#define | IntField(voxel, offset) (*((unsigned *)((char *)(voxel)+(offset)))) |
#define | VoxelField(voxel, offset, size) |
#define | GBUFFER_SIZE 1024 |
Typedefs |
typedef _gbuffer | GBuffer |
Functions |
double rint | ANSI_ARGS ((double x)) |
vpResult VPCheckVoxelFields | ANSI_ARGS ((vpContext *vpc)) |
vpResult VPCheckClassifiedVolume | ANSI_ARGS ((vpContext *vpc, int axis)) |
vpResult VPSetError | ANSI_ARGS ((vpContext *vpc, vpResult code)) |
vpResult VPClassifyBlock | ANSI_ARGS ((vpContext *vpc, int correct, int x0, int y0, int z0, int x1, int y1, int z1, float *opc, int dst_xstride, int dst_ystride, int dst_zstride)) |
float VPClassifyVoxel | ANSI_ARGS ((vpContext *vpc, void *voxel)) |
vpResult VPShadeBlock | ANSI_ARGS ((vpContext *vpc, int x0, int y0, int z0, int x1, int y1, int z1, float *shd, int dst_xstride, int dst_ystride, int dst_zstride)) |
void VPQuantize | ANSI_ARGS ((float *src, int xlen, int ylen, int zlen, double scale, int maxvalue, unsigned char *dst, int dst_xstride, int dst_ystride, int dst_zstride)) |
void VPLoadTranslation | ANSI_ARGS ((vpMatrix4 m, double tx, double ty, double tz)) |
void VPLoadRotation | ANSI_ARGS ((vpMatrix4 m, int axis, double degrees)) |
void VPLoadScale | ANSI_ARGS ((vpMatrix4 m, double sx, double sy, double sz)) |
void VPComputeViewTransform | ANSI_ARGS ((vpContext *vpc, vpMatrix4 vm)) |
void VPResizeRenderBuffers | ANSI_ARGS ((vpContext *vpc, int max_width, int max_height, int max_scan)) |
void VPResizeDepthCueTable | ANSI_ARGS ((vpContext *vpc, int entries, int copy)) |
void VPComputeDepthCueTable | ANSI_ARGS ((vpContext *vpc, int first, int last)) |
void VPDepthCueIntImage | ANSI_ARGS ((vpContext *vpc, int slicenum)) |
void VPResizeShadowBuffer | ANSI_ARGS ((vpContext *vpc, int max_width, int max_height)) |
void VPBug | ANSI_ARGS ((char *fmt,...)) |
RLEVoxels *VPCreateRLEVoxels | ANSI_ARGS ((vpContext *vpc, int ilen, int jlen, int klen, int data_count, int run_count, int rle_bytes_per_voxel)) |
void VPDestroyRLEVoxels | ANSI_ARGS ((vpContext *vpc, RLEVoxels *rle_voxels)) |
void VPRenderAffine | ANSI_ARGS ((vpContext *vpc, int algorithm, void(*composite_func)())) |
void VPInitOctreeLevelStack | ANSI_ARGS ((vpContext *vpc, MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS], int axis, int k)) |
int VPComputeScanRuns | ANSI_ARGS ((vpContext *vpc, MMOctreeLevel level_stack[VP_MAX_OCTREE_LEVELS], unsigned char *run_lengths, int axis, int j, int icount)) |
int VPCheckRuns | ANSI_ARGS ((vpContext *vpc, unsigned char *run_lengths, int axis, int k, int j)) |
void VPComputeWarpTables | ANSI_ARGS ((void)) |
void VPAffineImageOverlap | ANSI_ARGS ((int in_width, int in_height, int out_width, int out_height, vpMatrix3 warp_matrix, double filter_width, Trapezoid full_overlap[9], Trapezoid part_overlap[9])) |
Define Documentation
|
Value: { \
(ptr) = (type)malloc((unsigned)(size)); \
if ((ptr) == NULL) \
VPBug("out of memory"); \
if ((context)->log_alloc_func != NULL) \
(context)->log_alloc_func((ptr),(size),(use), \
__LINE__,__FILE__,(context)->client_data); \
}
Definition at line 179 of file vp_global.h.
Referenced by cds(), copyn(), doinclude(), dsort(), getcd(), gmem(), inilex(), make_one_const(), mem(), mem_init(), np_init(), outbuf_adjust(), and store_comment(). |
#define bcmp |
( |
s1, |
|
|
s2, |
|
|
n |
|
) |
memcmp ((s1), (s2), (n))
|
|
#define bcopy |
( |
s, |
|
|
d, |
|
|
n |
|
) |
memcpy ((d), (s), (n))
|
|
#define ByteField |
( |
voxel, |
|
|
offset |
|
) |
(*((unsigned char *)(voxel) + (offset)))
|
|
#define bzero |
( |
s, |
|
|
n |
|
) |
memset ((s), 0, (n))
|
|
#define CALLBACK_SHADER 20
|
|
#define COPY_HIRES_TIME |
( |
t0, |
|
|
t1 |
|
) |
|
|
#define Dealloc |
( |
context, |
|
|
ptr |
|
) |
|
|
|
Value: { \
if ((context)->log_free_func != NULL) \
(context)->log_free_func(ptr, (context)->client_data); \
free((void *)ptr); \
}
Definition at line 190 of file vp_global.h. |
#define DECLARE_HIRES_TIME |
( |
t |
|
) |
|
|
#define DECLARE_TIME |
( |
t |
|
) |
|
|
#define DEFAULT_AMBIENT (0.1*255.0)
|
|
#define DEFAULT_DC_QUANTIZATION (1./255.)
|
|
#define DEFAULT_DIFFUSE (0.4*255.0)
|
|
#define DEFAULT_SHINYNESS 10.0
|
|
#define DEFAULT_SPECULAR (0.5*255.0)
|
|
#define GBUFFER_SIZE 1024
|
|
#define GET_HIRES_TIME |
( |
vpc, |
|
|
t |
|
) |
|
|
#define GET_TIME |
( |
vpc, |
|
|
t |
|
) |
|
|
#define INDEX_RUN_IS_ZERO 0x7000
|
|
#define IntField |
( |
voxel, |
|
|
offset |
|
) |
(*((unsigned *)((char *)(voxel)+(offset))))
|
|
#define MAX |
( |
a, |
|
|
b |
|
) |
(((a)<(b)) ? (b) : (a))
|
|
#define MIN |
( |
a, |
|
|
b |
|
) |
(((a)>(b)) ? (b) : (a))
|
|
#define NUM_MATL_PROPS 10
|
|
#define ReportStatus |
( |
context, |
|
|
frac |
|
) |
|
|
|
Value: if ((context)->status_func != NULL) \
(context)->status_func(frac, (context)->client_data)
Definition at line 215 of file vp_global.h. |
#define ShortField |
( |
voxel, |
|
|
offset |
|
) |
|
|
|
Value: (*((unsigned short *)((char *)(voxel)+\
(offset))))
Definition at line 221 of file vp_global.h. |
#define STORE_HIRES_TIME |
( |
vpc, |
|
|
code, |
|
|
t0, |
|
|
t1 |
|
) |
|
|
#define STORE_TIME |
( |
vpc, |
|
|
code, |
|
|
t0, |
|
|
t1 |
|
) |
|
|
#define VP_MAX_OCTREE_LEVELS 16
|
|
#define WARP_WEIGHT_ENTRIES (1 << WARP_WEIGHT_INDEX_BITS)
|
|
#define WARP_WEIGHT_INDEX_BITS 6
|
|
Typedef Documentation
Function Documentation
void VPComputeWarpTables ANSI_ARGS |
( |
(void) |
|
) |
|
|
void VPBug ANSI_ARGS |
( |
(char *fmt,...) |
|
) |
|
|
void VPLoadTranslation ANSI_ARGS |
( |
(vpMatrix4 m, double tx, double ty, double tz) |
|
) |
|
|
vpResult VPShadeBlock ANSI_ARGS |
( |
(vpContext *vpc, int x0, int y0, int z0, int x1, int y1, int z1, float *shd, int dst_xstride, int dst_ystride, int dst_zstride) |
|
) |
|
|
vpResult VPClassifyBlock ANSI_ARGS |
( |
(vpContext *vpc, int correct, int x0, int y0, int z0, int x1, int y1, int z1, float *opc, int dst_xstride, int dst_ystride, int dst_zstride) |
|
) |
|
|
double rint ANSI_ARGS |
( |
(double x) |
|
) |
|
|
|