Defines | Functions | Variables
ivcon.cpp File Reference
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cstring>
Include dependency graph for ivcon.cpp:

Go to the source code of this file.

Defines

#define COLOR_MAX   1000
#define COR3_MAX   200000
#define DEG_TO_RAD   ( PI / 180.0 )
#define ERROR   1
#define FACE_MAX   200000
#define G1_SECTION_MODEL_QUADS   18
#define G1_SECTION_MODEL_TEXTURE_NAMES   19
#define G1_SECTION_MODEL_VERT_ANIMATION   20
#define GMOD_MAX_SECTIONS   32
#define GMOD_UNUSED_VERTEX   65535
#define LEVEL_MAX   10
#define LINE_MAX_LEN   256
#define LINES_MAX   100000
#define MATERIAL_MAX   100
#define ORDER_MAX   10
#define PI   3.141592653589793238462643
#define RAD_TO_DEG   ( 180.0 / PI )
#define TEXTURE_MAX   100

Functions

int ase_read (FILE *filein)
int ase_write (FILE *fileout)
int byu_read (FILE *filein)
int byu_write (FILE *fileout)
char ch_cap (char c)
bool ch_eqi (char c1, char c2)
int ch_index_last (char *string, char c)
bool ch_is_space (char c)
int ch_pad (int *char_index, int *null_index, char *s, int max_string)
char ch_read (FILE *filein)
int ch_to_digit (char c)
int ch_write (FILE *fileout, char c)
int command_line (char **argv)
void cor3_normal_set ()
void cor3_range ()
void data_check ()
void data_init ()
bool data_read ()
void data_report ()
int data_write ()
int dxf_read (FILE *filein)
int dxf_write (FILE *fileout)
int edge_count ()
void edge_null_delete ()
void face_area_set ()
void face_normal_ave ()
void face_null_delete ()
int face_print (int iface)
void face_reverse_order ()
int face_subset ()
void face_to_line ()
void face_to_vertex_material ()
char * file_ext (char *file_name)
float float_read (FILE *filein)
float float_reverse_bytes (float x)
int float_write (FILE *fileout, float float_val)
bool gmod_arch_check ()
int gmod_read (FILE *filein)
float gmod_read_float (FILE *filein)
unsigned short gmod_read_w16 (FILE *filein)
unsigned long gmod_read_w32 (FILE *filein)
int gmod_write (FILE *fileout)
void gmod_write_float (float Val, FILE *fileout)
void gmod_write_w16 (unsigned short Val, FILE *fileout)
void gmod_write_w32 (unsigned long Val, FILE *fileout)
void hello ()
void help ()
int hrc_read (FILE *filein)
int hrc_write (FILE *fileout)
int i4_max (int i1, int i2)
int i4_min (int i1, int i2)
int i4_modp (int i, int j)
int i4_wrap (int ival, int ilo, int ihi)
int i4vec_max (int n, int *a)
void init_program_data ()
int interact ()
int iv_read (FILE *filein)
int iv_write (FILE *fileout)
long int long_int_read (FILE *filein)
int long_int_write (FILE *fileout, long int int_val)
int main (int argc, char *argv[])
void news ()
void node_to_vertex_material ()
int obj_read (FILE *filein)
int obj_write (FILE *fileout)
int off_read (ifstream &file_in)
int off_write (FILE *fileout)
int pov_write (FILE *fileout)
int rcol_find (float a[][COR3_MAX], int m, int n, float r[])
float rgb_to_hue (float r, float g, float b)
bool s_eqi (char *string1, char *string2)
int s_len_trim (char *s)
int s_to_i4 (char *s, int *last, bool *error)
bool s_to_i4vec (char *s, int n, int ivec[])
float s_to_r4 (char *s, int *lchar, bool *error)
bool s_to_r4vec (char *s, int n, float rvec[])
short int short_int_read (FILE *filein)
int short_int_write (FILE *fileout, short int int_val)
int smf_read (FILE *filein)
int smf_write (FILE *fileout)
void sort_heap_external (int n, int *indx, int *i, int *j, int isgn)
int stla_read (FILE *filein)
int stla_write (FILE *fileout)
int stlb_read (FILE *filein)
int stlb_write (FILE *fileout)
void tds_pre_process ()
int tds_read (FILE *filein)
unsigned long int tds_read_ambient_section (FILE *filein)
unsigned long int tds_read_background_section (FILE *filein)
unsigned long int tds_read_boolean (unsigned char *boolean, FILE *filein)
unsigned long int tds_read_camera_section (FILE *filein)
unsigned long int tds_read_edit_section (FILE *filein, int *views_read)
unsigned long int tds_read_keyframe_objdes_section (FILE *filein)
unsigned long int tds_read_keyframe_section (FILE *filein, int *views_read)
unsigned long int tds_read_light_section (FILE *filein)
int tds_read_long_name (FILE *filein)
unsigned long int tds_read_matdef_section (FILE *filein)
unsigned long int tds_read_material_section (FILE *filein)
int tds_read_name (FILE *filein)
unsigned long int tds_read_obj_section (FILE *filein)
unsigned long int tds_read_object_section (FILE *filein)
unsigned long int tds_read_spot_section (FILE *filein)
unsigned long int tds_read_tex_verts_section (FILE *filein)
unsigned long int tds_read_texmap_section (FILE *filein)
unsigned long int tds_read_u_long_int (FILE *filein)
unsigned short int tds_read_u_short_int (FILE *filein)
unsigned long int tds_read_unknown_section (FILE *filein)
unsigned long int tds_read_view_section (FILE *filein, int *views_read)
unsigned long int tds_read_vp_section (FILE *filein, int *views_read)
int tds_write (FILE *fileout)
int tds_write_string (FILE *fileout, char *string)
int tds_write_u_short_int (FILE *fileout, unsigned short int int_val)
int tec_write (FILE *fileout)
void tmat_init (float a[4][4])
void tmat_mxm (float a[4][4], float b[4][4], float c[4][4])
void tmat_mxp (float a[4][4], float x[4], float y[4])
void tmat_mxp2 (float a[4][4], float x[][3], float y[][3], int n)
void tmat_mxv (float a[4][4], float x[4], float y[4])
void tmat_rot_axis (float a[4][4], float b[4][4], float angle, char axis)
void tmat_rot_vector (float a[4][4], float b[4][4], float angle, float v1, float v2, float v3)
void tmat_scale (float a[4][4], float b[4][4], float sx, float sy, float sz)
void tmat_shear (float a[4][4], float b[4][4], char *axis, float s)
void tmat_trans (float a[4][4], float b[4][4], float x, float y, float z)
int tria_read (FILE *filein)
int tria_write (FILE *fileout)
int trib_read (FILE *filein)
int trib_write (FILE *fileout)
int txt_write (FILE *fileout)
int ucd_write (FILE *fileout)
void vertex_normal_set ()
void vertex_to_face_material ()
void vertex_to_node_material ()
int vla_read (FILE *filein)
int vla_write (FILE *fileout)
int wrl_write (FILE *filout)
int xgl_write (FILE *fileout)

