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

	formZ by autodessys, Inc.
	Copyright c 1994 autodessys, Inc.  All rights reserved.
	
	
	File :	fz_view_api.h
	
	By :	David E. Kropp
	
	Created on :  		16 September 1994
	Last Updated on :  	16 September 1994
	
	Description :	
					
***************************************************************************/

#ifndef __FORMZ_VIEW_API_H
#define __FORMZ_VIEW_API_H 1

#ifdef __cplusplus
extern "C" {
#endif

/* @doc EXTERNAL modl_view */
/********************************************************************************************************

	@module

	@desc	formZ modeling view management functions.  This section describes functionality to create
			edit, and delete views in formZ.  It also provides for mapping between screen and world space and vice versa.

	@toc	modl_view

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

#include "fzrt_api.h"

#include "fzpl_plugin.h"

#include "fz_type_api.h"


/********************************************************************************************************
	@gdef		
	@desc	Unique identifier for the formz View Data
	@avail	7.0.0.0
*********************************************************************************************************/
#define FZ_VIEW_DATA_UUID "\x31\x1f\xd2\x9e\x26\x41\x41\x7a\x98\xbe\x8f\x84\x6c\x13\x48\x0b"

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

	@type	

	@desc	Pointer to view data structure that has all the view parameters.
			
	@avail	5.0.0.0
	
	@see	<auto>
	
	@exfile	

	@toc	modl_view

*********************************************************************************************************/
typedef struct view_td 			*fz_view_ptr;




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

	@enum	

	@desc	Indicates the kind of view. 

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

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

typedef enum fz_view_kind_enum
{
	FZ_VIEW_KIND_WINDOW	= 0,		/*	@emem view is displayed in a formZ window		*/
	FZ_VIEW_KIND_CAMERA,			/*	@emem view is a camera view with specific picture plane dimensions		*/
	FZ_VIEW_KIND_ANIMATION			/*	@emem view is an animation view with specific picture plane dimensions and motion parameters.
											  In version 6.1.0.0 and later, this indicates the view is animated, but does not have to have
											  a picture plane, but may.  Its animatable parameters can be accessed via the animation
											  function set functions. */
} fz_view_kind_enum;

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

	@enum	

	@desc	Indicates the type of view. 

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

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

typedef enum fz_view_type_enum
{
	FZ_VIEW_TYPE_AXONOMETRIC	= 0,		/*	@emem axonometric view		*/
	FZ_VIEW_TYPE_ISOMETRIC		= 1,		/*	@emem isometric view		*/
	FZ_VIEW_TYPE_PERSPECTIVE	= 2,		/*	@emem perspective view		*/
	FZ_VIEW_TYPE_OBLIQUE		= 4,		/*	@emem oblique view			*/
	FZ_VIEW_TYPE_PANORAMIC		= 8			/*	@emem panoramic view		*/
} fz_view_type_enum;

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

	@enum	

	@desc	Indicates the type of axonometric view.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

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

typedef enum fz_view_axon_projection_enum
{
	FZ_VIEW_AXON_PROJ_NONE=0,		/*	@emem not a axonometric projection	*/
	FZ_VIEW_AXON_PROJ_TOP,			/*	@emem axonometric top projection		*/
	FZ_VIEW_AXON_PROJ_BOTTOM, 		/*	@emem axonometric bottom projection		*/
	FZ_VIEW_AXON_PROJ_RIGHT,  		/*	@emem axonometric right projection		*/
	FZ_VIEW_AXON_PROJ_LEFT,	  	/*	@emem axonometric left projection		*/
	FZ_VIEW_AXON_PROJ_BACK,	  	/*	@emem axonometric back projection		*/
	FZ_VIEW_AXON_PROJ_FRONT,		/*	@emem axonometric front projection		*/
	
	VIEW_PROJ_MAX
} fz_view_axon_projection_enum;


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

	@fsfunc_t	

	@desc		Gets the number of views in a projects view list.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_get_count_func)(
	fzrt_int			windex,				/* @parm <in> | project window index */
	fzrt_int			*num_views			/* @parm <out> | number of views in project */
	);


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

	@fsfunc_t	

	@desc		Gets the view pointer from a view tag.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_ptr_to_tag

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_tag_to_ptr_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_tag_td			*tag,		/* @parm <in> | view tag		*/
	fz_view_ptr			*view		/* @parm <out> | view			*/
	);

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

	@fsfunc_t	

	@desc		Gets the view tag from a view pointer.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_tag_to_ptr

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_ptr_to_tag_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			view,		/* @parm <in> | view			*/
	fz_tag_td			*tag		/* @parm <out> | view tag		*/
	);

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

	@fsfunc_t	

	@desc		Given a view pointer, get the next view pointer in the project. 
				If view_in is passed as NULL, the first view in the project is 
				returned.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_get_prev

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_get_next_func)(	
	fzrt_int				windex,			/* @parm <in> | project window index */
	fz_view_ptr			view_in,		/* @parm <in> | view			*/
	fz_view_ptr			*view_next		/* @parm <out> | next view		*/
	);

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

	@fsfunc_t	

	@desc		Given a view pointer, get the previous view pointer in the project. 
				If view_in is passed as NULL, the last view in the project is returned.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_get_next

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_get_prev_func)(	
	fzrt_int				windex,			/* @parm <in> | project window index */
	fz_view_ptr			view_in,		/* @parm <in> | view				*/
	fz_view_ptr			*view_prev		/* @parm <out> | previous view		*/
	);

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

	@fsfunc_t	

	@desc		Find a view with a given name.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_find_func)(	
	fzrt_int				windex,			/* @parm <in> | project window index */
	char				*name,			/* @parm <in> | name of view to find	*/
	fz_view_ptr			*view			/* @parm <out> | found view	or NULL for NONE	*/
	);


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

	@fsfunc_t

	@desc		Creates a new window view in the given project with a default name. 
				The view parameters are initialized to the parameters of the window identified by windex.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_new_window_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			*view		/* @parm <out> | view		*/
	);

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

	@fsfunc_t

	@desc		Creates a new camera view in the given project with a default name. 
				The view parameters are initialized to the parameters of the window identified by windex.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_new_camera_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			*view		/* @parm <out> | view		*/
	);

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

	fsfunc_t

	desc		Creates a new animation view in the given project with a default name. 
				The view parameters are initialized to the parameters of the window identified by windex.

	return		Error codes

	avail		5.0.0.0

	exfile		<scdir>/Utilities | util_views.fsl

	toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_new_animation_func_obsolete)(	
	fzrt_int				windex,		/* parm <in> | project window index */
	fz_view_ptr			*key_views,	/* parm <in> | view		*/
	fzrt_int				nkey_views,	/* parm <in> | view		*/
	fz_view_ptr			*view		/* parm <out> | view		*/
	);

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

	@fsfunc_t	

	@desc		Creates a duplicate view from a given view.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_copy_to_windex	

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_duplicate_func)(	
	fzrt_int				windex,			/* @parm <in> | project window index */
	fz_view_ptr			view_in,		/* @parm <in> | source view	*/
	fz_view_ptr			*view_dupl		/* @parm <out> | new view		*/
	);

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

	@fsfunc_t	

	@desc		Creates a copy of a given view in a given windex. This api function
				makes it possible to copy a view from one project to another, if
				source and destiantion windex represent different projects.
				If source and destiantion windex are from the same project, 
				fz_view_copy_to_windex performs the same task as fz_view_duplicate

	@return		Error codes

	@avail		6.5.5.0

	@see		fz_view_duplicate	

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_copy_to_windex_func)(	
	fzrt_int				src_windex,		/* @parm <in> | project window index of the source view */
	fz_view_ptr			src_view,		/* @parm <in> | source view	*/
	fzrt_int				dst_windex,		/* @parm <in> | project window index of the view view */
	fz_view_ptr			*dst_view		/* @parm <out> | new view		*/
	);

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

	@fsfunc_t	

	@desc		Deletes a view.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_delete_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			view		/* @parm <in> | view to delete	*/
	);


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

	@fsfunc_t	

	@desc		Gets the window to use the specified view. If view == NULL, then the 
				window is not linked to a view in the view list. 

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_get_active_func)(
	fzrt_int			windex,				/* @parm <in> | project window index */
	fz_view_ptr		*view				/* @parm <out> | active view or NULL if none active	*/
	);

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

	@fsfunc_t	

	@desc		Sets the active view for the window. If view == NULL, then the 
				window is not linked to a view in the view list. 

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_set_active_func)(
	fzrt_int			windex,			/* @parm <in> | project window index */
	fz_view_ptr		view			/* @parm <in> | new active view or NULL for none */
	);


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

	@fsfunc_t	

	@desc		Gets the kind of a view.

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view	

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_get_kind_func)(	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			view,		/* @parm <in> | view			*/
	fz_view_kind_enum	*kind		/* @parm <out> | kind of view			*/
	);

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

	@enum	

	@desc	View parameters shared by all views.
			
	@avail	5.0.0.0
			
	@exfile	<scdir>/Utilities | util_views.fsl

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_parm_enum
{	
																	
	FZ_VIEW_PARM_TYPE = 0,			/*	@emem	 	Type of view.
										@ptype		fz_view_type_enum 
										@default	FZ_VIEW_TYPE_AXONOMETRIC
									*/
	
	FZ_VIEW_PARM_NAME,				/*	@emem 		View name (48 characters max).
										@ptype		char* 
									*/
									
	FZ_VIEW_PARM_VISIBLE,			/*	@emem	 	Whether or not the view is visible in the project windows.
										@ptype		fzrt_boolean 
										@default	FALSE
									*/	
													
	FZ_VIEW_PARM_GHOST,				/*	@emem	 	Whether or not the view is ghosted in the project windows.
										@ptype		fzrt_boolean 
										@default	FALSE
									*/					
		
	FZ_VIEW_PARM_LOCK,				/*	@emem	 	Whether or not the view is locked in the project windows.	
										@ptype		fzrt_boolean 
										@default	FALSE
									*/					
				
	FZ_VIEW_PARM_AREA,				/*	@emem	 	The image area of the view.  Does not apply to Panoramic views.
										@ptype		fz_xy_mm_td 
									*/
	
	FZ_VIEW_PARM_EYE,				/*	@emem	 	Eye point for the view (where the view is looking from)
										@ptype		fz_xyz_td 
									*/					
								
	FZ_VIEW_PARM_COI,				/*	@emem	 	Center of interest point for the view (where the view is looking to).	
										@ptype		fz_xyz_td 
									*/					
	
	FZ_VIEW_PARM_CLIP,				/*	@emem	 	Whether or not the display for the view should be clipped at hither and yon. 
													Not used when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_PANORAMIC.
										@ptype		fzrt_boolean 
										@default	FALSE
									*/	

	FZ_VIEW_PARM_HITHER,			/*	@emem	 	Location of the hither plane (depth plane closest to eye) as 
													measured from the eye point. Not used when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_PANORAMIC.
										@ptype		double 
									*/	

	FZ_VIEW_PARM_YON,				/*	@emem	 	Location of the yon plane (depth plane farthest from eye) as 
													measured from the eye point. Not used when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_PANORAMIC.
										@ptype		double 
									*/	

	FZ_VIEW_PARM_SPIN,				/*	@emem	 	Tilt of the view looking down the line of sight. Synchronized with FZ_VIEW_PARM_UP.
													Not used when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_ISOMETRIC <bar><bar> FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_OBLIQUE.
										@ptype		double 
									*/	
	
	FZ_VIEW_PARM_UP,				/*	@emem	 	Up vector for the view. Synchronized with FZ_VIEW_PARM_SPIN.
													Not used when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_ISOMETRIC <bar><bar> FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_OBLIQUE.
										@ptype		fz_xyz_td 
									*/	
													
	FZ_VIEW_PARM_ANGLES,			/*	@emem	 	View rotation angles.
													only valid when FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_AXONOMETRIC <bar><bar> FZ_VIEW_PARM_TYPE == FZ_VIEW_TYPE_PERSPECTIVE.
										@ptype		fz_xyz_td 
									*/
									
	FZ_VIEW_PARM_AXONOMETRIC_PROJ,	/*	@emem	 	Type of axonometric projection.
										@ptype		fz_view_axon_projection_enum 
										@default	FZ_VIEW_AXON_PROJ_NONE
									*/
									
	FZ_VIEW_PARM_ISOMETRIC_ANGLES,	/*	@emem	 	Angles for isometric view.   
										@ptype		fz_xy_td 
										@default	{30.0,60.0}
									*/	
									
	FZ_VIEW_PARM_ISOMETRIC_SCALES,	/*	@emem	 	Scales for isometric view.
										@ptype		fz_xyz_td 
										@default	{1.0,1.0,1.0}
									*/
										
	FZ_VIEW_PARM_OBLIQUE_ANGLE,		/*	@emem	 	Angle for oblique view.   
										@ptype		double 
										@default	30.0
									*/	
									
	FZ_VIEW_PARM_OBLIQUE_SCALE,		/*	@emem	 	Scale for oblique view.   
										@ptype		double 
										@default	1.0
									*/	
									
	FZ_VIEW_PARM_PERSPECTIVE_ANGLE,	/*	@emem	 	Perspective viewing angle. Synchronized with FZ_VIEW_PARM_PERSPECTIVE_FOCAL.
										@ptype		double 
										@default	60.0
										@rmin_imax	0.0 | 178.0
									*/	
									
	FZ_VIEW_PARM_PERSPECTIVE_FOCAL,	/*	@emem	 	Perspective focal length. Synchronized with FZ_VIEW_PARM_PERSPECTIVE_ANGLE.
										@ptype		double
										@default	31.177
										@rimin		0.3141911651
									*/	
									
	FZ_VIEW_PARM_PERSPECTIVE_STRAIGHT,/* @emem	 	Whether or not perspective view keeps vertical lines straight.
										@ptype		fzrt_boolean 
										@default	FALSE
									*/	
	
	FZ_VIEW_PARM_PANORAMIC_ANG,		/*	@emem	 	Panoramic view extents (angle).
										@ptype		double
										@default	360.0
										@rimin_imax	0.01 | 360.0
									*/	
	
	FZ_VIEW_PARM_PANORAMIC_RES,		/*	@emem	 	Panoramic display resolution (in pixels).
										@ptype		fzrt_int
										@default	5
										@rimin_imax	1 | 256
									*/	
									
	FZ_VIEW_PARM_SNAP,				/*	@emem	 	Whether or not the graphics are snappable.
										@ptype		fzrt_boolean
										@default	FALSE
									 */
	FZ_VIEW_PARM_MAX
} fz_view_parm_enum;
	

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

	@fsfunc_t	

	@desc		Gets one of the parameters of a view. <nl>
				Note : not all parameters are used by all view types. 
				In this case the parameter is still returned, but has no 
				effect on the behavior of the view.<nl>

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_set_parm_data

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_get_parm_data_func)(
	fzrt_int						windex,				/* @parm <in> | project window index */
	fz_view_ptr					view,				/* @parm <in> | view */
	fz_view_parm_enum			which,				/* @parm <in> | parameter identifier */
	fz_type_td					*data				/* @parm <out> | parameter data	 */
	);

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

	@fsfunc_t	

	@desc		Sets one of the standard parameters of a view.  These standard parameters are those
				options seen on the left-hand side of the view parameters dialog.

	@return		Error codes

	@avail		5.0.0.0

	@see		fz_view_get_parm_data

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_set_parm_data_func)(
	fzrt_int						windex,				/* @parm <in> | project window index */
	fz_view_ptr					view,				/* @parm <in> | view */
	fz_view_parm_enum			which,				/* @parm <in> | parameter identifier */
	fz_type_td					*data				/* @parm <in> | parameter data	 */
	);


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

	@fsfunc_t	

	@desc		Transforms a view by the given matrix. 

	@return		Error codes

	@avail		5.0.0.0

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view

