/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_REVL_API_H
#define _FORMZ_MODEL_REVL_API_H

#ifdef __cplusplus
extern "C" {
#endif




#include "fz_model_core_api.h"




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

	FZ_OBJT_TYPE_REVOLVE


	Description
		Unique identifier for the revolved object type.
 ****************************************************************/
#define FZ_OBJT_TYPE_REVOLVE		"\xb7\x1e\xcd\xfd\xbf\x2e\x4e\xd8\xb0\xc4\x81\xcb\x2c\x7c\x81\xae"

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

	fz_objt_revolve_cnstr_opts_ptr


	Description
		data struction to hold options for the constructions of a revolved object. 
		This type is used to pass additional construction options to the 
		function fz_objt_cnstr_revolve. The individual fields of this type 
		can be accessed and set via fz_objt_cnstr_revolve_opts_get and 
		fz_objt_cnstr_revolve_opts_set.

	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_revolve, fz_objt_cnstr_revolve_opts_get, fz_objt_cnstr_revolve_opts_set

 ****************************************************************/
typedef struct	revl_cnstr_opts_td	*fz_objt_revolve_cnstr_opts_ptr;

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

	fz_objt_revolve_parm_enum


	Description
		Parameter identifiers for a parametric revolved object. Used for the 
		"which" argument of fz_objt_edit_revolve_parm_get, fz_objt_edit_revolve_parm_set, 
		fz_objt_cnstr_revolve_opts_get and fz_objt_cnstr_revolve_opts_set.

	Members
		FZ_OBJT_REVOLVE_PARM_CAP_START_ON
			Construction and Editing - Start cap on (TRUE) or off (FALSE).
			Type: fzrt_boolean
			Default Value: TRUE
		FZ_OBJT_REVOLVE_PARM_CAP_END_ON
			Construction and Editing - End cap on (TRUE) or off (FALSE).
			Type: fzrt_boolean
			Default Value: TRUE
		FZ_OBJT_REVOLVE_PARM_FACT_STEPS
			Construction and Editing - Number of steps for facetted objects.
			Type: fzrt_int
			Default Value: 16
			Range: 3
		FZ_OBJT_REVOLVE_PARM_FACT_REM_COPL_ON
			Construction and Editing - Remove coplanar faces on (TRUE) or off (FALSE) for facetted objects.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_REVOLVE_PARM_FACT_TRIANG_ON
			Construction and Editing - Triangulate on (TRUE) or off (FALSE) for facetted objects.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_REVOLVE_PARM_FACT_ADJ_ENDS_ON
			Construction and Editing - Adjust end on (TRUE) or off (FALSE) for facetted objects.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_OBJT_REVOLVE_PARM_NRBZ_DEG_U
			Construction and Editing - Length degree for smooth nurbz option.
			Type: fzrt_int
			Default Value: 2
			Range: 1
		FZ_OBJT_REVOLVE_PARM_MODEL_TYPE
			Editing - Model type.
			Type: fz_objt_model_type_enum
		FZ_OBJT_REVOLVE_PARM_SMOOTH_TYPE
			Editing - Smooth type.
			Type: fz_objt_smooth_type_enum
		FZ_OBJT_REVOLVE_PARM_AXIS_PNT1
			Editing - Axis point 1.
			Type: fz_xyz_td
		FZ_OBJT_REVOLVE_PARM_AXIS_PNT2
			Editing - Axis point 2.
			Type: fz_xyz_td
		FZ_OBJT_REVOLVE_PARM_ANGLE
			Construction and Editing - Angle of revolution. A zero angle is not allowed.
			Type: double
			Range: -2PI
		FZ_OBJT_REVOLVE_PARM_SRC_OBJ
			Editing - Revolve source object. 
			After creating a revolved object, the source object itself can be 
			replaced by passing in a new object using the fz_objt_edit_revolve_parm_set 
			api function. Note, that the same restrictions apply for this object 
			as for the one used to construct the revolved object initially. When getting 
			this parameter from an existing revolved object, a copy of the 
			source is made and passed back. It is the responsibility of the calling 
			function to delete this new object afterwards, using fz_objt_edit_delete_objt.
			Type: fz_objt_ptr
		FZ_OBJT_REVOLVE_PARM_CLOCKWISE
			Construction and Editing - Revolve direction clockwise on (TRUE) or off (FALSE).
			Type: fzrt_boolean
			Default Value: FALSE
			Availability: 5.5.0.0


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_revolve_opts_get, fz_objt_cnstr_revolve_opts_set, fz_objt_edit_revolve_parm_get,  
		fz_objt_edit_revolve_parm_set

 ****************************************************************/
typedef enum fz_objt_revolve_parm_enum
{
	
	FZ_OBJT_REVOLVE_PARM_CAP_START_ON = 0,
											
	FZ_OBJT_REVOLVE_PARM_CAP_END_ON,
											
	FZ_OBJT_REVOLVE_PARM_FACT_STEPS,
											
	FZ_OBJT_REVOLVE_PARM_FACT_REM_COPL_ON,
											
	FZ_OBJT_REVOLVE_PARM_FACT_TRIANG_ON,

	FZ_OBJT_REVOLVE_PARM_FACT_ADJ_ENDS_ON,

	FZ_OBJT_REVOLVE_PARM_NRBZ_DEG_U,

	
	
	FZ_OBJT_REVOLVE_PARM_MODEL_TYPE,
											
	FZ_OBJT_REVOLVE_PARM_SMOOTH_TYPE,
											
	FZ_OBJT_REVOLVE_PARM_AXIS_PNT1,
											
	FZ_OBJT_REVOLVE_PARM_AXIS_PNT2,

	FZ_OBJT_REVOLVE_PARM_ANGLE,
											
	FZ_OBJT_REVOLVE_PARM_SRC_OBJ,
	FZ_OBJT_REVOLVE_PARM_CLOCKWISE,
	FZ_OBJT_REVOLVE_PARM_MAX
	
} fz_objt_revolve_parm_enum;


#define FZ_OBJT_REVOLVE__PARM_MAX FZ_OBJT_REVOLVE_PARM_MAX


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

	fz_objt_cnstr_revolve_opts_init



	Description
		Allocates revolve construction options and fill with defaults

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

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_revolve_opts_finit,fz_objt_cnstr_revolve_opts_get,fz_objt_cnstr_revolve_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_revolve_opts_init_func) (
	fzrt_int				windex,
	fz_objt_revolve_cnstr_opts_ptr	*opts
	);

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

	fz_objt_cnstr_revolve_opts_get



	Description
		Gets the value of a revolved object's construction option. Note, that 
		only those values in fz_objt_revolve_parm_enum are accepted 
		which are tagged for the construction options. See 
		fz_objt_revolve_parm_enum for details.

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

	See Also
		fz_objt_cnstr_revolve_opts_init,fz_objt_cnstr_revolve_opts_finit,fz_objt_cnstr_revolve_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_revolve_opts_get_func) (
	fzrt_int					windex,
	fz_objt_revolve_cnstr_opts_ptr		opts,
	fz_objt_revolve_parm_enum	which,
	fz_type_td				*data
	);

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

	fz_objt_cnstr_revolve_opts_set



	Description
		Set the value of a revolved object's construction option. Note, that 
		only those values in fz_objt_revolve_parm_enum are accepted 
		which are tagged for the construction options. See 
		fz_objt_revolve_parm_enum for details.

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

	See Also
		fz_objt_cnstr_revolve_opts_init,fz_objt_cnstr_revolve_opts_finit,fz_objt_cnstr_revolve_opts_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_revolve_opts_set_func) (
	fzrt_int					windex,
	fz_objt_revolve_cnstr_opts_ptr		opts,
	fz_objt_revolve_parm_enum	which,
	fz_type_td				*data
	);

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

	fz_objt_cnstr_revolve_opts_finit



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

	Parameters
		windex  [Input]
			project window index
		opts  [Input, Result]
			options (will become NULL)

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_revolve_opts_init,fz_objt_cnstr_revolve_opts_get,fz_objt_cnstr_revolve_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_revolve_opts_finit_func) (
	fzrt_int				windex,
	fz_objt_revolve_cnstr_opts_ptr	*opts
	);

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

	fz_objt_cnstr_revolve



	Description
		Creates a revolved object from an existing object (source). The 
		source object must have a single face. It can be an open or 
		closed wire or a single face surface object.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		model_type  [Input]
			model type
		smooth_type  [Input]
			smooth type
		ax_p1  [Input]
			first point on axis of revolution
		ax_p2  [Input]
			second point on axis of revolution
		angle  [Input]
			revolution angle
			Range: -2PI
		revl_opts  [Input, Optional]
			construction options. For defaults see fz_objt_revolve_parm_enum
		refn_opts  [Input, Optional]
			display resolution options. For defaults see see fz_attr_refn_parm_enum
		obj  [Result]
			new object

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_edit_revolve_parm_set,fz_objt_edit_revolve_parm_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_revolve_func) (
	fzrt_int 					windex,
	fz_objt_ptr			src_obj,
	fz_objt_model_type_enum			model_type,
	fz_objt_smooth_type_enum	smooth_type,
	fz_xyz_td					*ax_p1,
	fz_xyz_td					*ax_p2,
	double					angle,
	fz_objt_revolve_cnstr_opts_ptr		revl_opts,
	fz_attr_refn_ptr		refn_opts,
	fz_objt_ptr			*obj
	);

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

	fz_objt_edit_revolve_parm_get



	Description
		Gets a parameter of a revolved object. When getting the 
		source using the FZ_OBJT_REVOLVE_PARM_SRC_OBJ parameter id, 
		fz_objt_edit_revolve_parm_get creates the object as a copy from 
		its internally stored source object. It is the responsibility 
		of the calling function to delete this object.

	Parameters
		windex  [Input]
			project window index
		obj  [Input]
			construction options
		which  [Input]
			parameter id
		data  [Result]
			parameter data

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


	Availability	5.0.0.0

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

	See Also
		fz_objt_edit_revolve_parm_set,fz_objt_cnstr_revolve,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_revolve_parm_get_func) (
	fzrt_int					windex,
	fz_objt_ptr			obj,
	fz_objt_revolve_parm_enum	which,
	fz_type_td				*data
	);

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

	fz_objt_edit_revolve_parm_set



	Description
		Sets a parameter of a revolved object. When setting a new 
		source or path object using the FZ_OBJT_REVOLVE_PARM_SRC_OBJ parameter id, 
		the calling code must create and delete this 
		object. model_edit_parm_parm_set() makes an internal copy.

		Note, that the shape of the revolved object is not changed until 
		the function fz_objt_edit_parm_regen has been called.

	Parameters
		windex  [Input]
			project window index
		obj  [Input]
			construction options
		which  [Input]
			parameter id
		data  [Input]
			parameter data

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


	Availability	5.0.0.0

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

	See Also
		fz_objt_edit_revolve_parm_get,fz_objt_cnstr_revolve,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_revolve_parm_set_func) (
	fzrt_int					windex,
	fz_objt_ptr			obj,
	fz_objt_revolve_parm_enum	which,
	fz_type_td				*data
	);

#ifdef __cplusplus
}
#endif


#endif