Variables

char anim_name [LINE_MAX_LEN]
float background_rgb [3]
int bad_num
bool byte_swap
int bytes_num
int color_num
int comment_num
float cor3 [3][COR3_MAX]
int cor3_material [COR3_MAX]
float cor3_normal [3][COR3_MAX]
int cor3_num
float cor3_tex_uv [3][COR3_MAX]
bool debug
int dup_num
int face [ORDER_MAX][FACE_MAX]
float face_area [FACE_MAX]
int face_flags [FACE_MAX]
int face_material [FACE_MAX]
float face_normal [3][FACE_MAX]
int face_num
int face_object [FACE_MAX]
int face_order [FACE_MAX]
int face_smooth [FACE_MAX]
float face_tex_uv [2][FACE_MAX]
char filein_name [81]
char fileout_name [81]
int group_num
int i
char input [LINE_MAX_LEN]
int k
char level_name [LEVEL_MAX][LINE_MAX_LEN]
int line_dex [LINES_MAX]
int line_material [LINES_MAX]
int line_num
int line_prune
int list [COR3_MAX]
char mat_name [81]
char material_binding [80]
char material_name [MATERIAL_MAX][LINE_MAX_LEN]
int material_num
float material_rgba [4][MATERIAL_MAX]
int max_order2
char normal_binding [80]
float normal_temp [3][ORDER_MAX *FACE_MAX]
char object_name [81]
int object_num
float origin [3]
float pivot [3]
float rgbcolor [3][COLOR_MAX]
char temp_name [81]
int text_num
char texture_binding [80]
char texture_name [TEXTURE_MAX][LINE_MAX_LEN]
int texture_num
float texture_temp [2][ORDER_MAX *FACE_MAX]
float transform_matrix [4][4]
int vertex_material [ORDER_MAX][FACE_MAX]
float vertex_normal [3][ORDER_MAX][FACE_MAX]
float vertex_rgb [3][ORDER_MAX][FACE_MAX]
float vertex_tex_uv [2][ORDER_MAX][FACE_MAX]

