/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_SLOFT_API_H
#define _FORMZ_MODEL_SLOFT_API_H


#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif



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

	Skinned Loft


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


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

	FZ_OBJT_TYPE_SLOFT


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

#define FZ_OBJT_TYPE_SLOFT	"\x3e\x18\xea\xf7\x61\x87\x4b\xc3\x93\xf4\x62\xb3\x49\x7f\x18\xf9"

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

	fz_objt_sloft_cnstr_opts_ptr


	Description
		Data structure to hold options for the construction of a S-loft object. 
		This type is used to pass additional construction options to the various 
		sloft construction functions. The individual fields of this type can be 
		accessed and set via fz_objt_cnstr_sloft_opts_get and fz_objt_cnstr_sloft_opts_set.

	Availability	6.0.0.0


	See Also
		fz_objt_cnstr_sloft_basic, fz_objt_cnstr_sloft_ruled, fz_objt_cnstr_sloft_normal, fz_objt_cnstr_sloft_path, 
		fz_objt_cnstr_sloft_branched ,fz_objt_cnstr_sloft_opts_get,fz_objt_cnstr_sloft_opts_set

 ****************************************************************/
typedef struct	sloft_cnstr_opts_td	*fz_objt_sloft_cnstr_opts_ptr;

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

	fz_objt_sloft_norm_enum


	Description
		Indicates the normal type of a parametric S-loft object. This enum 
		is used in the parameter FZ_OBJT_SLOFT_PARM_NORM_TYPE in the 
		functions fz_objt_edit_sloft_parm_get and fz_objt_cnstr_sloft_opts_set.

	Members
		FZ_OBJT_SLOFT_NORM_FIRST
			Use normal of first profile
		FZ_OBJT_SLOFT_NORM_LAST
			Use normal of last profile
		FZ_OBJT_SLOFT_NORM_FIRS_LAST
			Use normal of first & last profiles
		FZ_OBJT_SLOFT_NORM_ALL
			Use normal of all profiles

	Availability	5.5.0.0


	See Also
		fz_objt_edit_sloft_parm_get, fz_objt_cnstr_sloft_opts_set

 ****************************************************************/
typedef enum fz_objt_sloft_norm_enum
{
	FZ_OBJT_SLOFT_NORM_FIRST = 0,
	FZ_OBJT_SLOFT_NORM_LAST,
	FZ_OBJT_SLOFT_NORM_FIRS_LAST,
	FZ_OBJT_SLOFT_NORM_ALL,
	
} fz_objt_sloft_norm_enum;

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

	fz_objt_sloft_parm_enum


	Description
		Parameter identifiers for a parametric S-Loft object. Used for the 
		"which" argument of fz_objt_edit_sloft_parm_get, fz_objt_edit_sloft_parm_set, 
		fz_objt_cnstr_sloft_opts_get and fz_objt_cnstr_sloft_opts_set.

	Members
		FZ_OBJT_SLOFT_PARM_SURFACE
			Construction and Editing - Type of surface parameterization on/off.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_SLOFT_PARM_MAKE_SOLID
			Construction and Editing - Make solid on/off.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_SLOFT_PARM_CLOSED
			Construction and Editing - Closed.
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_SLOFT_PARM_PERIODIC
			Construction and Editing - Periodic (Applies only if Closed is ON).
			Type: fzrt_boolean
			Default Value: 0
		FZ_OBJT_SLOFT_PARM_MODEL_TYPE
			Editing - Model type.
			Type: fz_objt_model_type_enum

	Availability	6.0.0.0


	See Also
		fz_objt_edit_sloft_parm_get,fz_objt_edit_sloft_parm_set, 
		fz_objt_cnstr_sloft_opts_get,fz_objt_cnstr_sloft_opts_set

 ****************************************************************/
