/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_BLEND_API_H
#define _FORMZ_MODEL_BLEND_API_H

#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif




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

	fz_objt_blend_cnstr_opts_ptr


	Description
		Data structure to hold options for the construction of a blend object. 
		This type is used to pass additional construction options to the 
		function fz_objt_cnstr_blend. The individual fields of this type 
		can be accessed and set via fz_objt_cnstr_blend_opts_get and 
		fz_objt_cnstr_blend_opts_set.

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_blend, fz_objt_cnstr_blend_opts_get, fz_objt_cnstr_blend_opts_set

 ****************************************************************/
typedef struct	blend_cnstr_opts_td	*fz_objt_blend_cnstr_opts_ptr;

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

	fz_objt_blend_parm_enum


	Description
		Parameter identifiers for a Blend object. Used for the 
		"which" argument of fz_objt_cnstr_blend_opts_get and fz_objt_cnstr_blend_opts_set.

	Members
		FZ_OBJT_BLEND_PARM_MAKE_SOLID
			Construction and Editing - Make solid on/off.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_STITCH_BEG
			Construction and Editing - Stitch start on/off.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_STITCH_END
			Construction and Editing - Stitch end on/off.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_BULGE_TYPE_BEG
			Construction and Editing - Type of Bulge at start.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_BULGE_TYPE_END
			Construction and Editing - Type of Bulge at end.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_BULGE_VALUE_BEG
			Construction and Editing - Custom bulge factor at start 
			Type: double
			Default Value: 0.5
			Range: 0
		FZ_OBJT_BLEND_PARM_BULGE_VALUE_END
			Construction and Editing - Custom bulge factor at end 
			Type: double
			Default Value: 0.5
			Range: 0
		FZ_OBJT_BLEND_PARM_BEG_REVERSE
			Construction and Editing - Reverse the start direction on/off.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_BLEND_PARM_END_REVERSE
			Construction and Editing - Reverse the end direction on/off.
			Type: fzrt_boolean
			Default Value: FALSE

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_blend_opts_get, fz_objt_cnstr_blend_opts_set

 ****************************************************************/
typedef enum fz_objt_blend_parm_enum
{
	
	FZ_OBJT_BLEND_PARM_MAKE_SOLID = MODEL_PARM_CSED_START,
	FZ_OBJT_BLEND_PARM_STITCH_BEG,
	FZ_OBJT_BLEND_PARM_STITCH_END,
	FZ_OBJT_BLEND_PARM_BULGE_TYPE_BEG,
	FZ_OBJT_BLEND_PARM_BULGE_TYPE_END,
	FZ_OBJT_BLEND_PARM_BULGE_VALUE_BEG,
	FZ_OBJT_BLEND_PARM_BULGE_VALUE_END,
	FZ_OBJT_BLEND_PARM_BEG_REVERSE,
	FZ_OBJT_BLEND_PARM_END_REVERSE,
		
	MODEL_BLEND_PARM_MAX
	
} fz_objt_blend_parm_enum;


#define FZ_OBJT_BLEND_PARM__STITCH_BEG FZ_OBJT_BLEND_PARM_STITCH_BEG
#define FZ_OBJT_BLEND_PARM__STITCH_END FZ_OBJT_BLEND_PARM_STITCH_END

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

	fz_objt_cnstr_blend



	Description
		Creates a blended object from existing objects (source). 
		The source objects must be either surfaces or solids. 
		If the optional parameter blend_opts is not specified, 
		default Blend Construction Options are used.

	Parameters
		windex  [Input]
			project window index
		src_obj1  [Input]
			Source Object 1
		src_obj2  [Input]
			Source Object 2
		n_segs1  [Input]
			Number of segments for start section
		n_segs2  [Input]
			Number of segments for end section
		seg_indx  [Input]
			Array of segment indices
		blend_opts  [Input, Optional]
			Blend construction options- See fz_objt_blend_parm_enum for defaults
		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_blend.fsl

	See Also
		fz_objt_cnstr_blend_opts_init,fz_objt_cnstr_blend_opts_finit, 
		fz_objt_cnstr_blend_opts_set,fz_objt_cnstr_blend_opts_get,fz_objt_blend_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_blend_func)(
	fzrt_int 					windex,
	fz_objt_ptr			src_obj1,
	fz_objt_ptr			src_obj2,
	fzrt_int					n_segs1,
	fzrt_int					n_segs2,
	fzrt_int 					*seg_indx,
	fz_objt_blend_cnstr_opts_ptr 	blend_opts,
	fz_attr_refn_ptr		refn_opts,
	fz_objt_ptr			*obj
	);

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

	fz_objt_cnstr_blend_opts_init



	Description
		Allocates blend construction options and fills with defaults

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

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_blend_opts_finit,fz_objt_cnstr_blend_opts_set,fz_objt_cnstr_blend_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_blend_opts_init_func)(
	fzrt_int					windex,
	fz_objt_blend_cnstr_opts_ptr	*opts
	);

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

	fz_objt_cnstr_blend_opts_get



	Description
		Gets the value of a blend construction option. 
		See	fz_objt_blend_parm_enum for details.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			Blend 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_blend.fsl

	See Also
		fz_objt_cnstr_blend_opts_init,fz_objt_cnstr_blend_opts_finit,fz_objt_cnstr_blend_opts_set

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_blend_opts_get_func)(
	fzrt_int					windex,
	fz_objt_blend_cnstr_opts_ptr	opts,
	fz_objt_blend_parm_enum			which,
	fz_type_td				*data
	);

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

	fz_objt_cnstr_blend_opts_set



	Description
		Sets the value of a blend construction option. 
		See	fz_objt_blend_parm_enum for details.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			Blend 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_blend.fsl

	See Also
		fz_objt_cnstr_blend_opts_init,fz_objt_cnstr_blend_opts_finit,fz_objt_cnstr_blend_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_blend_opts_set_func)(
	fzrt_int					windex,
	fz_objt_blend_cnstr_opts_ptr	opts,
	fz_objt_blend_parm_enum			which,
	fz_type_td				*data
	);

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

	fz_objt_cnstr_blend_opts_finit



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

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

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_blend_opts_init,fz_objt_cnstr_blend_opts_set,fz_objt_cnstr_blend_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_blend_opts_finit_func)(
	fzrt_int					windex,
	fz_objt_blend_cnstr_opts_ptr	*opts
	);

#ifdef __cplusplus
}
#endif

#endif