Define Documentation

#define COLOR_MAX   1000

Definition at line 128 of file ivcon.cpp.

#define COR3_MAX   200000

Definition at line 129 of file ivcon.cpp.

#define DEG_TO_RAD   ( PI / 180.0 )

Definition at line 52 of file ivcon.cpp.

#define ERROR   1

Definition at line 44 of file ivcon.cpp.

#define FACE_MAX   200000

Definition at line 130 of file ivcon.cpp.

#define G1_SECTION_MODEL_QUADS   18

Definition at line 45 of file ivcon.cpp.

Definition at line 46 of file ivcon.cpp.

Definition at line 47 of file ivcon.cpp.

#define GMOD_MAX_SECTIONS   32

Definition at line 48 of file ivcon.cpp.

#define GMOD_UNUSED_VERTEX   65535

Definition at line 49 of file ivcon.cpp.

#define LEVEL_MAX   10

Definition at line 132 of file ivcon.cpp.

#define LINE_MAX_LEN   256

Definition at line 131 of file ivcon.cpp.

#define LINES_MAX   100000

Definition at line 133 of file ivcon.cpp.

#define MATERIAL_MAX   100

Definition at line 134 of file ivcon.cpp.

#define ORDER_MAX   10

Definition at line 135 of file ivcon.cpp.

#define PI   3.141592653589793238462643

Definition at line 50 of file ivcon.cpp.

#define RAD_TO_DEG   ( 180.0 / PI )

Definition at line 53 of file ivcon.cpp.

#define TEXTURE_MAX   100

Definition at line 136 of file ivcon.cpp.


Function Documentation

int ase_read ( FILE *  filein)
int ase_write ( FILE *  fileout)
int byu_read ( FILE *  filein)
int byu_write ( FILE *  fileout)
char ch_cap ( char  c)

Definition at line 1709 of file ivcon.cpp.

bool ch_eqi ( char  c1,
char  c2 
)

Definition at line 1749 of file ivcon.cpp.

int ch_index_last ( char *  string,
char  c 
)

Definition at line 1790 of file ivcon.cpp.

bool ch_is_space ( char  c)

Definition at line 1841 of file ivcon.cpp.

int ch_pad ( int *  char_index,
int *  null_index,
char *  s,
int  max_string 
)

Definition at line 1904 of file ivcon.cpp.

char ch_read ( FILE *  filein)

Definition at line 1969 of file ivcon.cpp.

int ch_to_digit ( char  c)

Definition at line 1998 of file ivcon.cpp.

int ch_write ( FILE *  fileout,
char  c 
)

