/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   Copyright 1989-2018 by AutoDesSys, Inc.                                                 *
 *                                                                                           *
 *   This software and its associated documentation contains proprietary,                    *
 *   confidential, and trade secret information of AutoDesSys Inc. and may not be            *
 *   disclosed, copied in any form, or used for any purpose except as specifically           *
 *   permitted in writing by AutoDesSys, Inc.                                                *
 *                                                                                           *
 *   AutoDesSys, Inc. grants permission to use the software to those who purchase            *
 *   a license.  Such a usage will be made according to the terms and conditions             *
 *   specified in the license agreement to which a licensee agrees before installing         *
 *   and commencing usage of the software.  The license agreement can be found               *
 *   on the envelop that contains the software CD.                                           *
 *                                                                                           *
 *   AutoDesSys, Inc. also grants permission to licensees to develop extensions to           *
 *   the software, which can be in the form of scripts or plugins.  The permission           *
 *   includes calling the API and call back functions provided by AutoDesSys, Inc.           *
 *   and accessing information relevant to these functions and the general workings          *
 *   of form.Z, but only up to the point to which AutoDesSys, Inc. has chosen to             *
 *   expose, through its form.Z SDK Manual.  All extensions developed by third               *
 *   parties will include a copy of this copyright note in an easily accessible place or     *
 *   a clear instruction to read this original note by AutoDesSys, Inc.                      *
 *                                                                                           *
 *   All the software distributed under a license, either for the purpose of using it or     *
 *   for the purpose of developing extensions, is distributed AS IS, WITHOUT                 *
 *   WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND                                    *
 *   AutoDesSys, Inc. HEREBY DISCLAIMS ALL SUCH WARRANTIES,                                  *
 *   INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF                                         *
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.                                    *
 *                                                                                           *
 *   formZ, RenderZone, and RadioZity are registered trademarks of AutoDesSys, Inc.          *
 *                                                                                           *
 *   form.Z SDK, Version 8.6.3, Dec 03, 2018                                                 *
 *                                                                                           *
 *                                                                                           *
 *********************************************************************************************/


#ifndef _FORMZ_MODEL_LOFT_API_H
#define _FORMZ_MODEL_LOFT_API_H


#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif



/****************************************************************

	Loft


	Description
		formZ Model Loft objects. This module contains functions to construct and edit 
		Loft objects.
 ****************************************************************/

/****************************************************************

	FZ_OBJT_TYPE_LOFT


	Description
		Unique identifier for the loft object type.
 ****************************************************************/

#define FZ_OBJT_TYPE_LOFT		"\xb5\x08\x79\x0b\x27\xcc\x40\x94\xa7\x4c\x70\x32\xbf\x5c\x18\xbb"

/****************************************************************

	fz_objt_loft_cnstr_opts_ptr


	Description
		Data structure to hold options for the construction of a loft object. 
		This type is used to pass additional construction options to the 
		function fz_objt_cnstr_loft. The individual fields of this type 
		can be accessed and set via fz_objt_cnstr_loft_opts_get and 
		fz_objt_cnstr_loft_opts_set.

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_loft,fz_objt_cnstr_loft_opts_get,fz_objt_cnstr_loft_opts_set

 ****************************************************************/
typedef struct	loft_cnstr_opts_td	*fz_objt_loft_cnstr_opts_ptr;

/****************************************************************

	fz_objt_loft_parm_enum


	Description
		Parameter identifiers for a parametric Loft object. Used for the 
		"which" argument of fz_objt_edit_loft_parm_get, fz_objt_edit_loft_parm_set, 
		fz_objt_cnstr_loft_opts_get and fz_objt_cnstr_loft_opts_set.

	Members
		FZ_OBJT_LOFT_PARM_MAKE_SOLID
			Construction and Editing - Make solid on/off.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_LOFT_PARM_SURFACE
			Construction and Editing - Type of surface parameterization on/off.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_LOFT_PARM_DIRECTION_TYPE
			Construction and Editing - Direction type.
			Type: fzrt_int
			Range: 0
		FZ_OBJT_LOFT_PARM_DIRECTION_REVERSE
			Construction and Editing - Reverse the direction on/off.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_LOFT_PARM_BULGE_TYPE
			Construction and Editing - Type of Bulge.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_LOFT_PARM_BULGE_CUSTOM_VALUE
			Construction and Editing - Custom bulge factor 
			Type: double
			Default Value: 0.5
			Range: 0

	Availability	5.0.0.0


	See Also
		fz_objt_edit_loft_parm_get,fz_objt_edit_loft_parm_set, 
		fz_objt_cnstr_loft_opts_get,fz_objt_cnstr_loft_opts_set

 ****************************************************************/
typedef enum fz_objt_loft_parm_enum
{
	
	FZ_OBJT_LOFT_PARM_MAKE_SOLID = MODEL_PARM_CSED_START,
	FZ_OBJT_LOFT_PARM_SURFACE,
	FZ_OBJT_LOFT_PARM_DIRECTION_TYPE,
	FZ_OBJT_LOFT_PARM_DIRECTION_REVERSE,
	FZ_OBJT_LOFT_PARM_BULGE_TYPE,
	FZ_OBJT_LOFT_PARM_BULGE_CUSTOM_VALUE,
	
	MODEL_LOFT_PARM_MAX
	
} fz_objt_loft_parm_enum;

