/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_POLY_API_H
#define _FORMZ_MODEL_POLY_API_H

#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif


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

	FZ_OBJT_TYPE_RECT


	Description
		Unique identifier for the rectangle object type.
 ****************************************************************/
#define FZ_OBJT_TYPE_RECT		"\xb8\x67\x83\x03\x9f\xee\x11\xda\x8e\x35\x00\x03\x93\x63\x5d\xbc"

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

	fz_objt_rect_parm_enum


	Description
		Parameter identifiers for a parametric Rectangle object. Used for the 
		"which" argument of fz_objt_cnstr_rect_opts_get,fz_objt_cnstr_rect_opts_set, 
		fz_objt_edit_rect_parm_get,fz_objt_edit_rect_parm_set

	Members
		FZ_OBJT_RECT_PARM_WIDTH
			Editing - Rectangle width.
			Type: double
			Range: 0.0
		FZ_OBJT_RECT_PARM_LENGTH
			Editing - Rectangle length.
			Type: double
			Range: 0.0
		FZ_OBJT_RECT_PARM_ORIGIN
			Editing - Rectangle origin.
			Type: fz_xyz_td
		FZ_OBJT_RECT_PARM_XAXIS
			Vector for the Xaxiz of the rectangle.
			Type: fz_xyz_td
		FZ_OBJT_RECT_PARM_YAXIS
			Vector for the Yaxis of the rectangle.
			Type: fz_xyz_td

	Availability	8.0.2.0


	See Also
		fz_objt_edit_rect_parm_get, fz_objt_edit_rect_parm_set

 ****************************************************************/
typedef enum fz_objt_rect_parm_enum
{
	
	FZ_OBJT_RECT_PARM_WIDTH = 0,
				
	FZ_OBJT_RECT_PARM_LENGTH,
				
	FZ_OBJT_RECT_PARM_ORIGIN,
											
	FZ_OBJT_RECT_PARM_XAXIS,
	
	FZ_OBJT_RECT_PARM_YAXIS,
	
	FZ_OBJT_RECT_PARM_MAX
	
} fz_objt_rect_parm_enum;

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

	fz_objt_cnstr_rect



	Description
		Creates a Rectangle primitive

	Parameters
		windex  [Input]
			project window index
		width  [Input]
			width of rectangle.
			Range: 0.0
		length  [Input]
			width of rectangle.
			Range: 0.0
		origin  [Input, Optional]
			origin
			Default Value: {0,0,0}
		xaxis  [Input, Optional]
			x axis of rectang;e
			Default Value: {1,0,0}
		yaxis  [Input, Optional]
			x axis of rectang;e
			Default Value: {0,1,0}
		obj  [Result]
			new object

	Returns
		Error codes


	Availability	8.0.2.0


	See Also
		fz_objt_edit_rect_parm_set,fz_objt_edit_rect_parm_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_rect_func) (
	fzrt_int 					windex,
	double						width,
	double						length,
	fz_xyz_td					*origin,
	fz_xyz_td					*xaxis,
	fz_xyz_td					*yaxis,
	fz_objt_ptr					*obj
	);

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

	fz_objt_edit_rect_parm_get



	Description
		Gets a parameter of a Rectangle.

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

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


	Availability	8.0.2.0

	Plugin Example
		double		width; 
		fz_type_td	data;

		fz_objt_edit_rect_parm_get(windex,obj,FZ_OBJT_RECT_PARM_WIDTH,&data); 
		fz_type_get_double(&width,&data);
	Script Example
		double		radius;

		fz_objt_edit_rect_parm_get(windex,obj,FZ_OBJT_RECT_PARM_WIDTH,radius); 

	See Also
		fz_objt_edit_rect_parm_set,fz_objt_cnstr_rect,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_rect_parm_get_func) (
	fzrt_int					windex,
	fz_objt_ptr				obj,
	fz_objt_rect_parm_enum	which,
	fz_type_td				*data
	);

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

	fz_objt_edit_rect_parm_set



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

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

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


	Availability	8.0.2.0

	Plugin Example
		double		radius; 
		fz_type_td	data;

		radius = 10.0;

		fz_type_set_double(&data,&radius); 
		fz_objt_edit_rect_parm_set(windex,obj,FZ_OBJT_RECT_PARM_WIDTH,&data); 
		fz_objt_edit_parm_regen(windex,obj);
	Script Example
		double		radius;

		radius = 10.0; 
		fz_objt_edit_rect_parm_set(windex,obj,FZ_OBJT_RECT_PARM_WIDTH,radius); 
		fz_objt_edit_parm_regen(windex,obj); 

	See Also
		fz_objt_edit_rect_parm_get,fz_objt_cnstr_rect,fz_objt_edit_parm_regen

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_edit_rect_parm_set_func) (
	fzrt_int					windex,
	fz_objt_ptr				obj,
	fz_objt_rect_parm_enum	which,
	fz_type_td				*data
	);

#ifdef __cplusplus
}
#endif

#endif
