/*************************************************************************
	File:	pcld_prvt.h

	FormZ unstructured translator sample.  Imports and exports point cloud data.

	COPYRIGHT (C) 2001.  All Rights Reserved.
	auto*des*sys, Inc., Columbus, Ohio, USA.
*************************************************************************/


#ifndef __PCLD_FMT_PRVT_H
#define __PCLD_FMT_PRVT_H 1


#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>

#include "fzrt_api.h"
#include "fzpl_plugin.h"

#include "fz_api.h"
#include "fz_syst_api.h"
#include "fz_ffmt_api.h"
#include "fz_type_api.h"
#include "fz_iost_api.h"
#include "fz_fuim_api.h"
#include "fz_objt_api.h"
#include "fz_objt_attr_api.h"
#include "fz_rmtl_api.h"

#include "pcld_pblc.h"



/************************************************************************/
/*				Translator defines										*/
/************************************************************************/

/* Resource file string list ID's */
#define		PCLD_STRINGS			1
#define		PCLD_MESSAGES			2

/* Resource file string ID's */
#define		WRITING_PCLD_FILE		2
#define		PCLD_WRITE_ERR_STR		3
#define		PCLD_READ_ERR_STR		4
#define		PCLD_DESC_STR			5
#define		PCLD_NAME_STR			6
#define		PCLD_IMPT_OPTS_TITLE	7
#define		PCLD_EXPT_OPTS_TITLE	8
#define		PCLD_SCALE_STR			9

#define		PCLD_WRITE_ERR_ID		1
#define		PCLD_READ_ERR_ID		2
#define		PCLD_MEM_ERR_ID			3
#define		PCLD_INVAL_ERR_ID		4



/************************************************************************/
/*				Translator data types									*/
/************************************************************************/







/************************************************************************/
/*				Plugin and function set stuff							*/
/************************************************************************/

	/* application provided function sets to hold on to */
extern const fzpl_fset_glue_fset	*_fset_glue;
extern fz_syst_fset					_syst_funcs;
extern fz_ffmt_fset					_ffmt_funcs;
extern fz_fuim_fset					_fuim_funcs;
extern fz_type_fset					_type_funcs;
extern fz_iost_fset					_iost_funcs;
extern fz_model_fset					_model_funcs;
extern fz_objt_attr_fset				_model_attr_funcs;
extern fz_rmtl_fset					_rmtl_funcs;
extern fz_fzrt_base_fset				_fzrt_base_funcs;
extern fz_fzrt_mem_fset				_fzrt_mem_funcs;
extern fz_fzrt_file_fset				_fzrt_file_funcs;
extern fz_fzrt_graf_fset				_fzrt_graf_funcs;

	/* plugin's runtime id */
extern fzrt_unsigned_int					_pcld_plugin_runtime_id;

	/* translator's format reference id */
extern fz_ffmt_ref_td					_pcld_ref;

	/* translator's resource file id */
extern fzrt_fzr_ref_td					_fz_rsrc_ref;
	
	/* export custom options */
extern double							_export_scale;

	/* import custom options */
extern double							_import_scale;





/************************************************************************/
/*							FUNCTION PROTOTYPES							*/
/************************************************************************/

/* Function prototypes for reading */
extern fzrt_error_td pcld_read(fzrt_int windex, fzrt_floc_ptr floc);

/* Function prototypes for writing */
extern fzrt_error_td pcld_write(fzrt_int windex, fzrt_floc_ptr floc);

/* Function prototypes for translator options */
extern fzrt_error_td pcld_opts_io(fz_iost_ptr iost, fz_iost_dir_td_enum dir, fzpl_vers_td * const version, fzrt_unsigned_int size);	/* TAH 10/11/02 */
extern fzrt_error_td pcld_read_opts_default(void);
extern fzrt_error_td pcld_read_opts(fz_fuim_tmpl_ptr fuim_tmpl);
extern fzrt_error_td pcld_write_opts_default(void);
extern fzrt_error_td pcld_write_opts(fz_fuim_tmpl_ptr fuim_tmpl);

/* Function prototypes for translator info */
extern fzrt_error_td pcld_get_name(char *fmt_name, fzrt_int fmt_name_max_len);
extern fzrt_error_td pcld_get_id(fzrt_UUID_td fmt_id);
extern fzrt_error_td pcld_get_info(
			char			*sortby,
			fzrt_int			sortby_max_len,
			char			*file_ext,
			fzrt_int			file_ext_max_len,
			char			*keywd,
			fzrt_int			keywd_max_len,
			fzrt_int			*attr_flags
			);
extern fzrt_error_td pcld_get_ftype(
			fzrt_ostype		*type,
			fzrt_ostype		*creator
			);
extern fzrt_error_td pcld_get_icon(
			fzrt_floc_ptr 			floc,				
			fzrt_int 					*hpos, 				
			fzrt_int 					*vpos, 				
			fzrt_floc_ptr 			floc_mask, 			
			fzrt_int 					*hpos_mask, 		
			fzrt_int 					*vpos_mask			
			);
extern fzrt_boolean 	pcld_error_str_func(fzrt_int err, char *str, short str_len);
extern fzrt_error_td pcld_type(fz_ffmt_basic_types_enum *type);


#endif /* __PCLD_FMT_PRVT_H */
