/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_NDSP_API_H
#define __FORMZ_NDSP_API_H 1


#include "fzpl_plugin.h"

#include "fz_type_api.h"
#include "fz_objt_attr_api.h"
#include "fz_grup_api.h"

#ifdef __cplusplus
extern "C" {
#endif



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

	Non Destructive Section Plane Type


	Description
		The NDSP data type and functions provides access to object non destructive section plane information.
 ****************************************************************/

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

	fz_ndsp_get_count



	Description
		Gets the number of non destructive section planes in a project.

	Parameters
		windex  [Input]
			project window index
		num_ndsps  [Result]
			number of ndsps in project

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_ndsp_get_count_func)(
	fzrt_int			windex,
	fzrt_int			*num_ndsps
	);



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

	fz_ndsp_get_next



	Description
		Given a ndsp pointer, get the next ndsp pointer in the project. 
		If ndsp_in is passed as NULL, the first ndsp in the project is 
		returned.

	Parameters
		windex  [Input]
			project window index
		ndsp_in  [Input]
			ndsp
		ndsp_next  [Result]
			next ndsp

	Returns
		Error codes


	Availability	8.5.4.0


	See Also
		fz_ndsp_get_prev

 ****************************************************************/
typedef fzrt_error_td	 (*fz_ndsp_get_next_func)(
	fzrt_int				windex,
	fz_tag_td				*ndsp_in,
	fz_tag_td				*ndsp_next
	);

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

	fz_ndsp_get_prev



	Description
		Given a ndsp pointer, get the previous ndsp pointer in the project. 
		If ndsp_in is passed as NULL, the last ndsp in the project is returned.

	Parameters
		windex  [Input]
			project window index
		ndsp_in  [Input]
			ndsp
		ndsp_prev  [Result]
			previous ndsp

	Returns
		Error codes


	Availability	8.5.4.0


	See Also
		fz_ndsp_get_next

 ****************************************************************/
typedef fzrt_error_td	 (*fz_ndsp_get_prev_func)(
	fzrt_int				windex,
	fz_tag_td				*ndsp_in,
	fz_tag_td				*ndsp_prev
	);

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

	fz_ndsp_find



	Description
		Find a ndsp with a given name.

	Parameters
		windex  [Input]
			project window index
		name  [Input]
			name of ndsp to find
		ndsp  [Result]
			found ndsp or NULL for NONE

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_boolean	 (*fz_ndsp_find_func)(
	fzrt_int			windex,
	char				*name,
	fz_tag_td			*ndsp
	);

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

	fz_ndsp_new



	Description
		Creates a new ndsp in the given project.

	Parameters
		windex  [Input]
			project window index
		name  [Input]
			name of ndsp to find
		use_current_view  [Input]
			if TRUE, plane is perp to current view @COI
		mplane  [Input, Optional]
			plane definition to use
		ndsp  [Result]
			ndsp

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_ndsp_new_func)(
	fzrt_int			windex,
	char				*name,
	char				use_current_view,
	fz_map_plane_td		*mplane,
	fz_tag_td			*ndsp
	);


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

	fz_ndsp_duplicate



	Description
		Creates a duplicate ndsp from a given ndsp.

	Parameters
		windex  [Input]
			source project window index
		ndsp_in  [Input]
			source ndsp
		dst_windex  [Input]
			desitination project window index
		ndsp_dupl  [Result]
			new ndsp

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_ndsp_duplicate_func)(
	fzrt_int			windex,
	fz_tag_td			*ndsp_in,
	fzrt_int			dst_windex,
	fz_tag_td			*ndsp_dupl
	);

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

	fz_ndsp_delete



	Description
		Deletes a ndsp.

	Parameters
		windex  [Input]
			project window index
		ndsp  [Input]
			ndsp to delete

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td	 (*fz_ndsp_delete_func)(
	fzrt_int			windex,
	fz_tag_td			*ndsp
	);


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

	fz_ndsp_parm_enum


	Description
		NDSP parameters shared by all ndsps.

	Members
		FZ_NDSP_PARM_NAME
			name (48 characters max).
			Type: char*
		FZ_NDSP_PARM_VISIBLE
			Indicates the ndsp is visible in the project windows.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_PARM_ACTIVE
			Indicates the ndsp is active (ie clipping the scene).
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_PARM_2D
			Indicates the  is locked in the project windows.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_PARM_PLANE
			map plane fpr the ndsp
			Type: fz_map_plane_td
			Default Value: FALSE
		FZ_NDSP_PARM_PLANE_EQUC
			plane equation for the plane
			Type: fz_plane_equ_td
			Default Value: FALSE

	Availability	8.5.4.0

 ****************************************************************/