Definition at line 2056 of file ivcon.cpp.

int command_line ( char **  argv)
void cor3_normal_set ( void  )
void cor3_range ( void  )
void data_check ( void  )
void data_init ( void  )
bool data_read ( void  )
void data_report ( void  )
int data_write ( void  )
int dxf_read ( FILE *  filein)
int dxf_write ( FILE *  fileout)
int edge_count ( )

Definition at line 3835 of file ivcon.cpp.

void edge_null_delete ( void  )
void face_area_set ( void  )
void face_normal_ave ( void  )
void face_null_delete ( void  )
int face_print ( int  iface)
void face_reverse_order ( void  )
int face_subset ( void  )
void face_to_line ( void  )
void face_to_vertex_material ( void  )
char* file_ext ( char *  file_name)
float float_read ( FILE *  filein)
float float_reverse_bytes ( float  x)
int float_write ( FILE *  fileout,
float  float_val 
)
bool gmod_arch_check ( void  )
int gmod_read ( FILE *  filein)
float gmod_read_float ( FILE *  filein)
unsigned short gmod_read_w16 ( FILE *  filein)
unsigned long gmod_read_w32 ( FILE *  filein)
int gmod_write ( FILE *  fileout)
void gmod_write_float ( float  Val,
FILE *  fileout 
)
void gmod_write_w16 ( unsigned short  Val,
FILE *  fileout 
)
void gmod_write_w32 ( unsigned long  Val,
FILE *  fileout 
)
void hello ( void  )
void help ( void  )
int hrc_read ( FILE *  filein)
int hrc_write ( FILE *  fileout)
int i4_max ( int  i1,
int  i2 
)

Definition at line 7515 of file ivcon.cpp.

int i4_min ( int  i1,
int  i2 
)

Definition at line 7554 of file ivcon.cpp.

int i4_modp ( int  i,
int  j 
)

Definition at line 7593 of file ivcon.cpp.

int i4_wrap ( int  ival,
int  ilo,
int  ihi 
)

Definition at line 7670 of file ivcon.cpp.

int i4vec_max ( int  n,
int *  a 
)

Definition at line 10356 of file ivcon.cpp.

void init_program_data ( void  )
int interact ( void  )
int iv_read ( FILE *  filein)
int iv_write ( FILE *  fileout)
long int long_int_read ( FILE *  filein)
int long_int_write ( FILE *  fileout,
long int  int_val 
)
int main ( int  argc,
char *  argv[] 
)

Definition at line 363 of file ivcon.cpp.

void news ( void  )
void node_to_vertex_material ( void  )
int obj_read ( FILE *  filein)
int obj_write ( FILE *  fileout)
int off_read ( ifstream &  file_in)

Definition at line 11357 of file ivcon.cpp.

int off_write ( FILE *  fileout)

Definition at line 11598 of file ivcon.cpp.

int pov_write ( FILE *  fileout)
int rcol_find ( float  a[][COR3_MAX],
int  m,
int  n,
float  r[] 
)
float rgb_to_hue ( float  r,
float  g,
float  b 
)
bool s_eqi ( char *  string1,
char *  string2 
)

Definition at line 12106 of file ivcon.cpp.

int s_len_trim ( char *  s)

Definition at line 12183 of file ivcon.cpp.

int s_to_i4 ( char *  s,
int *  last,
bool *  error 
)

Definition at line 12231 of file ivcon.cpp.

bool s_to_i4vec ( char *  s,
int  n,
int  ivec[] 
)

Definition at line 12363 of file ivcon.cpp.

float s_to_r4 ( char *  s,
int *  lchar,
bool *  error 
)

Definition at line 12420 of file ivcon.cpp.

bool s_to_r4vec ( char *  s,
int  n,
float  rvec[] 
)

Definition at line 12737 of file ivcon.cpp.