typedef enum fz_objt_sloft_parm_enum
{
	
	FZ_OBJT_SLOFT_PARM_SURFACE = MODEL_PARM_CSED_START,
	FZ_OBJT_SLOFT_PARM_MAKE_SOLID,
	FZ_OBJT_SLOFT_PARM_CLOSED,
	FZ_OBJT_SLOFT_PARM_PERIODIC,
	
	FZ_OBJT_SLOFT_PARM_MODEL_TYPE = MODEL_PARM_EDIT_START,
	FZ_OBJT_SLOFT_PARM_MAX
	
} fz_objt_sloft_parm_enum;

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

	fz_objt_cnstr_sloft_opts_init



	Description
		Allocates S-loft construction options and fills with defaults

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

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_opts_init_func)(
	fzrt_int							windex,
	fz_objt_sloft_cnstr_opts_ptr	*opts
	);

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

	fz_objt_cnstr_sloft_opts_get



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

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

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_init,fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_set

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_opts_get_func)(
	fzrt_int							windex,
	fz_objt_sloft_cnstr_opts_ptr	opts,
	fz_objt_sloft_parm_enum			which,
	fz_type_td						*data
	);

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

	fz_objt_cnstr_sloft_opts_set



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

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

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_init,fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_opts_set_func)(
	fzrt_int							windex,
	fz_objt_sloft_cnstr_opts_ptr	opts,
	fz_objt_sloft_parm_enum			which,
	fz_type_td						*data
	);

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

	fz_objt_cnstr_sloft_opts_finit



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

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

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_init,fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_opts_finit_func)(
	fzrt_int							windex,
	fz_objt_sloft_cnstr_opts_ptr	*opts
	);

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

	fz_objt_edit_sloft_parm_get



	Description
		Gets a parameter of a S-loft object.

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

	Returns
		Error codes 
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a S-loft object


	Availability	6.0.0.0

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

	See Also
		fz_objt_edit_sloft_parm_set,fz_objt_cnstr_sloft_basic, fz_objt_cnstr_sloft_ruled, 
		fz_objt_cnstr_sloft_normal, fz_objt_cnstr_sloft_path, fz_objt_cnstr_sloft_branched, fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_sloft_parm_get_func) (
	fzrt_int					windex,
	fz_objt_ptr				obj,
	fz_objt_sloft_parm_enum	which,
	fz_type_td				*data
	);

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

	fz_objt_edit_sloft_parm_set



	Description
		Sets a parameter of a S-loft object. Note that the shape of the 
		S-loft 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_sloft_parm_enum)
		data  [Input]
			Parameter data

	Returns
		Error codes 
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a S-loft object


	Availability	6.0.0.0

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

	See Also
		fz_objt_edit_sloft_parm_get,fz_objt_cnstr_sloft_basic, fz_objt_cnstr_sloft_ruled, 
		fz_objt_cnstr_sloft_normal, fz_objt_cnstr_sloft_path, fz_objt_cnstr_sloft_branched, fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_sloft_parm_set_func) (
	fzrt_int					windex,
	fz_objt_ptr				obj,
	fz_objt_sloft_parm_enum	which,
	fz_type_td				*data
	);