typedef enum fz_ndsp_parm_enum
{
																	
	
	FZ_NDSP_PARM_NAME=0,
									
	FZ_NDSP_PARM_VISIBLE,
													
	FZ_NDSP_PARM_ACTIVE,
		
	FZ_NDSP_PARM_2D,
	FZ_NDSP_PARM_PLANE,
	FZ_NDSP_PARM_PLANE_EQUC,
	FZ_NDSP_PARM_MAX
} fz_ndsp_parm_enum;

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

	fz_ndsp_get_parm_data



	Description
		Gets one of the parameters of a .

	Parameters
		windex  [Input]
			project window index
		ndsp  [Input]
			
		which  [Input]
			parameter identifier
		data  [Result]
			parameter data

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_ndsp_get_parm_data_func)(
	fzrt_int					windex,
	fz_tag_td					*ndsp,
	fz_ndsp_parm_enum			which,
	fz_type_td					*data
	);

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

	fz_ndsp_set_parm_data



	Description
		Sets one of the parameters of a non destructive section plane.

	Parameters
		windex  [Input]
			project window index
		ndsp  [Input]
			non destructive section plane
		which  [Input]
			parameter identifier
		data  [Input]
			parameter data

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_ndsp_set_parm_data_func)(
	fzrt_int					windex,
	fz_tag_td					*ndsp,
	fz_ndsp_parm_enum			which,
	fz_type_td					*data
	);

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

	fz_ndsp_objt_parm_enum


	Description
		NDSP parameters shared by all ndsps.

	Members
		FZ_NDSP_OBJT_PARM_NAME
			name (48 characters max).
			Type: char*
		FZ_NDSP_OBJT__PARM_VISIBLE
			Indicates the ndsp is visible in the project windows.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_OBJT__PARM_ACTIVE
			Indicates the ndsp is active (ie clipping the scene).
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_OBJT__PARM_2D
			Indicates the  is locked in the project windows.
			Type: fzrt_boolean
			Default Value: FALSE
		FZ_NDSP_OBJT__PARM_PLANE
			map plane fpr the ndsp
			Type: fz_map_plane_td
			Default Value: FALSE
		FZ_NDSP_OBJT__PARM_PLANE_EQUC
			plane equation for the plane
			Type: fz_plane_equ_td
			Default Value: FALSE

	Availability	8.5.4.0

 ****************************************************************/
typedef enum fz_ndsp_objt_parm_enum
{
																	
	
	FZ_NDSP_OBJT_PARM_NAME=0,
									
	FZ_NDSP_OBJT__PARM_VISIBLE,
													
	FZ_NDSP_OBJT__PARM_ACTIVE,
		
	FZ_NDSP_OBJT__PARM_2D,
	FZ_NDSP_OBJT__PARM_PLANE,
	FZ_NDSP_OBJT__PARM_PLANE_EQUC,
	FZ_NDSP_OBJT_PARM_MAX
} fz_ndsp_objt_parm_enum;

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

	fz_ndsp_objt_get_parm_data



	Description
		Gets one of the parameters of a .

	Parameters
		windex  [Input]
			project window index
		objt  [Input]
			
		which  [Input]
			parameter identifier
		data  [Result]
			parameter data

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_ndsp_objt_get_parm_data_func)(
	fzrt_int					windex,
	fz_objt_ptr					objt,
	fz_ndsp_parm_enum			which,
	fz_type_td					*data
	);

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

	fz_ndsp_objt_set_parm_data



	Description
		Sets one of the parameters of a non destructive section plane.

	Parameters
		windex  [Input]
			project window index
		objt  [Input]
			non destructive section plane
		which  [Input]
			parameter identifier
		data  [Input]
			parameter data

	Returns
		Error codes


	Availability	8.5.4.0

 ****************************************************************/
typedef fzrt_error_td  (*fz_ndsp_objt_set_parm_data_func)(
	fzrt_int					windex,
	fz_objt_ptr					objt,
	fz_ndsp_parm_enum			which,
	fz_type_td					*data
	);


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

	fz_ndsp_fset


	FZ_NDSP_FSET_TYPE
		formZ  non destructive section planes function set UUID.

	FZ_NDSP_FSET_NAME
		formZ non destructive section planes function set name.

	FZ_NDSP_FSET_VERSION
		formZ non destructive section planes function set version.

	Description
		formZ non destructive section planes function Set

	Availability	8.5.4.0

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


#define FZ_NDSP_FSET_TYPE		"\x3d\x77\x59\xe6\xfc\x64\x4b\xa2\xa1\x4f\x8a\x78\x79\x46\x51\x7f"
	
#define FZ_NDSP_FSET_NAME		"formZ Non Destructive Section Planes"

#define FZ_NDSP_FSET_VERSION	FZPL_VERS_MAKE(8,5,4,0)

typedef struct fz_ndsp_fset
{
	fzpl_fset_prvt_data_td				prvt_data;
	
	fz_ndsp_get_count_func				fz_ndsp_get_count;
	fz_ndsp_get_next_func				fz_ndsp_get_next;
	fz_ndsp_get_prev_func				fz_ndsp_get_prev;
	fz_ndsp_find_func					fz_ndsp_find;
	fz_ndsp_new_func					fz_ndsp_new;
	fz_ndsp_duplicate_func				fz_ndsp_duplicate;
	fz_ndsp_delete_func					fz_ndsp_delete;
	fz_ndsp_get_parm_data_func			fz_ndsp_get_parm_data;
	fz_ndsp_set_parm_data_func			fz_ndsp_set_parm_data;
	
	fz_ndsp_objt_get_parm_data_func		fz_ndsp_objt_get_parm_data;
	fz_ndsp_objt_set_parm_data_func		fz_ndsp_objt_set_parm_data;
	
	
																			
}  fz_ndsp_fset;

#ifdef __cplusplus
}
#endif

#endif

