/* ***********************************************************************************/
/* * "a3x_intn.h"																	**/
/* * Written by :	Sébastien Rubens												**/
/* * Tabulations :	4 char															**/
/* ***********************************************************************************/
#ifndef A3X_INTN_H
#define A3X_INTN_H
 
 
#define C_uwAnimNotInterpolated		0xFFFF
 
 
#ifndef	A3X_INTN_C
/* ***********************************************************************************/
/*													Interpolations computations*/
extern	void		fn_v_CalculateGeneral(	tdstAnim3d		*_p_stAnim3d,
											unsigned long	_ulFrame );
extern	tdstEvent	*fn_v_GetEventsAddress(	tdstAnim3d		*_p_stAnim3d,
											unsigned long	_ulFrame,
											tdxHandleToObjectsTablesList _h_ObjectsTablesListElement);/*AR9809 Parameter necessary for U64*/
extern	tdstFrame3d	*fn_p_GetFramesAddress(	tdstAnim3d		*_p_stAnim,
											unsigned short	_uwNumFrame,
											unsigned long	_ulFrame,
											void			*p_stSuperObject );
 
/* ****************************************************************** fn_vUpdateFrame*/
/* Update Frame structure if it wasn't - but matrix isn't update*/
/*		Set Linear and Angular Speed (Alloc or Free Matrix) */
/*		Set Hierarchy*/
/*		Fill Element3D Array : ElementNuber,ElementType,ActiveStatus,ChannelNumber*/
/* */
/* 17/07/98 - Carlos Torres*/
/* ***********************************************************************************/
extern void fn_vUpdateFrame(void * _p_stSuperObject,
							tdstFrame3d * _p_stFrame,
							tdstAnim3d * _p_stAnim3d,
							unsigned short _uwFrame);
 
/* ************************************************************ fn_vUpdateFrameMatrix*/
/* Update Frame if it wasn't update*/
/* And Update Matrix in Channel Array */
/*		if they weren't updated*/
/*		or if bolean ForceUpdate is TRUE*/
/* */
/* 17/07/98 - Carlos Torres*/
/* ***********************************************************************************/
extern void fn_vUpdateFrameMatrix(void * _p_stSuperObject,
								  tdstFrame3d * _p_stFrame,
								  tdstAnim3d * _p_stAnim3d,
								  unsigned short _uwFrame,
								  unsigned char ucForceUpdate,
								  tdstAChannel * d_stChannelArray);
 
/* ****************************************************** fn_p_stGetLinearSpeedVector*/
/* Return the Linear Speed Vector */
/* the vector returned is a reference so*/
/*		DON'T Modify it or Free it*/
/* if there is no speed, return NULL*/
/* reference remain valid until animation is free*/
/* */
/* 20/07/98 - Carlos Torres*/
/* ***********************************************************************************/
extern MTH3D_tdstVector *  fn_p_stGetLinearSpeedVector(tdstAnim3d * _p_stAnim3d,unsigned short _uwFrame);
 
/* ***************************************************** fn_p_stGetAngularSpeedMatrix*/
/* Return the Angular Speed Matrix */
/* Fill the Matrix if exist and return pointer */
/* If no angular speed return NULL*/
/*		The matrix pass in parameter must be allocate by the calling function*/
/* */
/* 20/07/98 - Carlos Torres*/
/* ***********************************************************************************/
extern MTH3D_tdstMatrix *  fn_p_stGetAngularSpeedMatrix(tdstAnim3d * _p_stAnim3d,
														unsigned short _uwFrame,
														MTH3D_tdstMatrix * p_stMatrix);
 
#ifdef U64
/*AR9902 Function to get the hierarchy couples of an animation even if it isn't loaded into the cache anymore*/
extern tdstCouple* fn_p_stGetOldHieCouples(tdstAnim3d *p_stOldAnim,
									unsigned short uwOldFrameNumber);
#endif /*U64*/
#endif
 
#endif