*************************************************************************/
typedef fzrt_error_td	 (FZRT_SPEC *fz_view_transform_func) (	
	fzrt_int				windex,		/* @parm <in> | project window index */
	fz_view_ptr			view,		/* @parm <in> | view						*/
	fz_mat4x4_td		*mat		/* @parm <in> | matrix to transform view by	*/
	);





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

	@enum	

	@desc	Standard predefined camera types.
			
	@avail	5.0.0.0
			
	@see	

	@toc	modl_view

*********************************************************************************************************/									
typedef enum fz_view_camera_std_enum 
{				
	FZ_VIEW_CAMR_STD_HALF 		= 'HALF',	/*	@emem Half Screen 			- (320  x 240 	 pixel aspect = 1.0 	aspect = 4./3. ) */		
	FZ_VIEW_CAMR_STD_FULL 		= 'FULL',	/*	@emem Full Screen (VGA) 	- (640  x 480 	 pixel aspect = 1.0 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_NTSC 		= 'NTSC',	/*	@emem NTSC 					- (720  x 486 	 pixel aspect = 0.9 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_NTSA 		= 'NTSA',	/*	@emem NTSC (Width Adj.) 	- (648  x 486 	 pixel aspect = 1.0 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_PALL 		= 'PALL',	/*	@emem PAL 					- (768  x 576 	 pixel aspect = 1.0 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_SVGA 		= 'SVGA',	/*	@emem SVGA, 				- (800  x 600 	 pixel aspect = 1.0 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_17IN 		= '17IN',	/*	@emem Large Screen (XGA) 	- (1024 x 768 	 pixel aspect = 1.0 	aspect = 4./3. ) */					
	FZ_VIEW_CAMR_STD_35MM 		= '35MM',	/*	@emem 35mm Slide Film 		- (3072 x 2048	 pixel aspect = 1.0 	aspect = 3./2. ) */					
	FZ_VIEW_CAMR_STD_70MM 		= '70MM',	/*	@emem 70mm Film 			- (2130 x 1152	 pixel aspect = 1.0 	aspect = 1.85  ) */		
	FZ_VIEW_CAMR_STD_HDT1		= 'HDT1',	/*	@emem HDTV (Low Res) 		- (1280 x 720 	 pixel aspect = 1.0 	aspect = 16./9.) */							
	FZ_VIEW_CAMR_STD_HDT2		= 'HDT2',	/*	@emem HDTV (High Res) 		- (1920 x 1080	 pixel aspect = 1.0 	aspect = 16./9.) */							
	FZ_VIEW_CAMR_STD_SXGA		= 'SXGA',	/*	@emem Super XGA	  			- (1280 x 960 	 pixel aspect = 1.0 	aspect = 4./3. ) */							
	FZ_VIEW_CAMR_STD_NTS2		= 'NTS2'	/*	@emem NTSC (Height Adj.) 	- (720  x 540 	 pixel aspect = 1.0 	aspect = 4./3. ) */							
} fz_view_camera_std_enum;


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

	@enum	

	@desc	View parameters used by camera views.
			
	@avail	5.0.0.0
			
	@see	

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_parm_camera_enum
{	
									
	FZ_VIEW_PARM_CAMR_STD,			/*	@emem	 	Whether or not the camera view has standard pre-set dimensions.  FALSE means use custom dimensions.
										@ptype		fzrt_boolean 
										@default	TRUE
									*/

	FZ_VIEW_PARM_CAMR_STD_TYPE,		/*	@emem	 	Type of standard camera dimensions to use for the camera view.
										@ptype		fz_view_camera_std_enum 
										@default	FZ_VIEW_CAMR_STD_FULL
									*/
	
	FZ_VIEW_PARM_CAMR_WIDTH,		/*	@emem	 	Width of camera view in pixels. 
										@ptype		short
										@default	640
										@rimin_imax	1 | 32767
									*/
	
	FZ_VIEW_PARM_CAMR_HEIGHT,		/*	@emem	 	Height of camera view in pixels. 
										@ptype		short
										@default	480
										@rimin_imax	1 | 32767
									*/
	
	FZ_VIEW_PARM_CAMR_ASPECT,		/*	@emem	 	Aspect ratio of the entire camera view.  Related to FZ_VIEW_PARM_CAMR_WIDTH and FZ_VIEW_PARM_CAMR_HEIGHT.
										@ptype		float
										@default	1.333
										@rval		0.0 < value <= 1000000000.0 such that 1 <= FZ_VIEW_PARM_CAMR_HEIGHT <= 32767 when (FZ_VIEW_PARM_CAMR_WIDTH*FZ_VIEW_PARM_CAMR_PIXEL_ASPECT) / value.
									*/
	
	FZ_VIEW_PARM_CAMR_ASPECT_LOCK,	/*	@emem	 	Whether or not the aspect ratio is locked. If locked, changes to FZ_VIEW_PARM_CAMR_WIDTH 
													will change FZ_VIEW_PARM_CAMR_HEIGHT to maintain the current aspect ratio, and vice versa.
										@ptype		fzrt_boolean
										@default	TRUE
									*/
	
	FZ_VIEW_PARM_CAMR_PIXEL_ASPECT,	/*	@emem	 	Aspect ratio of a single pixel in the camera view. 
										@ptype		float 
										@default	1.0
										@rimin_imax	0.001 | 1000000000.0
									*/
									
	FZ_VIEW_PARM_CAMR_MAX
} fz_view_parm_camera_enum;



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

	@fsfunc_t	

	@desc		Gets one of the parameters of a camera view.

	@return		Error codes

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_camera_get_parm_func)(
	fzrt_int						windex,				/* @parm <in> | project window index */
	fz_view_ptr					view,				/* @parm <in> | view */
	fz_view_parm_camera_enum	which,				/* @parm <in> | parameter identifier */
	fz_type_td					*data				/* @parm <out> | parameter data	 */
	);

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

	@fsfunc_t	

	@desc		Sets one of the parameters of a camera view.

	@return		Error codes

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_camera_set_parm_func)(
	fzrt_int						windex,				/* @parm <in> | project window index */
	fz_view_ptr					view,				/* @parm <in> | view */
	fz_view_parm_camera_enum	which,				/* @parm <in> | parameter identifier */
	fz_type_td					*data				/* @parm <in> | parameter data	 */
	);


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

	@enum	

	@desc	View parameters used by animation views.
			
	@avail	5.0.0.0
			
	@see	

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_parm_animation_enum
{	
	
	FZ_VIEW_PARM_ANIM_TIME,			/*	@emem	 	The total duration time (in seconds) of an animation. Synchronized with FZ_VIEW_PARM_ANIM_FRAMES / FZ_VIEW_PARM_ANIM_FPS.
										@ptype		float
										@default	30.0
										@rimin_imax	1.0 / FZ_VIEW_PARM_ANIM_FPS | 32767.0 / FZ_VIEW_PARM_ANIM_FPS
									*/
	
	FZ_VIEW_PARM_ANIM_FRAMES,		/*	@emem	 	The total number of frames of an animation. Synchronized with FZ_VIEW_PARM_ANIM_TIME * FZ_VIEW_PARM_ANIM_FPS
										@ptype		fzrt_int
										@default	300
										@rimin_imax	1 | 32767
									*/
	
	FZ_VIEW_PARM_ANIM_FPS,			/*	@emem	 	The total frame rate of an animation. 
										@ptype		float
										@default	30.0
										@rimin_imax	1.0 / FZ_VIEW_PARM_ANIM_TIME | 32767.0 / FZ_VIEW_PARM_ANIM_TIME
									*/
	
	FZ_VIEW_PARM_ANIM_CONST_VEL,	/*	@emem	 	Whether or not to have a constant velocity animation. When FALSE, then custom velocity data exists
										@ptype		fzrt_boolean
										@default	TRUE
									*/
	
	FZ_VIEW_PARM_ANIM_EYE_PATH,		/*	@emem	 	The type of path for the eye point for the animation (where the animation is looking from)
										@ptype		fz_view_anim_path_type_enum
										@default	FZ_VIEW_ANIM_PATH_TYPE_LINEAR
									*/
									
	FZ_VIEW_PARM_ANIM_EYE_OBJT,		/*	@emem	 	Object pointer of reference when FZ_VIEW_PARM_ANIM_EYE_PATH == FZ_VIEW_ANIM_PATH_TYPE_OBJECT
										@ptype		fz_objt_ptr 
									*/
	
	FZ_VIEW_PARM_ANIM_COI_PATH,		/*	@emem	 	The type of path for the cnetr of interest for the animation (where the animation is looking to)
										@ptype		fz_view_anim_path_type_enum
										@default	FZ_VIEW_ANIM_PATH_TYPE_FIXED
									*/

	FZ_VIEW_PARM_ANIM_COI_OBJT,		/*	@emem	 	Object pointer of reference when FZ_VIEW_PARM_ANIM_COI_PATH == FZ_VIEW_ANIM_PATH_TYPE_OBJECT
										@ptype		fz_objt_ptr 
									*/
	FZ_VIEW_PARM_ANIM_MAX
} fz_view_parm_animation_enum;

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

	@enum	

	@desc	Indicates the type of path control for an animated view.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

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