short int short_int_read ( FILE *  filein)
int short_int_write ( FILE *  fileout,
short int  int_val 
)
int smf_read ( FILE *  filein)
int smf_write ( FILE *  fileout)
void sort_heap_external ( int  n,
int *  indx,
int *  i,
int *  j,
int  isgn 
)

Definition at line 13714 of file ivcon.cpp.

int stla_read ( FILE *  filein)
int stla_write ( FILE *  fileout)
int stlb_read ( FILE *  filein)
int stlb_write ( FILE *  fileout)
void tds_pre_process ( void  )
int tds_read ( FILE *  filein)
unsigned long int tds_read_ambient_section ( FILE *  filein)
unsigned long int tds_read_background_section ( FILE *  filein)
unsigned long int tds_read_boolean ( unsigned char *  boolean,
FILE *  filein 
)
unsigned long int tds_read_camera_section ( FILE *  filein)
unsigned long int tds_read_edit_section ( FILE *  filein,
int *  views_read 
)
unsigned long int tds_read_keyframe_objdes_section ( FILE *  filein)
unsigned long int tds_read_keyframe_section ( FILE *  filein,
int *  views_read 
)
unsigned long int tds_read_light_section ( FILE *  filein)
int tds_read_long_name ( FILE *  filein)
unsigned long int tds_read_matdef_section ( FILE *  filein)
unsigned long int tds_read_material_section ( FILE *  filein)
int tds_read_name ( FILE *  filein)
unsigned long int tds_read_obj_section ( FILE *  filein)
unsigned long int tds_read_object_section ( FILE *  filein)
unsigned long int tds_read_spot_section ( FILE *  filein)
unsigned long int tds_read_tex_verts_section ( FILE *  filein)
unsigned long int tds_read_texmap_section ( FILE *  filein)
unsigned long int tds_read_u_long_int ( FILE *  filein)
unsigned short int tds_read_u_short_int ( FILE *  filein)
unsigned long int tds_read_unknown_section ( FILE *  filein)
unsigned long int tds_read_view_section ( FILE *  filein,
int *  views_read 
)
unsigned long int tds_read_vp_section ( FILE *  filein,
int *  views_read 
)
int tds_write ( FILE *  fileout)
int tds_write_string ( FILE *  fileout,
char *  string 
)
int tds_write_u_short_int ( FILE *  fileout,
unsigned short int  int_val 
)
int tec_write ( FILE *  fileout)
void tmat_init ( float  a[4][4])
void tmat_mxm ( float  a[4][4],
float  b[4][4],
float  c[4][4] 
)
void tmat_mxp ( float  a[4][4],
float  x[4],
float  y[4] 
)
void tmat_mxp2 ( float  a[4][4],
float  x[][3],
float  y[][3],
int  n 
)
void tmat_mxv ( float  a[4][4],
float  x[4],
float  y[4] 
)
void tmat_rot_axis ( float  a[4][4],
float  b[4][4],
float  angle,
char  axis 
)
void tmat_rot_vector ( float  a[4][4],
float  b[4][4],
float  angle,
float  v1,
float  v2,
float  v3 
)
void tmat_scale ( float  a[4][4],
float  b[4][4],
float  sx,
float  sy,
float  sz 
)
void tmat_shear ( float  a[4][4],
float  b[4][4],
char *  axis,
float  s 
)
void tmat_trans ( float  a[4][4],
float  b[4][4],
float  x,
float  y,
float  z 
)
int tria_read ( FILE *  filein)
int tria_write ( FILE *  fileout)
int trib_read ( FILE *  filein)
int trib_write ( FILE *  fileout)
int txt_write ( FILE *  fileout)
int ucd_write ( FILE *  fileout)
void vertex_normal_set ( void  )
void vertex_to_face_material ( void  )
void vertex_to_node_material ( void  )
int vla_read ( FILE *  filein)
int vla_write ( FILE *  fileout)
int wrl_write ( FILE *  filout)
int xgl_write ( FILE *  fileout)