/****************************************************************

	fz_objt_cnstr_sloft_basic



	Description
		Creates a S-loft object from existing objects (source). 
		If the optional parameter sloft_opts is not specified, 
		default S-Loft Construction Options are used. See fz_objt_sloft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		num_src  [Input]
			Number of source objects
		src_obj  [Input]
			Array of source objects
		use_guides  [Input]
			Use Guide Curves - TRUE/FALSE
		num_guide  [Input]
			Number of Guide Curves
		guide_obj  [Input]
			Array of Guide Curve objects
		use_draft  [Input]
			Use Draft Angles - TRUE/FALSE
		beg_ang  [Input]
			Start Angle
		end_ang  [Input]
			End Angle
		sloft_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	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_finit, 
		fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get,fz_objt_sloft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_basic_func)(
	fzrt_int 							windex,
	fzrt_int 							num_src,
	fz_objt_ptr						*src_obj,
	fzrt_boolean					use_guides,
	fzrt_int 							num_guide,
	fz_objt_ptr						*guide_obj,
	fzrt_boolean					use_draft,
	double 							beg_ang,
	double 							end_ang,
	fz_objt_sloft_cnstr_opts_ptr	sloft_opts,
	fz_attr_refn_ptr				refn_opts,
	fz_objt_ptr						*obj
	);

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

	fz_objt_cnstr_sloft_ruled



	Description
		Creates a S-loft object from existing objects (source). 
		If the optional parameter sloft_opts is not specified, 
		default S-Loft Construction Options are used. See fz_objt_sloft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		num_src  [Input]
			Number of source objects
		src_obj  [Input]
			Array of source objects
		sloft_opts  [Input, Optional]
			Construction options
		refn_opts  [Input, Optional]
			Display resolution options
		obj  [Result]
			New object

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_finit, 
		fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get,fz_objt_sloft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_ruled_func)(
	fzrt_int 							windex,
	fzrt_int 							num_src,
	fz_objt_ptr						*src_obj,
	fz_objt_sloft_cnstr_opts_ptr	sloft_opts,
	fz_attr_refn_ptr				refn_opts,
	fz_objt_ptr						*obj
	);
/****************************************************************

	fz_objt_cnstr_sloft_normal



	Description
		Creates a S-loft object from existing objects (source). 
		If the optional parameter sloft_opts is not specified, 
		default S-Loft Construction Options are used. See fz_objt_sloft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		num_src  [Input]
			Number of source objects
		src_obj  [Input]
			Array of source objects
		normal_type  [Input]
			Normal Type
		sloft_opts  [Input, Optional]
			Construction options
		refn_opts  [Input, Optional]
			Display resolution options
		obj  [Result]
			New object

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_finit, 
		fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get,fz_objt_sloft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_normal_func)(
	fzrt_int 							windex,
	fzrt_int 							num_src,
	fz_objt_ptr						*src_obj,
	fz_objt_sloft_norm_enum			normal_type,
	fz_objt_sloft_cnstr_opts_ptr	sloft_opts,
	fz_attr_refn_ptr				refn_opts,
	fz_objt_ptr						*obj
	);
/****************************************************************

	fz_objt_cnstr_sloft_path



	Description
		Creates a S-loft object from existing objects (source). 
		If the optional parameter sloft_opts is not specified, 
		default S-Loft Construction Options are used. See fz_objt_sloft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		num_src  [Input]
			Number of source objects
		src_obj  [Input]
			Array of source objects
		path_obj  [Input]
			Path Object
		sloft_opts  [Input, Optional]
			Construction options
		refn_opts  [Input, Optional]
			Display resolution options
		obj  [Result]
			New object

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_finit, 
		fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get,fz_objt_sloft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_path_func)(
	fzrt_int 							windex,
	fzrt_int 							num_src,
	fz_objt_ptr						*src_obj,
	fz_objt_ptr						path_obj,
	fz_objt_sloft_cnstr_opts_ptr	sloft_opts,
	fz_attr_refn_ptr				refn_opts,
	fz_objt_ptr						*obj
	);
/****************************************************************

	fz_objt_cnstr_sloft_branched



	Description
		Creates a S-loft object from existing objects (source). 
		If the optional parameter sloft_opts is not specified, 
		default S-Loft Construction Options are used. See fz_objt_sloft_parm_enum.

	Parameters
		windex  [Input]
			project window index
		num_src  [Input]
			Number of source objects
		src_obj  [Input]
			Array of source objects
		num_branch  [Input]
			Number of Branches
		branch_cnt  [Input]
			Array of #objects for each Branch
		closed_obj  [Input]
			Last Object	for Closed Option
		sloft_opts  [Input, Optional]
			Construction options
		refn_opts  [Input, Optional]
			Display resolution options
		obj  [Result]
			New object

	Returns
		Error codes


	Availability	6.0.0.0

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

	See Also
		fz_objt_cnstr_sloft_opts_finit,fz_objt_cnstr_sloft_opts_finit, 
		fz_objt_cnstr_sloft_opts_set,fz_objt_cnstr_sloft_opts_get,fz_objt_sloft_parm_enum

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_sloft_branched_func)(
	fzrt_int 							windex,
	fzrt_int 							num_src,
	fz_objt_ptr						*src_obj,
	fzrt_int 							num_branch,
	fzrt_int							*branch_cnt,
	fz_objt_ptr						closed_obj,
	fz_objt_sloft_cnstr_opts_ptr	sloft_opts,
	fz_attr_refn_ptr				refn_opts,
	fz_objt_ptr						*obj
	);

#ifdef __cplusplus
}
#endif

#endif