typedef enum fz_view_anim_path_type_enum
{
	FZ_VIEW_ANIM_PATH_TYPE_FIXED=0,			/*	@emem Path is fixed to a single point.	*/
	FZ_VIEW_ANIM_PATH_TYPE_LINEAR,			/*	@emem Path is linear. */
	FZ_VIEW_ANIM_PATH_TYPE_LINEAR_CLOSED, 	/*	@emem Path is linear and returns to start.
													At least 2 keyframes are required to use this path setting.
													If chosen, a new keyframe will always be added.  If the number
													of keyframes falls below 3 (by deleting them), the
													FZ_VIEW_ANIM_PATH_LINEAR path will be used.	*/
	FZ_VIEW_ANIM_PATH_TYPE_SPLINE,  			/*	@emem Path is a spline.
													At least 3 keyframes are required to use this path setting.
													If the number of keyframes falls below 3 (by deleting them),
													the FZ_VIEW_ANIM_PATH_LINEAR path will be used.		*/
	FZ_VIEW_ANIM_PATH_TYPE_SPLINE_CLOSED,	/*	@emem Path is a spline and returns to start.
													At least 3 keyframes are required to use this path setting,
													If chosen, a new keyframe will always be added.  If the number
													of keyframes falls below 4 (by deleting them), the
													FZ_VIEW_ANIM_PATH_LINEAR_CLOSED path will be used.	*/
	FZ_VIEW_ANIM_PATH_TYPE_OBJECT,	  		/*	@emem Path is fixed to an object centroid.	*/
	
	FZ_VIEW_ANIM_PATH_TYPE_MAX
} fz_view_anim_path_type_enum;

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

	fsfunc_t	

	desc		Gets one of the parameters of an animation view.

	return		Error codes

	avail		5.0.0.0

	see		

	exfile		

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_get_parm_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_parm_animation_enum	which,				/* parm <in> | parameter identifier */
	fz_type_td					*data				/* parm <out> | parameter data	 */
	);

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

	fsfunc_t	

	desc		Sets one of the parameters of an animation view.

	return		Error codes

	avail		5.0.0.0

	see		

	exfile		

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_set_parm_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_parm_animation_enum	which,				/* parm <in> | parameter identifier */
	fz_type_td					*data				/* parm <in> | parameter data	 */
	);
	
