fdataloader.c File Reference

Handle the loading of data-files. More...

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "rendermodes.h"

Defines

#define NEW_OFFS
#define X
#define Y

Functions

void swap_BGR (rendersurf *data)
 Swap bytes (RGB->BGR).
void vel_to_img_space (void)
 Map the regular grid to a cartesian grid.
void loadDAT (char *filename)
 Load .dat-files.
 loadGRI (char *filename)
 Load .gri-files.
void build_hmap_cmap (int data_selector, uint32_t **hmap, uint32_t **cmap, uint32_t **cmap_3d)
 Build the "height- and colormap" from the given data. Also allocates the needed space in memory.
void init_color_palette (void)
 Initialize the color palette. Note that the colortable is not yet used in the current release.
void build_lower_mip (uint32_t *hdata, uint32_t **low_mip)
 Build mip-map-"hull". Hierarchical acceleration for 3D rendermode.
void draw_pencil_sketch (uint32_t *dst, int dst_w, int dst_h, vec4f *dir_data, float *len_data, int add_data_idx)
 Pencil-sketch Rendering. Use the current value (length, magnitude, ...) to select an appropriate sketch-texture.

Variables

int rotate


Detailed Description

Handle the loading of data-files.


Function Documentation

void build_hmap_cmap int  data_selector,
uint32_t **  hmap,
uint32_t **  cmap,
uint32_t **  cmap_3d
 

Build the "height- and colormap" from the given data. Also allocates the needed space in memory.

Parameters:
data_selector Choose between the velocity-flowdata and optionally included additional data (pressure, ...)
hmap Pointer to the memory location which is to store the heightmap.
cmap Pointer to the memory location which is to store the colormap.
cmap_3d Pointer to the memory location which is to store the colormap for 3D mode.

void build_lower_mip uint32_t *  hdata,
uint32_t **  low_mip
 

Build mip-map-"hull". Hierarchical acceleration for 3D rendermode.

Parameters:
hdata Pointer to the original heightmap.
low_mip Will store the "hull"-mipmap of the heightmap.

void draw_pencil_sketch uint32_t *  dst,
int  dst_w,
int  dst_h,
vec4f *  dir_data,
float *  len_data,
int  add_data_idx
 

Pencil-sketch Rendering. Use the current value (length, magnitude, ...) to select an appropriate sketch-texture.

Parameters:
dst Pointer to the blit-destination
dst_w The blit-destination's width
dst_h The blit-destination's height
dir_data Pointer to the velocity-vectors of the flow-field
len_data Pointer to alternative magnitude-scaling factor
add_data_idx Index of alternative magnitude-scaling factor

void loadDAT char *  filename  ) 
 

Load .dat-files.

Loads data-files.

Parameters:
filename File to load.

loadGRI char *  filename  ) 
 

Load .gri-files.

Load geometry-files

Parameters:
filename File to load.

void swap_BGR rendersurf *  data  ) 
 

Swap bytes (RGB->BGR).

Parameters:
data Pointer to rendersurf-struct which also has a pointer to the data which is to be swapped.


Generated on Mon Jan 22 17:35:12 2007 for PHFLOW - Flow Visualizer by  doxygen 1.4.6