Variable Documentation

Definition at line 138 of file ivcon.cpp.

float background_rgb[3]

Definition at line 139 of file ivcon.cpp.

int bad_num

Definition at line 140 of file ivcon.cpp.

bool byte_swap

Definition at line 141 of file ivcon.cpp.

int bytes_num

Definition at line 142 of file ivcon.cpp.

int color_num

Definition at line 143 of file ivcon.cpp.

Definition at line 144 of file ivcon.cpp.

float cor3[3][COR3_MAX]

Definition at line 146 of file ivcon.cpp.

Definition at line 147 of file ivcon.cpp.

float cor3_normal[3][COR3_MAX]

Definition at line 148 of file ivcon.cpp.

int cor3_num

Definition at line 149 of file ivcon.cpp.

float cor3_tex_uv[3][COR3_MAX]

Definition at line 150 of file ivcon.cpp.

bool debug

Definition at line 152 of file ivcon.cpp.

int dup_num

Definition at line 154 of file ivcon.cpp.

Definition at line 156 of file ivcon.cpp.

Definition at line 157 of file ivcon.cpp.

Definition at line 158 of file ivcon.cpp.

Definition at line 159 of file ivcon.cpp.

float face_normal[3][FACE_MAX]

Definition at line 160 of file ivcon.cpp.

int face_num

Definition at line 161 of file ivcon.cpp.

Definition at line 162 of file ivcon.cpp.

Definition at line 163 of file ivcon.cpp.

Definition at line 164 of file ivcon.cpp.

float face_tex_uv[2][FACE_MAX]

Definition at line 165 of file ivcon.cpp.

char filein_name[81]

Definition at line 167 of file ivcon.cpp.

char fileout_name[81]

Definition at line 168 of file ivcon.cpp.

int group_num

Definition at line 170 of file ivcon.cpp.

int i

Definition at line 172 of file ivcon.cpp.

Definition at line 173 of file ivcon.cpp.

int k

Definition at line 174 of file ivcon.cpp.

Definition at line 175 of file ivcon.cpp.

Definition at line 177 of file ivcon.cpp.

Definition at line 178 of file ivcon.cpp.

int line_num

Definition at line 179 of file ivcon.cpp.

Definition at line 180 of file ivcon.cpp.

int list[COR3_MAX]

Definition at line 182 of file ivcon.cpp.

char mat_name[81]

Definition at line 189 of file ivcon.cpp.

char material_binding[80]

Definition at line 184 of file ivcon.cpp.

Definition at line 185 of file ivcon.cpp.

Definition at line 186 of file ivcon.cpp.

Definition at line 187 of file ivcon.cpp.

Definition at line 190 of file ivcon.cpp.

char normal_binding[80]

Definition at line 192 of file ivcon.cpp.

Definition at line 193 of file ivcon.cpp.

char object_name[81]

Definition at line 195 of file ivcon.cpp.

Definition at line 196 of file ivcon.cpp.

float origin[3]

Definition at line 198 of file ivcon.cpp.

float pivot[3]

Definition at line 199 of file ivcon.cpp.

float rgbcolor[3][COLOR_MAX]

Definition at line 200 of file ivcon.cpp.

char temp_name[81]

Definition at line 201 of file ivcon.cpp.

int text_num

Definition at line 203 of file ivcon.cpp.

char texture_binding[80]

Definition at line 205 of file ivcon.cpp.

Definition at line 206 of file ivcon.cpp.

Definition at line 207 of file ivcon.cpp.

Definition at line 208 of file ivcon.cpp.

float transform_matrix[4][4]

Definition at line 210 of file ivcon.cpp.

Definition at line 212 of file ivcon.cpp.

Definition at line 213 of file ivcon.cpp.

Definition at line 214 of file ivcon.cpp.

Definition at line 215 of file ivcon.cpp.



ivcon
Author(s): John Burkardt
autogenerated on Thu Feb 11 2016 23:11:45