/********************************************************************************************************

	@enum	

	@desc	
			
	@avail	5.0.0.0
			
	@see	

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_dir_type_enum
{	/*	anim_ffmt_key_td.dir_type	*/
	FZ_ANIM_DIR_IMPLICIT = 0,	/*	@emem	 */
	FZ_ANIM_DIR_PT_VAL,		/*	@emem	 */
	FZ_ANIM_DIR_OBJT_REF,		/*	@emem	 */
	FZ_ANIM_DIR_VEL_VEC,		/*	@emem	 */
	FZ_ANIM_DIR_VEL_ANG,		/*	@emem	 */
	FZ_ANIM_DIR_GLBL_VEC		/*	@emem	 */
}  fz_view_dir_type_enum;


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

	fsfunc_t	

	desc		Gets the current keyframe of an animation view.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_keyf_set_current, fz_view_anim_keyf_get_num

	exfile		

	toc	modl_view

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_get_current_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fzrt_int						*current_keyframe	/* parm <out> | current keyframe	 */
	);

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

	fsfunc_t	

	desc		Sets the current keyframe of an animation view.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_keyf_get_current, fz_view_anim_keyf_get_num

	exfile		

	toc	modl_view

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_set_current_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fzrt_int						current_keyframe	/* parm <in> | current keyframe	 */
	);

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

	fsfunc_t	

	desc		Gets the number of keyframes of an animation view.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_keyf_get_current, fz_view_anim_keyf_set_current

	exfile		

	toc	modl_view

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_get_num_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fzrt_int						*num_keyframes		/* parm <out> | number of keyframes	 */
	);


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

	@enum	

	@desc	Indicates where to insert a keyframe relative to the current keyframe.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

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

