/****************************************************************************/
/*  FILE: HND_DataType.h                                                    */
/*                                                                          */
/*  2004/06/24 Created                                                      */
/*  Copyright (C)SEGA 2004/Creative Center. Graphics Tool Section.          */
/****************************************************************************/

#ifndef __HND_DATATYPE_H
#define __HND_DATATYPE_H

#include "HND_Xpt.h"

/* HND Data Type ************************************************************/

#ifdef __cplusplus

typedef struct _HNS_F2D {
	union {
		union {
			Float			xy[HND_XY];
			Float			uv[HND_UV];
		};
		struct{
			union {
				Float		x;
				Float		u;
			};
			union {
				Float		y;
				Float		v;
			};
		} part;
	};
} HNS_UV, HNS_F2D;

typedef struct _HNS_I2D{
	union {
		union {
			Sint32			xy[HND_XY];
			Sint32			uv[HND_UV];
		};
		struct{
			union {
				Sint32		x;
				Sint32		u;
			};
			union {
				Sint32		y;
				Sint32		v;
			};
		} part;
	};
} HNS_I2D;

typedef struct _HNS_F3D {
	union {
		union {
			Float			xyz[HND_XYZ];
			Float			rgb[HND_RGB];
			Float			uvw[HND_UVW];
		};
		struct{
			union {
				Float		x;
				Float		r;
				Float		u;
			};
			union {
				Float		y;
				Float		g;
				Float		v;
			};
			union {
				Float		z;
				Float		b;
				Float		w;
			};
		} part;
	};
} HNS_XYZ, HNS_UVW, HNS_FRGB, HNS_F3D;

typedef struct _HNS_I3D {
	union {
		union {
			Sint32			xyz[HND_XYZ];
			Sint32			rgb[HND_RGB];
			Sint32			uvw[HND_UVW];
		};
		struct{
			union {
				Sint32		x;
				Sint32		r;
				Sint32		u;
			};
			union {
				Sint32		y;
				Sint32		g;
				Sint32		v;
			};
			union {
				Sint32		z;
				Sint32		b;
				Sint32		w;
			};
		} part;
	};
} HNS_I3D;

typedef struct _HNS_F4D {
	union {
		union {
			Float			xyzw[HND_XYZW];
			Float			rgba[HND_RGBA];
		};
		struct{
			union {
				Float		x;
				Float		r;
			};
			union {
				Float		y;
				Float		g;
			};
			union {
				Float		z;
				Float		b;
			};
			union {
				Float		w;
				Float		a;
			};
		} part;
	};
} HNS_XYZW, HNS_FRGBA, HNS_F4D;

typedef struct _HNS_I4D {
	union {
		union {
			Sint32			xyzw[HND_XYZW];
			Sint32			rgba[HND_RGBA];
		};
		struct{
			union {
				Sint32		x;
				Sint32		r;
			};
			union {
				Sint32		y;
				Sint32		g;
			};
			union {
				Sint32		z;
				Sint32		b;
			};
			union {
				Sint32		w;
				Sint32		a;
			};
		} part;
	};
} HNS_I4D;

#else // __cplusplus

typedef union _HNS_F2D {
	Float			xy[HND_XY];
	struct{
		Float		x;
		Float		y;
	} part;
} HNS_UV, HNS_F2D;

typedef union _HNS_I3D {
	Sint32			xyz[HND_XYZ];
	struct {
		Sint32		x;
		Sint32		y;
		Sint32		z;
	} part;
} HNS_I3D;

typedef union _HNS_F3D {
	Float			xyz[HND_XYZ];
	struct {
		Float		x;
		Float		y;
		Float		z;
	} part;
} HNS_XYZ, HNS_F3D;

typedef union _HNS_I4D {
	Sint32			xyzw[HND_XYZW];
	struct {
		Sint32		x;
		Sint32		y;
		Sint32		z;
		Sint32		w;
	} part;
} HNS_I4D;

typedef union _HNS_F4D {
	Float			xyzw[HND_XYZW];
	struct {
		Float		x;
		Float		y;
		Float		z;
		Float		w;
	} part;
} HNS_XYZW, HNS_F4D;

typedef union _HNS_FRGB {
	Float			rgb[HND_RGB];
	struct {
		Float		r;
		Float		g;
		Float		b;
	} part;
} HNS_FRGB;

typedef union _HNS_FRGBA{
	Float			rgba[HND_RGBA];
	struct{
		Float		r;
		Float		g;
		Float		b;
		Float		a;
	} part;
} HNS_FRGBA;

#endif // __cplusplus

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

#endif // __HND_DATATYPE_H
