/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_TYPE_CORE_H
#define __FORMZ_TYPE_CORE_H

#include "fzpl_uuid_type.h"

#ifdef __cplusplus
extern "C" {
#endif


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

	FZ_USER_CANCEL


	Description
		Indicates the user canceled an operation.  This is a special error code 
		which indicates that the user canceled an operation.

	Availability	5.0.0.0

 ****************************************************************/
#define FZ_USER_CANCEL -999


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

	fz_xy_td


	Description
		Double precision 2D coordinate data type.

	Members
		x
			The x-axis coordinate value.
		y
			The y-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xy_td
{
	double	x;
	double	y;
} fz_xy_td;

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

	fz_xy_float_td


	Description
		Single precision 2D coordinate data type.

	Members
		x
			The x-axis coordinate value.
		y
			The y-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xy_float_td
{
	float	x;
	float	y;
} fz_xy_float_td;


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

	fz_xy_mm_td


	Description
		Double precision 2D bounding rectangle data type.  Defined as opposing corners 
		of an axis aligned rectangle.

	Members
		xmin
			The minimum x-axis coordinate value.
		ymin
			The minimum y-axis coordinate value.
		xmax
			The maximum x-axis coordinate value.
		ymax
			The maximum y-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xy_mm_td
{
	double	xmin;
	double	ymin;
	double	xmax;
	double	ymax;
} fz_xy_mm_td;

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

	fz_xyz_td


	Description
		Double precision 3D coordinate data type.

	Members
		x
			The x-axis coordinate value.
		y
			The y-axis coordinate value.
		z
			The z-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xyz_td
{
	double	x;
	double	y;
	double	z;
} fz_xyz_td;

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

	fz_xyz_float_td


	Description
		Single precision 3D coordinate data type.

	Members
		x
			The x-axis coordinate value.
		y
			The y-axis coordinate value.
		z
			The z-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xyz_float_td
{
	float	x;
	float	y;
	float	z;
} fz_xyz_float_td;

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

	fz_xyzw_td


	Description
		Double precision 4D coordinate data type.

	Members
		x
			The x-axis coordinate value.
		y
			The y-axis coordinate value.
		z
			The z-axis coordinate value.
		w
			The w-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xyzw_td
{
	double	x;
	double	y;
	double	z;
	double	w;
} fz_xyzw_td;

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

	fz_xyz_mm_td


	Description
		Double precision 3D bounding box data type.  Defined as opposing corners 
		of an axis aligned box.

	Members
		xmin
			The minimum x-axis coordinate value.
		ymin
			The minimum y-axis coordinate value.
		zmin
			The minimum z-axis coordinate value.
		xmax
			The maximum x-axis coordinate value.
		ymax
			The maximum y-axis coordinate value.
		zmax
			The maximum z-axis coordinate value.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_xyz_mm_td
{
	double	xmin;
	double	ymin;
	double	zmin;
	double	xmax;
	double	ymax;
	double	zmax;
} fz_xyz_mm_td;

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

	fz_plane_equ_td


	Description
		Double precision 3D plane equation data type.  The equation is of the form: 
		a*x + b*y + c*z + d = 0

	Members
		a
			The x coefficient.
		b
			The y coefficient.
		c
			The z coefficient.
		d
			The offset.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_plane_equ_td
{
	double		a;
	double		b;
	double		c;
	double		d;
} fz_plane_equ_td;

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

	fz_mat4x4_td


	Description
		4 x 4 matrix data type.

	Members
		fields[4][4]
			The matrix elements.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_mat4x4_td
{
	double 	fields[4][4];
} fz_mat4x4_td;

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

	fz_mat3x3_td


	Description
		4 x 4 matrix data type.

	Members
		fields[3][3]
			The matrix elements.

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_mat3x3_td
{
	double 	fields[3][3];
} fz_mat3x3_td;

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

	fz_map_plane_td


	Description
		Map plane data type.

	Members
		pts[4]
			Origin and axis points.
		pquat[3]
			Plane equations of 3 planes in world space.
		world_mat
			Matrix to convert from plane to world cords

	Availability	5.0.0.0

 ****************************************************************/
typedef struct fz_map_plane_td {
	fz_xyz_td			pts[4];
	fz_plane_equ_td		pquat[3];
	fz_mat4x4_td		world_mat;
} fz_map_plane_td;


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

	fz_iost_ptr


	Description
		formZ IO stream type

	Availability	5.0.0.0


	See Also
		fz_iost_file_open_write, fz_iost_file_open_read

 ****************************************************************/
typedef struct fz_iost_td 		*fz_iost_ptr;

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

	fz_tag_td


	Description
		formZ tag type. A tag is usually associated with an entity such as an 
		object or a light. A tag is persistent. That is, a plugin or script may 
		store a tag permanently and will always be able to find the associated 
		entity from a given tag (assuming the entity hasn't been deleted in the 
		meantime). Many formZ API functions return and take pointers to entities. 
		These pointers are not persistent past the runtime session of formZ. 
		Utility functions are provided to return the entity pointer from a tag 
		and vice versa.

	Members
		uuid
			unique identifier for the tag

	Availability	5.0.0.0


	See Also
		fz_tag_new

 ****************************************************************/
typedef struct fz_tag_td
{	fzrt_UUID_td 	uuid;
} fz_tag_td;

#ifdef __cplusplus
}
#endif

#endif