typedef enum fz_view_anim_keyf_insert_enum
{
	FZ_VIEW_ANIM_KEYF_INSERT_BEFORE = -1,	/* @emem	Insert before current keyframe */
	FZ_VIEW_ANIM_KEYF_INSERT_AFTER = 1		/* @emem	Insert after current keyframe */
}fz_view_anim_keyf_insert_enum;

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

	fsfunc_t	

	desc		Inserts a new (automatically interpolated) keyframe into an animation view, either before
				or after the current keyframe.  Use the fz_view_anim_keyf_set_current and fz_view_set_parm_data
				functions to change the newly inserted keyframe's parameters if desired.<nl>
				Note: inserting before the first keyframe, or after the last keyframe, cannot be done; insertion
				must occur between the first and last keyframes because the new keyframe is interpolated between
				the two keyframes.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_keyf_get_current, fz_view_anim_keyf_set_current, fz_view_anim_keyf_delete,
				fz_view_anim_keyf_get_num

	exfile		

	toc	modl_view

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_insert_func_obsolete)(
	fzrt_int							windex,			/* parm <in> | project window index */
	fz_view_ptr						view,			/* parm <in> | view */
	fz_view_anim_keyf_insert_enum	where			/* parm <in> | where to insert keyframe	 */
	);

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

	fsfunc_t	

	desc		Deletes a keyframe from an animation view indicated by the keyframe index.  Keyframe indices are
				between 1 and the number of keyframes.  Only keyframes not including the first and the last one
				can be deleted.  The eye path and center of interest path may be affected by deleting keyframes.
				If a certain type of path requires a certain number of keyframes, the type of path will be
				altered when the number of keyframes required to support that path falls below the minimum
				(see fz_view_anim_path_type_enum).

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_keyf_get_current, fz_view_anim_keyf_set_current, fz_view_anim_keyf_insert,
				fz_view_anim_keyf_get_num, fz_view_anim_path_type_enum

	exfile		

	toc	modl_view

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_delete_func_obsolete)(
	fzrt_int							windex,			/* parm <in> | project window index */
	fz_view_ptr						view,			/* parm <in> | view */
	fzrt_int							keyframe		/* parm <in> | keyframe to delete	 */
	);


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

	@enum	

	@desc	Type of animation velocity curve.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_anim_vel_curv_type_enum
{
	FZ_VIEW_ANIM_VEL_CURV_TYPE_BEZIER=0,	/* @emem	Piecewise cubic Bezier curve. The number of control
														points must be 3k + 1 (where k is an integer). */
	FZ_VIEW_ANIM_VEL_CURV_TYPE_MAX
}fz_view_anim_vel_curv_type_enum;


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

	@enum	

	@desc	Which parameter to use for the animation velocity options.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_anim_vel_parm_enum
{
	FZ_VIEW_ANIM_VEL_PARM_UNIV=0,		/*	@emem		Whether or not the velocity curve is defined universally for all tracks, or per track.  FALSE means per track.
											@ptype		fzrt_boolean
											@default	TRUE
										*/
	FZ_VIEW_ANIM_VEL_PARM_CURV_TYPE,	/*	@emem		Type of animation velocity curve.
											@ptype		fz_view_anim_vel_curv_type_enum
											@default	FZ_VIEW_ANIM_VEL_CURV_TYPE_BEZIER
										*/
	FZ_VIEW_ANIM_VEL_PARM_MAX
}fz_view_anim_vel_parm_enum;


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

	@enum	

	@desc	Which track to use for the animation velocity options.

	@avail	5.0.0.0

 	@see	<auto>

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_anim_vel_track_enum
{
	FZ_VIEW_ANIM_VEL_TRACK_UNIV=0,		/* @emem		Universal track */
	FZ_VIEW_ANIM_VEL_TRACK_EYE,			/* @emem		Eye point track */
	FZ_VIEW_ANIM_VEL_TRACK_COI,			/* @emem		Center of interest point track */
	FZ_VIEW_ANIM_VEL_TRACK_HITHER,		/* @emem		Hither plane track */
	FZ_VIEW_ANIM_VEL_TRACK_YON,			/* @emem		Yon plane track */
	FZ_VIEW_ANIM_VEL_TRACK_ZOOMPAN,		/* @emem		Zoom/pan track */
	FZ_VIEW_ANIM_VEL_TRACK_SPIN,		/* @emem		Spin track */
	FZ_VIEW_ANIM_VEL_TRACK_VANGLE		/* @emem		View angle track */
}fz_view_anim_vel_track_enum;

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

	fsfunc_t	

	desc		Gets one of the parameters of an animation view's velocity control.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_vel_set_parm

	exfile		

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_vel_get_parm_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_anim_vel_parm_enum	which_parm,			/* parm <in> | parameter identifier */
	fz_view_anim_vel_track_enum	which_track,		/* parm <in> | track identifier */
	fz_type_td					*data				/* parm <out> | parameter data	 */
	);

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

	fsfunc_t	

	desc		Sets one of the parameters of an animation view's velocity control.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_vel_get_parm

	exfile		

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_vel_set_parm_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_anim_vel_parm_enum	which_parm,			/* parm <in> | parameter identifier */
	fz_view_anim_vel_track_enum	which_track,		/* parm <in> | track identifier */
	fz_type_td					*data				/* parm <in> | parameter data	 */
	);

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

	fsfunc_t	

	desc		Gets the velocity curve points of an animation view's velocity control.
				List of FZ_TYPE_XY control points for the curve.  The curve represents
				location of the cameras (along the animation path) as a function of time,
				therefore there cannot be two locations for any particular time.
				The x values represent the time frame value.  The y values
				represent the distance the camera has traveled along the animation
				path.
				
				<nl>
				If the curve type is FZ_VIEW_ANIM_VEL_CURV_TYPE_BEZIER,
				then the list of points should represent a piecewise cubic
				Bezier curve.  Every third control point beginning with the
				first (1, 4, 7, ...), is a joining point between two cubic
				Bezier curves.  To ensure the list of points yields a function,
				all the joining points' x values
				must be greater than both the two previous non-join points'
				x values; and non-join points' x values must be greater than
				or equal to the previous joining point's x value.  Also, all x
				and y values must be greater than or equal to 0; and the
				first point's x value must be 0 and the last point's x value
				must be the maximum.
				
				<nl>
				The curve points are be normalized to values between 0 and 1.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_vel_set_parm, fz_view_anim_vel_set_parm, fz_view_anim_vel_set_curve_pts

	expl		fz_type_list_ptr	curve_pts;
				fz_type_td			fz_type;
				fzrt_int				num_pts;
				fzrt_int				i;
				fz_xy_td			pt;
				double				normalized_time
				double				normalized_dist;
				fzrt_int				frame;
				fzrt_int				tot_frames;

				fz_view_anim_get_parm(windex, view, FZ_VIEW_PARM_ANIM_FRAMES, &fz_type);
				fz_type_get_int(&fz_type, &tot_frames);
				fz_type_list_init(FZ_TYPE_XY, &curve_pts);
				fz_view_anim_vel_get_curve_pts(windex, view, FZ_VIEW_ANIM_VEL_TRACK_EYE, curve_pts);
				fz_type_list_count(curve_pts, &num_pts);
				for(i = 0; i < num_pts; i++)
				{
					fz_type_list_get_item(curve_pts, i, &fz_type);
					fz_type_get_xy(&fz_type, &pt);
					normalized_time = pt.x;
					normalized_dist = pt.y;
					frame = (fzrt_int)(normalized_time * (double)tot_frames + 0.5);
				}
				fz_type_list_finit(&curve_pts);
				

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_vel_get_curve_pts_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_anim_vel_track_enum	which_track,		/* parm <in> | track identifier */
	fz_type_list_ptr			pts					/* parm <out> | curve points
													   rimin_imax 0.0 | 1.0	 */
	);

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

	fsfunc_t	

	desc		Sets the velocity curve points of an animation view's velocity control.
				List of FZ_TYPE_XY control points for the curve.  The curve represents
				location of the cameras (along the animation path) as a function of time,
				therefore there cannot be two locations for any particular time.
				The x values represent the time frame value.  The y values
				represent the distance the camera has traveled along the animation
				path.
				
				<nl>
				If the curve type is FZ_VIEW_ANIM_VEL_CURV_TYPE_BEZIER,
				then the list of points should represent a piecewise cubic
				Bezier curve.  Every third control point beginning with the
				first (1, 4, 7, ...), is a joining point between two cubic
				Bezier curves.  To ensure the list of points yields a function,
				all the joining points' x values
				must be greater than both the two previous non-join points'
				x values; and non-join points' x values must be greater than
				or equal to the previous joining point's x value.  Also, all x
				and y values must be greater than or equal to 0; and the
				first point's x value must be 0 and the last point's x value
				must be the maximum.
				
				<nl>
				Any values greater than or equal to 0.0 can be used for the x, y coordinates.
				However, formZ will normalize these points to the range of 0.0 to 1.0 based
				on the maximum value.
				
				<nl>
				If tangency is desired at each joining point, then the two
				surrounding non-join points should be collinear with
				the join point.

	return		Error codes

	avail		5.0.0.0

	see		fz_view_anim_vel_set_parm, fz_view_anim_vel_set_parm, fz_view_anim_vel_get_curve_pts

	expl		fz_type_list_ptr	curve_pts;
				fz_type_td			fz_type;
				fzrt_int				num_pts;
				fzrt_int				i;
				fz_xy_td			pt;
				double				*dists;
				fzrt_int				*frames;
				
				fz_type_list_init(FZ_TYPE_XY, &curve_pts);
				fz_type_list_pre_allocate(list_ptr, num_pts);
				for(i = 0; i < num_pts; i++)
				{
					pt.x = frame[i];
					pt.y = dists[i];
					fz_type_set_xy(&pt, &fz_type);
					fz_type_list_add_item(curve_pts, &fz_type);
				}
				fz_view_anim_vel_set_curve_pts(windex, view, FZ_VIEW_ANIM_VEL_TRACK_EYE, curve_pts);
				fz_type_list_finit(&curve_pts);

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_vel_set_curve_pts_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_anim_vel_track_enum	which_track,		/* parm <in> | track identifier */
	fz_type_list_ptr			pts					/* parm <in> | curve points
													   rimin 0.0	 */
	);

