/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_META_API_H
#define _FORMZ_MODEL_META_API_H


#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif



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

	Metaformz


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

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

	FZ_OBJT_TYPE_META


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

#define FZ_OBJT_TYPE_META		"\xb9\x8e\x71\xcb\xc5\x60\x4b\x45\xb5\x77\xff\x35\xd3\xb2\x39\x15"


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

	fz_objt_cnstr_meta_sphere



	Description
		Create a metaformz sphere object

	Parameters
		windex  [Input]
			project window index
		rx_ry_rz  [Input]
			radius x, radius y, radius z
			Range: (0.0, 0.0, 0.0)
		weight  [Input]
			weight
			Range: -5
		origin  [Input, Optional]
			origin of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		rotation  [Input, Optional]
			rotation of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		obj  [Result]
			metaformz object

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_meta_ellipsoid,fz_objt_cnstr_meta_stretched_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_meta_sphere_func) (
	fzrt_int 				windex,
	fz_xyz_td				*rx_ry_rz,
	double				weight,
	fz_xyz_td				*origin,
	fz_xyz_td				*rotation,
	fz_objt_ptr		*obj
	);

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

	fz_objt_cnstr_meta_ellipsoid



	Description
		Create a metaformz ellipse object

	Parameters
		windex  [Input]
			project window index
		rx_ry  [Input]
			radius x, radius y
			Range: (0.0, 0.0)
		weight  [Input]
			weight
			Range: -5
		origin  [Input, Optional]
			origin of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		rotation  [Input, Optional]
			rotation of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		obj  [Result]
			metaformz object

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_meta_sphere,fz_objt_cnstr_meta_stretched_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_meta_ellipsoid_func) (
	fzrt_int 				windex,
	fz_xy_td				*rx_ry,
	double				weight,
	fz_xyz_td				*origin,
	fz_xyz_td				*rotation,
	fz_objt_ptr		*obj
	);

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

	fz_objt_cnstr_meta_stretched_ellipsoid



	Description
		Create a metaformz stretched ellipse object

	Parameters
		windex  [Input]
			project window index
		rx_ry_rz  [Input]
			radius x, radius y, radius_z
			Range: (0.0, 0.0, 0.0)
		weight  [Input]
			weight
			Range: -5
		origin  [Input, Optional]
			origin of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		rotation  [Input, Optional]
			rotation of metaformz object
			Default Value: (0.0, 0.0, 0.0)
		obj  [Result]
			metaformz object

	Returns
		Error codes


	Availability	5.0.0.0

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

	See Also
		fz_objt_cnstr_meta_sphere,fz_objt_cnstr_meta_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_meta_stretched_ellipsoid_func) (
	fzrt_int 				windex,
	fz_xyz_td				*rx_ry_rz,
	double				weight,
	fz_xyz_td				*origin,
	fz_xyz_td				*rotation,
	fz_objt_ptr		*obj
	);

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

	fz_meta_operation_enum


	Description
		

	Members
		FZ_META_OPER_BLEND
			Per object. 
			The origin and axes are positioned according to the type of object.
		FZ_META_OPER_MAXIMIZE
			Center of gravity. 
			The origin of the axes is positioned at the exact center of the object (mass). 
			The axes are aligned to the active reference plane.

	Availability	8.6.0.0

 ****************************************************************/
typedef enum fz_meta_operation_enum
{	FZ_META_OPER_BLEND = 0,

	FZ_META_OPER_MAXIMIZE,



	FZ_META_OPER_MAX
} fz_meta_operation_enum;

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

	fz_meta_type_enum


	Description
		

	Members
		FZ_META_TYPE_NONE
			
		FZ_META_TYPE_SPHERE
			
		FZ_META_TYPE_SPHEROID
			
		FZ_META_TYPE_ELLIPSE
			
		FZ_META_TYPE_FELLIPSE
			
		FZ_META_TYPE_CONESPHERE
			
		FZ_META_TYPE_TUBE
			
		FZ_META_TYPE_SHEET
			
		FZ_META_TYPE_POLY
			
		FZ_META_TYPE_TORUS
			

	Availability	8.6.0.0

 ****************************************************************/
typedef enum fz_meta_type_enum
{
	FZ_META_TYPE_NONE		= 0,
	FZ_META_TYPE_SPHERE		= 0x0001,
	FZ_META_TYPE_SPHEROID	= 0x0002,
	FZ_META_TYPE_ELLIPSE	= 0x0004,
	FZ_META_TYPE_FELLIPSE	= 0x0008,
	FZ_META_TYPE_CONESPHERE	= 0x0010,
	FZ_META_TYPE_TUBE		= 0x0020,
	FZ_META_TYPE_SHEET		= 0x0040,
	FZ_META_TYPE_POLY		= 0x0080,
	FZ_META_TYPE_TORUS		= 0x0100,

	FZ_META_TYPE_MAX
} fz_meta_type_enum;
	
/****************************************************************

	fz_objt_make_metaform



	Description
		Creates and evaluates a meta group form a list of objects

	Parameters
		windex  [Input]
			project window index
		obj  [Input]
			object
		meta_type  [Input, Optional]
			type of meta to create
		radius  [Input, Optional]
			radius
		weight  [Input, Optional]
			weight

	Returns
		Error codes


	Availability	8.6.0.0


	See Also
		fz_objt_cnstr_meta_sphere,fz_objt_cnstr_meta_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_make_metaform_func) (
	fzrt_int					windex,
	fz_objt_ptr 				obj,
	fz_meta_type_enum			*meta_type,
	fz_xyz_td					*radius,
	double						*weight
);
	
	
/****************************************************************

	fz_objt_meta_create_group



	Description
		Creates and evaluates a meta group form a list of objects

	Parameters
		windex  [Input]
			project window index
		obj_list  [Input]
			object list
		parent  [Input]
			parent group (NULL for root)
		threshold_ptr  [Input, Optional]
			meta evaluation threshold
		operation_ptr  [Input, Optional]
			meta operation
		resolution_ptr  [Input, Optional]
			meta mesh resolution
		meta_grup  [Result, Optional]
			new meta group

	Returns
		Error codes


	Availability	8.6.0.0


	See Also
		fz_objt_cnstr_meta_sphere,fz_objt_cnstr_meta_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_meta_create_group_func) (
	fzrt_int					windex,
	fz_enty_list_ptr			obj_list,
	fz_grup_ptr					parent,
	float						*threshold_ptr,
	fz_meta_operation_enum		*operation_ptr,
	fz_xyz_float_td				*resolution_ptr,
	fz_grup_ptr					*meta_grup
);
	
/****************************************************************

	fz_objt_meta_evaluate_group



	Description
		Evaluates a meta group

	Parameters
		windex  [Input]
			project window index
		meta_grup  [Input]
			meta group
		threshold_ptr  [Input, Optional]
			new meta evaluation threshold
		operation_ptr  [Input, Optional]
			new meta operation
		resolution_ptr  [Input, Optional]
			new meta mesh resolution

	Returns
		Error codes


	Availability	8.6.0.0


	See Also
		fz_objt_cnstr_meta_sphere,fz_objt_cnstr_meta_ellipsoid

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_meta_evaluate_group_func) (
		fzrt_int				windex,
		fz_grup_ptr				meta_grup,
		float					*threshold_ptr,
		fz_meta_operation_enum	*operation_ptr,
		fz_xyz_float_td			*resolution_ptr
	);

#ifdef __cplusplus
}
#endif

#endif