/****************************************************************

	fz_objt_cnstr_loft



	Description
		Creates a lofted object from existing objects (source). 
		If the optional parameter loft_opts is not specified, 
		default Loft Construction Options are used. See fz_objt_loft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			Array of source objects
		num_src  [Input]
			Number of source objects
		seg_indx  [Input]
			Array of segment indices
		n_coeds  [Input]
			Array of number of segments
		tvecs  [Input]
			Array of custom direction vectors
		tmags  [Input]
			Array of custom bulge factors
		tcust  [Input]
			Array of bulge types
		tdirs  [Input]
			Array of direction reverse flags
		topts  [Input]
			Array of bulge direction types
		loft_opts  [Input, Optional]
			Construction options
		refn_opts  [Input, Optional]
			Display resolution options 
			See fz_attr_refn_parm_enum for defaults
		obj  [Result]
			New object

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_cnstr_loft_opts_finit,fz_objt_cnstr_loft_opts_finit, 
		fz_objt_cnstr_loft_opts_set,fz_objt_cnstr_loft_opts_get,fz_objt_loft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_loft_func)(
	fzrt_int 					windex,
	fz_objt_ptr			*src_obj,
	fzrt_int 					num_src,
	fzrt_int 					*seg_indx,
	fzrt_int					*n_coeds,
	fz_xyz_td					*tvecs,
	double					*tmags,
	fzrt_boolean			*tcust,
	fzrt_boolean			*tdirs,
	fzrt_int					*topts,
	fz_objt_loft_cnstr_opts_ptr		loft_opts,
	fz_attr_refn_ptr		refn_opts,
	fz_objt_ptr			*obj
	);

/****************************************************************

	fz_objt_cnstr_loft_opts_init



	Description
		Allocates loft construction options and fills with defaults

	Parameters
		windex  [Input]
			project window index
		opts  [Result]
			Loft construction options

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_cnstr_loft_opts_finit,fz_objt_cnstr_loft_opts_set,fz_objt_cnstr_loft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_loft_opts_init_func)(
	fzrt_int				windex,
	fz_objt_loft_cnstr_opts_ptr	*opts
	);

/****************************************************************

	fz_objt_cnstr_loft_opts_get



	Description
		Gets the value of a loft construction option. Note that 
		only those values in fz_objt_loft_parm_enum are accepted 
		which are tagged for the construction options. See 
		fz_objt_loft_parm_enum for details.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			Loft construction options
		which  [Input]
			Parameter id
		data  [Result]
			Parameter data

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_cnstr_loft_opts_init,fz_objt_cnstr_loft_opts_finit,fz_objt_cnstr_loft_opts_set

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_loft_opts_get_func)(
	fzrt_int				windex,
	fz_objt_loft_cnstr_opts_ptr	opts,
	fz_objt_loft_parm_enum		which,
	fz_type_td			*data
	);

/****************************************************************

	fz_objt_cnstr_loft_opts_set



	Description
		Sets the value of a loft construction option. Note that 
		only those values in fz_objt_loft_parm_enum are accepted 
		which are tagged for the construction options. See 
		fz_objt_loft_parm_enum for details.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			Loft construction options
		which  [Input]
			Parameter id
		data  [Input]
			Parameter data

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_cnstr_loft_opts_init,fz_objt_cnstr_loft_opts_finit,fz_objt_cnstr_loft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_loft_opts_set_func)(
	fzrt_int				windex,
	fz_objt_loft_cnstr_opts_ptr	opts,
	fz_objt_loft_parm_enum		which,
	fz_type_td			*data
	);

/****************************************************************

	fz_objt_cnstr_loft_opts_finit



	Description
		Frees loft object construction options. The opts pointer 
		is deallocated and returned back as NULL.

	Parameters
		windex  [Input]
			project window index
		opts  [Input, Result]
			Loft construction options

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_cnstr_loft_opts_init,fz_objt_cnstr_loft_opts_set,fz_objt_cnstr_loft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_loft_opts_finit_func)(
	fzrt_int				windex,
	fz_objt_loft_cnstr_opts_ptr	*opts
	);

/****************************************************************

	fz_objt_edit_loft_parm_get



	Description
		Gets a parameter of a lofted object.

	Parameters
		windex  [Input]
			project window index
		obj  [Input]
			Source Object
		which  [Input]
			Parameter id (see fz_objt_loft_parm_enum)
		data  [Result]
			Parameter data

	Returns
		Error codes 
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a lofted object


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_edit_loft_parm_set,fz_objt_cnstr_loft,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_loft_parm_get_func) (
	fzrt_int					windex,
	fz_objt_ptr			obj,
	fz_objt_loft_parm_enum	which,
	fz_type_td				*data
	);

/****************************************************************

	fz_objt_edit_loft_parm_set



	Description
		Sets a parameter of a lofted object. Note that the shape of the 
		lofted object is not changed until the function fz_objt_edit_parm_regen 
		has been called.

	Parameters
		windex  [Input]
			project window index
		obj  [Input]
			Source Object
		which  [Input]
			Parameter id (see fz_objt_loft_parm_enum)
		data  [Input]
			Parameter data

	Returns
		Error codes 
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a lofted object


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_loft.fsl

	See Also
		fz_objt_edit_loft_parm_get,fz_objt_cnstr_loft,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_loft_parm_set_func) (
	fzrt_int					windex,
	fz_objt_ptr			obj,
	fz_objt_loft_parm_enum	which,
	fz_type_td				*data
	);

#ifdef __cplusplus
}
#endif

#endif