typedef enum fz_view_anim_path_enum
{
	FZ_VIEW_ANIM_PATH_EYE = 0,
	FZ_VIEW_ANIM_PATH_COI,
	FZ_VIEW_ANIM_PATH_UP_VEC,
	
	FZ_VIEW_ANIM_PATH_MAX
}  fz_view_anim_path_enum;

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

	fsfunc_t	

	desc		Gets the control points of an animation path.

	return		Error codes

	avail		5.0.0.0

	exfile		

	toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_get_path_pts_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | view */
	fz_view_anim_path_enum		which_path,			/* parm <in> | path identifier */
	fz_type_list_ptr			pts					/* parm <out> | curve points */
	);




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

	fsfunc_t	

	desc		Gets the frame number, frame time, and/or distance along the path of a keyframe.
				The frame time is relative to the start of the animation.

	return		Error codes

	avail		5.0.0.0

	exfile		

	toc		modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_anim_keyf_get_frame_time_func_obsolete)(
	fzrt_int						windex,				/* parm <in> | project window index */
	fz_view_ptr					view,				/* parm <in> | the animation view */
	fzrt_int						keyframe,			/* parm <in> | the keyframe */
	fzrt_int						*frame,				/* parm <out_opt> | the frame of the animation where the keyframe is located */
	double						*time,				/* parm <out_opt> | the time in seconds from the start of the animation */
	double						*dist				/* parm <out_opt> | the distance along the path curve. */
	);






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

	@fsfunc_t	

	@desc		Routine to convert 3-D world coordinates to screen (pixel) coordinates.
				This is the complete transformation (world->rotation->w->screen)

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_screen_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyz_td		*world_pnt,		/* @parm	<in> | 3D point in world space */
	fzrt_point	*screen_pnt		/* @parm	<out> | 2D point in screen (pixel) space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert a screen (pixel) coordinate to a 3D world coordinate. 
				If plane == NULL, the 3D coordinate is a point on the current reference plane. 
				This is not supported for the FZ_VIEW_TYPE_PANORAMIC view type.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_screen_2_world_func)(
	fzrt_int					windex,			/* @parm	<in> | project window index */
	fzrt_point			*screen_pnt,	/* @parm	<in> | 2D point in screen (pixel) space */
	fz_map_plane_td 	*plane,			/* @parm	<in_opt> | plane to project point on (defaults to current plane if not provided) */
	fz_xyz_td				*world_pnt		/* @parm	<out> | 3D point in world space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert 3-D world coordinates to tform coordinates

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_tform_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyz_td		*world_pnt,		/* @parm	<in> | 3D point in world space */
	fz_xyz_td		*tform_pnt		/* @parm	<out> | 3D point in tform space */
	);

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

	@enum	

	@desc	Identifiers for how an entity was clippped against the view frustum.
			
	@avail	5.0.0.0
			
	@see	

	@toc	modl_view

*********************************************************************************************************/
typedef enum fz_view_clip_enum
{	
	FZ_VIEW_CLIP_IN=0,		/*	@emem Indicates entity is completely inside the view frustum (fully visible) */
	FZ_VIEW_CLIP_OUT,		/*	@emem Indicates entity is completely outside the view frustum (fully invisible)  */
	FZ_VIEW_CLIP_INSECT,	/*	@emem Indicates clipped the view frustum (partially visible) */

	VIEW_CLIP_MAX
} fz_view_clip_enum;

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

	@fsfunc_t	

	@desc		Routine to convert a line from 3-D world coordinates to tform coordinates and clip in against the view.
				This is the transformation (world->rotation->w)

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_tform_clipped_func)(
	fzrt_int				windex,						/* @parm	<in> | project window index */
	fz_xyz_td			*world_pnt1,				/* @parm	<in> | 3D point 1 in world space */
	fz_xyz_td			*world_pnt2,				/* @parm	<in> | 3D point 2 in world space */
	fz_xyz_td			*clipped_world_pnt1,		/* @parm	<out_opt> | clipped world_pnt1 in world space */
	fz_xyz_td			*clipped_world_pnt2,		/* @parm	<out_opt> | clipped world_pnt2 in world space */
	fz_xyz_td			*clipped_tform_pnt1,		/* @parm	<out_opt> | world_pnt1 in tform space */
	fz_xyz_td			*clipped_tform_pnt2,		/* @parm	<out_opt> | world_pnt2 in tform space */
	fzrt_boolean	*clip1,						/* @parm	<out_opt> | first point was clipped */
	fzrt_boolean	*clip2,						/* @parm	<out_opt> | second point was clipped */
	fz_view_clip_enum	*clip_status				/* @parm	<out_opt> | clip status for line segment */
	);


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

	@fsfunc_t	

	@desc		Routine to convert tform coordinates to screen (pixel) coordinates.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_tform_2_screen_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyz_td		*tform_pnt,		/* @parm	<in> | 3D point in tform space */
	fzrt_point	*screen_pnt		/* @parm	<out> | 2D point in screen (pixel) space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert tform coordinates to floating point screen coordinates (not rounded
	            to the nearest pixel).  (Useful for vector images).

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_tform_2_screen_xy_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyz_td		*tform_pnt,		/* @parm	<in> | 3D point in tform space */
	fz_xy_td		*xy_pnt			/* @parm	<out> | 2D point in floating point screen space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert screen (pixel) coordinates to tform coordinates.
				If plane == NULL, the 3D coordinate is a point on the current reference plane. 
				This is not supported for the FZ_VIEW_TYPE_PANORAMIC view type.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_screen_2_tform_func)(
	fzrt_int					windex,			/* @parm	<in> | project window index */
	fzrt_point			*screen_pnt,	/* @parm	<in> | 2D point in screen (pixel) space */
	fz_map_plane_td 	*plane,			/* @parm	<in_opt> | plane to project point on (defaults to current plane if not provided) */
	fz_xyz_td				*tform_pnt		/* @parm	<out> | 3D point in tform space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert floating point screen coordinates (not rounded) to tform coordinates.
				If plane == NULL, the 3D coordinate is a point on the current reference plane. 
				This is not supported for the FZ_VIEW_TYPE_PANORAMIC view type.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_screen_xy_2_tform_func)(
	fzrt_int				windex,			/* @parm	<in> | project window index */
	fz_xy_td			*xy_pnt,		/* @parm	<in> | 2D point in floating point screen space */
	fz_map_plane_td 	*plane,			/* @parm	<in_opt> | plane to project point on (defaults to current plane if not provided) */
	fz_xyz_td			*tform_pnt		/* @parm	<out> | 3D point in tform space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert 3-D world coordinates to homogenous coordinates

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_homg_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyz_td		*world_pnt,		/* @parm	<in> | 3D point in world space */
	fz_xyzw_td		*homg_pnt		/* @parm	<out> | 3D point in homogenous space */
	);


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

	@fsfunc_t	

	@desc		Routine to convert 3-D world coordinates to homogenous coordinates

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_homg_clipped_func)(
	fzrt_int				windex,						/* @parm	<in> | project window index */
	fz_xyz_td			*world_pnt1,				/* @parm	<in> | 3D point 1 in world space */
	fz_xyz_td			*world_pnt2,				/* @parm	<in> | 3D point 2 in world space */
	fz_xyz_td			*clipped_world_pnt1,		/* @parm	<out_opt> | clipped world_pnt1 in world space */
	fz_xyz_td			*clipped_world_pnt2,		/* @parm	<out_opt> | clipped world_pnt2 in world space */
	fz_xyzw_td			*clipped_view_pnt1,			/* @parm	<out_opt> | world_pnt1 in view space */
	fz_xyzw_td			*clipped_view_pnt2,			/* @parm	<out_opt> | world_pnt2 in view space */
	fzrt_boolean	*clip1,						/* @parm	<out_opt> | first point was clipped */
	fzrt_boolean	*clip2,						/* @parm	<out_opt> | second point was clipped */
	fz_view_clip_enum	*clip_status				/* @parm	<out_opt> | clip status for line segment */
	);

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

	@fsfunc_t	

	@desc		Routine to get a matrix for converting from 3D world coordinates to homogenous coordinates

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_world_2_homg_get_mat_func)(
	fzrt_int					windex,					/* @parm	<in> | project window index */
	fz_mat4x4_td		*matrix					/* @parm	<out> | transformation matrix */
	);


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

	@fsfunc_t	

	@desc		Routine to convert homogenous coordinates to screen (pixel) coordinates.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_homg_2_screen_func)(
	fzrt_int			windex,			/* @parm	<in> | project window index */
	fz_xyzw_td		*homg_pnt,		/* @parm	<in> | 3D point in homogenous space */
	fzrt_point	*screen_pnt		/* @parm	<out> | 2D point in screen (pixel) space */
	);

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

	@fsfunc_t	

	@desc		Routine to convert screen (pixel) coordinates to homogenous coordinates.
				If plane == NULL, the 3D coordinate is a point on the current reference plane. 
				This is not supported for the FZ_VIEW_TYPE_PANORAMIC view type.

	@return		None

	@avail		5.0.0.0

	@see		

	@exfile		

	@toc	modl_view	

*********************************************************************************************************/
typedef fzrt_error_td  (FZRT_SPEC *fz_view_math_screen_2_homg_func)(
	fzrt_int					windex,			/* @parm	<in> | project window index */
	fzrt_point			*screen_pnt,	/* @parm	<in> | 2D point in screen (pixel) space */
	fz_map_plane_td 	*plane,			/* @parm	<in_opt> | plane to project point on (defaults to current plane if not provided) */
	fz_xyzw_td				*homg_pnt		/* @parm	<out> | 3D point in homogenous space */
	);


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

	@fsfunc_t

	@desc		Checks whether a view is picked. In addition, the picked parameter
				returns whether the coi or the eye or both are picked. For eye, bit
				1 (0x00000001) is set, for coi bit 2 (0x00000002) is set.

	@return		Error codes

	@avail		6.0.0.5

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view

*********************************************************************************************************/
typedef fzrt_error_td 	 (FZRT_SPEC *fz_view_get_pick_status_func)(
	fzrt_int						windex,		/* @parm <in> | project window index 						*/
	fz_view_ptr					view,		/* @parm <in> | the view for which to get the pick status	*/
	fzrt_int						*picked		/* @parm <out> | the bit encoded pick status of the view. 
															 bit 1 = eye is picked, bit 2 = coi is picked. 
															 No bits set = view is not picked 	*/
	);

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

	@fsfunc_t

	@desc		Sets the pick status of a view. If picked is passed as 0, the view
				is unpicked. The eye and coi can also be picked separately. 
				If the 1 bit is set (0x00000001) the eye is picked. If bit 2 is set 
				(0x00000002) the coi is picked.

	@return		Error codes

	@avail		6.0.0.5

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view

*********************************************************************************************************/
typedef fzrt_error_td 	 (FZRT_SPEC *fz_view_set_pick_status_func)(
	fzrt_int						windex,		/* @parm <in> | project window index 						*/
	fz_view_ptr					view,		/* @parm <in> | the view for which to set the pick status	*/
	fzrt_int						picked		/* @parm <in> | the bit encoded pick status of the view. 
															 bit 1 = set pick of eye, bit 2 = set pick of coi. 
															 not bits set = set view to not picked 	*/
	);

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

	@fsfunc_t

	@desc		Performs a pick action among the views of a project, based on the screen point
				passed in. This screen point is usually supplied by formZ in a click callback function
				such as the click function of a tool plugin. 
				Note, that if a view was clicked on with the screen point,
				the view may be picked or unpicked, based on the previous pick status of the view.
				If no view was picked, view will be passed back as NULL. If a valid
				view was picked or unpicked it is passed back. The api function 
				fz_view_get_pick_status can then be called to determine the pick status of
				the view.

	@return		Error codes

	@avail		6.0.0.5

	@exfile		<scdir>/Utilities | util_views.fsl

	@toc		modl_view

*********************************************************************************************************/
typedef fzrt_error_td 	 (FZRT_SPEC *fz_view_pick_func)(
	fzrt_int						windex,		/* @parm <in> | project window index 						*/
	fzrt_point					*screen_pnt,/* @parm <in> | the screen point where the mouse was clicked */
	fz_view_ptr					*view		/* @parm <out> | the view which was picked or unpicked by the mouse click */
	);

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

	@fset	fz_view_fset

	@desc	formZ modeling view management functions.

	@avail	5.0.0.0

	@toc	modl_view

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

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

	@fsdef	Model view function set id.

*********************************************************************************************************/
/* uuid : {7bda5eba-6c12-4548-947b-8ff1d882a741} */
#define FZ_VIEW_FSET_TYPE		"\x7b\xda\x5e\xba\x6c\x12\x45\x48\x94\x7b\x8f\xf1\xd8\x82\xa7\x41"	/* Reference : 59 */

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

	@fsdef	Model view function set name.

*********************************************************************************************************/
#define FZ_VIEW_FSET_NAME		"formZ view functions"

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

	@fsdef	Model view function set version.

*********************************************************************************************************/
#define FZ_VIEW_FSET_VERSION	FZPL_VERS_MAKE(6,5,5,0)

typedef struct fz_view_fset
{
	fzpl_fset_prvt_data_td				prvt_data;
	
	fz_view_get_count_func						fz_view_get_count;								/* @fsfunc */
	fz_view_tag_to_ptr_func					fz_view_tag_to_ptr;							/* @fsfunc */
	fz_view_ptr_to_tag_func					fz_view_ptr_to_tag;							/* @fsfunc */
	fz_view_get_next_func						fz_view_get_next;								/* @fsfunc */
	fz_view_get_prev_func						fz_view_get_prev;								/* @fsfunc */
	fz_view_find_func							fz_view_find;									/* @fsfunc */
	fz_view_new_window_func					fz_view_new_window;							/* @fsfunc */
	fz_view_new_camera_func					fz_view_new_camera;							/* @fsfunc */
	fz_view_new_animation_func_obsolete					fz_view_new_animation_obsolete;							/* fsfunc */
	fz_view_duplicate_func						fz_view_duplicate;								/* @fsfunc */
	fz_view_delete_func						fz_view_delete;								/* @fsfunc */
	fz_view_get_active_func					fz_view_get_active;							/* @fsfunc */
	fz_view_set_active_func					fz_view_set_active;							/* @fsfunc */
	fz_view_get_kind_func					fz_view_get_kind;							/* @fsfunc */
	fz_view_get_parm_data_func					fz_view_get_parm_data;							/* @fsfunc */
	fz_view_set_parm_data_func					fz_view_set_parm_data;							/* @fsfunc */
	fz_view_camera_get_parm_func				fz_view_camera_get_parm;						/* @fsfunc */
	fz_view_camera_set_parm_func				fz_view_camera_set_parm;						/* @fsfunc */
	fz_view_anim_get_parm_func_obsolete					fz_view_anim_get_parm_obsolete;							/* fsfunc */
	fz_view_anim_set_parm_func_obsolete					fz_view_anim_set_parm_obsolete;							/* fsfunc */
	fz_view_anim_vel_get_parm_func_obsolete				fz_view_anim_vel_get_parm_obsolete;						/* fsfunc */
	fz_view_anim_vel_set_parm_func_obsolete				fz_view_anim_vel_set_parm_obsolete;						/* fsfunc */
	fz_view_transform_func						fz_view_transform;								/* @fsfunc */

	fz_view_anim_keyf_get_current_func_obsolete		fz_view_anim_keyf_get_current_obsolete;	/* fsfunc */
	fz_view_anim_keyf_set_current_func_obsolete		fz_view_anim_keyf_set_current_obsolete;	/* fsfunc */
	fz_view_anim_keyf_get_num_func_obsolete			fz_view_anim_keyf_get_num_obsolete;		/* fsfunc */
	fz_view_anim_keyf_insert_func_obsolete			fz_view_anim_keyf_insert_obsolete;		/* fsfunc */
	fz_view_anim_keyf_delete_func_obsolete			fz_view_anim_keyf_delete_obsolete;		/* fsfunc */
	fz_view_anim_keyf_get_frame_time_func_obsolete	fz_view_anim_keyf_get_frame_time_obsolete;	/* fsfunc */

	fz_view_math_world_2_screen_func			fz_view_math_world_2_screen;					/* @fsfunc */
	fz_view_math_screen_2_world_func			fz_view_math_screen_2_world;					/* @fsfunc */
	fz_view_math_world_2_tform_func			fz_view_math_world_2_tform;					/* @fsfunc */
	fz_view_math_world_2_tform_clipped_func 	fz_view_math_world_2_tform_clipped;			/* @fsfunc */
	fz_view_math_tform_2_screen_func			fz_view_math_tform_2_screen;					/* @fsfunc */
	fz_view_math_screen_2_tform_func			fz_view_math_screen_2_tform;					/* @fsfunc */
	fz_view_math_tform_2_screen_xy_func			fz_view_math_tform_2_screen_xy;					/* @fsfunc */
	fz_view_math_screen_xy_2_tform_func			fz_view_math_screen_xy_2_tform;					/* @fsfunc */
	fz_view_math_world_2_homg_func				fz_view_math_world_2_homg;						/* @fsfunc */
	fz_view_math_world_2_homg_clipped_func 	fz_view_math_world_2_homg_clipped;				/* @fsfunc */
	fz_view_math_world_2_homg_get_mat_func		fz_view_math_world_2_homg_get_mat;				/* @fsfunc */
	fz_view_math_homg_2_screen_func			fz_view_math_homg_2_screen;					/* @fsfunc */
	fz_view_math_screen_2_homg_func			fz_view_math_screen_2_homg;					/* @fsfunc */
											
	fz_view_anim_vel_get_curve_pts_func_obsolete		fz_view_anim_vel_get_curve_pts_obsolete;				/* fsfunc */
	fz_view_anim_vel_set_curve_pts_func_obsolete		fz_view_anim_vel_set_curve_pts_obsolete;				/* fsfunc */
	fz_view_anim_get_path_pts_func_obsolete			fz_view_anim_get_path_pts_obsolete;					/* fsfunc */
	
	/************************************************************************************
	 *																					*
	 *		DO NOT MAKE ANY CHANGES TO THE ABOVE FUNCTIONS!!!							*
	 *		DO NOT ADD ANY FUNCTION ABOVE THIS LINE!!!									*
	 *		@comm  End of version 5.0.0.0 functions.									*
	 *																					*
	 ************************************************************************************/
		 
	fz_view_get_pick_status_func		fz_view_get_pick_status;		/* @fsfunc */
	fz_view_set_pick_status_func		fz_view_set_pick_status;		/* @fsfunc */
	fz_view_pick_func					fz_view_pick;					/* @fsfunc */
																				
	fz_view_copy_to_windex_func			fz_view_copy_to_windex;			/* @fsfunc */

}  fz_view_fset;																	
																					
#ifdef __cplusplus
}
#endif

#endif /*__FORMZ_VIEW_API_H */														
																					
																				