/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DESCRIPTION :
~~~~~~~~~~~
        THIS IS AN EXAMPLE OF ACP HEADER FILES 
 
For a given file <HeaderName>.h, all occurences of the string HEADERNAME 
must be replaced with the string <HeaderName>.   
For a given module, all occurences of the string MODULETAG must be replaced 
with the CPA tag of the module (GLI, MTH ...) .
You must do : 
#define MODULETAG_GLOBALS 
in one (and only one) .c file of your Module.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
 
/* To avoid unnecessary includes :  */
#ifndef __GEO_ELEMENT_H
#define __GEO_ELEMENT_H
 
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
 
 
/* For DLLs who are using this module : */ 
#undef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
 #define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
 #define CPA_EXPORT __declspec(dllexport)
#else
 #define CPA_EXPORT
#endif
 
 
/* For Global declaration in C files : */
#ifdef GEO_GLOBALS
 #define __GEO_EXTERN extern
#else /* !GEO_GLOBALS */
 #define __GEO_EXTERN
#endif /* !GEO_GLOBALS */
 
/*
-----------------------------------------------------------------------------
INCLUDES FILES :
Include here any other header files of your module you need !
Ex : 
Note : Do Not include header files from other Modules (do this in C files 
only)
-----------------------------------------------------------------------------
*/
 
#include "ErrGEO.h"
#include "MmgGEO.h"
#include "color.h"
#include "fmd.h"
/*#include "GeoObj.h"*/
#include "MEC/hMecMatC.h"
#include "gmt.h"
 
/*
-----------------------------------------------------------------------------
CONSTANT DECLARATION:
Ex :
#define MODULETAG_C_LMAX 100
-----------------------------------------------------------------------------
*/
 
/* ELEMENTS */
#define GEO_C_xElementNULL								0
#define GEO_C_xElementIndexedTriangles		1
//XB99/04/27
#ifndef U64
#define GEO_C_xElementFaceMapDescriptors  2
#endif U64
//End XB99/04/27
#define GEO_C_xElementSprites							3
//XB99/04/27
#ifndef U64
#define GEO_C_xElementTMeshes							4
#endif U64
//End XB99/04/27
#define GEO_C_xElementPoints							5
#define GEO_C_xElementLines								6
#define GEO_C_xElementSpheres             7
#define GEO_C_xElementAlignedBoxes        8
#define GEO_C_xElementCones								9
 
//XB99/04/27
#ifndef U64
#define GEO_C_xElementAltimap							11
#endif U64
//End XB99/04/27
 
/* Oliv' - 01/04/1998*/
/* ATTENTION : more defines in Specif folder.*/
/* ====>	ATTENTION : GEO_C_xElement??????? numbers start at 128 for Specif elements !!!!!     <====*/
/* EndOfOliv'*/
 
#define MeshFunctionSwap 0xFFFF
#define MeshFunctionEnd  0xFFFE
 
#ifdef USE_ALTIMAPS
/*----------------------------------------------------*/
/*										ALTIMAPS*/
/*----------------------------------------------------*/
 
 
/* Direction of splitting one basic square into two triangles */
#define GEO_C_xAltiSquareSplitTLBR		1		/* from TOP-LEFT to BOTTOM-RIGHT */
#define GEO_C_xAltiSquareSplitBLTR		2		/* from BOTTOM-LEFT to TOP-RIGHT */
/* Same definition but in the other direction (TLBR == BRTL ) */
#define GEO_C_xAltiSquareSplitBRTL		GEO_C_xAltiSquareSplitTLBR
#define GEO_C_xAltiSquareSplitTRBL		GEO_C_xAltiSquareSplitBLTR
 
/* ------------  Identification of triangles --------------------------------------
 
TL	_____      _____    	_____      _____    	_____   	 _____      _____  TR
   |     |    |\xxxx|    |\    |    |\xxxx|    |xxxx/|    |    /|    |xxxx/|
   |     |    |  \xx|    |xx\  |    |xx\xx|    |xx/  |    |  /xx|    |xx/xx|
   |     |    |    \|    |xxxx\|    |xxxx\|    |/    |    |/xxxx|    |/xxxx|
BL '-----'    '-----'    '-----'    '-----'    '-----'    '-----'    '-----' BR
 
		0						1					2					3						4						8					12
 
We have to assume that he vertices are given in a specific order in .MOD files
They must follow this rule :
			- numrotation begins from 0, at the (0, 0) relatives coordinates
			- numerotation if done horizontally first, from left to right.
			- At the end of the horiz. line, we start a new line one step higher
				and from left to right again.
 
					6     7     8
					 ,---------.
					 |    |    |
					3+----4----+5
					 |    |    |
					 '---------'
					0     1     2
	
-------------------------------------------------------------------------------- */
#define GEO_C_xAltiSquareVoid					0
#define GEO_C_xAltiSquareTopRight			1
#define GEO_C_xAltiSquareBottomLeft		2
#define GEO_C_xAltiSquareBothTRBL			3
#define GEO_C_xAltiSquareBothBLTR			GEO_C_xAltiSquareBothTRBL
#define GEO_C_xAltiSquareTopLeft			4
#define GEO_C_xAltiSquareBottomRight	8
#define GEO_C_xAltiSquareBothTLBR			12
#define GEO_C_xAltiSquareBothBRTL			GEO_C_xAltiSquareBothTLBR
 
/*----------------------------------------------------*/
#endif /*USE_ALTIMAPS*/
 
 
 
 
/*
-----------------------------------------------------------------------------
TYPES DEFINITION : 
Declare here any type you need, and constant you need to do this :
Ex :              typedef struct MODULETAG_tdstToto_
{
        long aLMAX_lBuffer[MODULETAG_C_LMAX];
    ...
} MODULETAG_tdst_Toto ;
-----------------------------------------------------------------------------
*/
 
typedef struct GEO_tdstTripledIndex_
{
        ACP_tdxIndex a3_xIndex[3];
        /*ACP_tdxIndex xA;
        ACP_tdxIndex xB;
        ACP_tdxIndex xC;*/
}
GEO_tdstTripledIndex ;
/*typedef struct ACP_tdxHandleOfMaterial_
{
	ACP_tdxHandleOfMaterial hMat;
}
ACP_tdxHandleOfMaterial ;*/
 
typedef struct GEO_tdstDoubledIndex_
{
        ACP_tdxIndex a2_xIndex[2];
}
GEO_tdstDoubledIndex ;
 
#ifndef D_THROW_COMPLEX_SPRITE
typedef struct GEO_tdstIndexedSprite_
{
        ACP_tdxHandleOfSprite   hSprite;
        MTH2D_tdstVector        stSize;
/* ANNECY JMD {*/
				MTH3D_tdstVector				stAxe ;
				ACP_tdst2DUVValues			stUVpos ;
				ACP_tdst2DUVValues			stUVsize ;
/*END ANNECY JMD }*/
        ACP_tdxIndex			xCenterPoint;
} GEO_tdstIndexedSprite;
#endif /* D_THROW_COMPLEX_SPRITE */
 
#ifndef D_THROW_COMPLEX_SPRITE
typedef struct GEO_tdstElementSprite_
{
        GEO_tdstIndexedSprite   *d_stListOfSprites;
/* ANNECY MT 20/02/98 {*/
        ACP_tdxIndex            xNbSprites;
		ACP_tdxIndex			xIndexOfParallelBox;
/* ANNECY MT }*/
		/*ANNECY VL PRT 18/03/98{*/
		char					cFastDraw;
		/*ENDANNECY VL}*/
} GEO_tdstElementSprite;
#else
	typedef struct GEO_tdstElementSprite_
	{
		ACP_tdxHandleOfMaterial		hVisualMaterial ;
		MTH2D_tdstVector					stSizeOfSprite;
		ACP_tdxIndex							xIndexOfParallelBox;
		ACP_tdxIndex							xCenterPoint;
		short											xSpriteDrawMode;
	} GEO_tdstElementSprite;
#endif /* D_THROW_COMPLEX_SPRITE */
 
typedef struct GEO_tdstElementIndexedTriangles_
{
  GMT_tdxHandleToGameMaterial	hMaterial;
  ACP_tdxIndex					xNbFaces;
  ACP_tdxIndex					xNbElementUV;
  GEO_tdstTripledIndex			*d_stListOfFacesTripled;
  GEO_tdstTripledIndex			*d_stListOfFacesTripledIndexUV;
  MTH3D_tdstVector				*d_stListOfFacesNormals;
/*GEO_tdstColor					*d_stListOfFacesReceivedLightIntensity;*/
  ACP_tdst2DUVValues			*d_stListOfElementUV;
 
  ACP_tdxIndex					*d_stListOfIndexUsedByThisElement;
/* ANNECY MT 20/02/98 {*/
  ACP_tdxIndex					xNumberOfIndexsUsed;
		ACP_tdxIndex			xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementIndexedTriangles ;
 
 
typedef struct GEO_tdstFaceMapTriangle_
{
        GEO_tdstTripledIndex stFaceTripled;
        ACP_tdxHandleOfFMD   hFaceMapDescriptor;
} GEO_tdstFaceMapTriangle;
 
typedef struct GEO_tdstElementFaceMapDescriptors_
{
        ACP_tdxIndex            xNbFaces;
        GEO_tdstFaceMapTriangle *d_stListOfFacesQuadrupled;
        MTH3D_tdstVector        *d_stListOfFacesNormals;
/*      GEO_tdstColor			*d_stListOfFacesReceivedLightIntensity;*/
/* ANNECY MT 20/02/98 {*/
		ACP_tdxIndex			xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementFaceMapDescriptors;
 
typedef struct GEO_tdstElementTMeshes_
{
/*    ACP_tdxHandleOfMaterial hMaterial;*/
		GMT_tdxHandleToGameMaterial		hMaterial;
        ACP_tdxIndex                    xNbMeshAtoms;
        ACP_tdxIndex                    xNbFaces;
        ACP_tdxIndex                    xNbUV;
        ACP_tdxIndex                    *d_stListOfMeshAtoms;
        MTH3D_tdstVector                *d_stListOfFacesNormals;
/*      GEO_tdstColor					*d_stListOfFacesReceivedLightIntensity;*/
		ACP_tdst2DUVValues				*d_stListOfElementUV;
/* ANNECY MT 20/02/98 {*/
		ACP_tdxIndex					xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementTMeshes;
 
typedef struct GEO_tdstElementPoints_
{
		MTH_tdxReal					xFatness;
		ACP_tdxIndex                *d_xListOfPointIndex;
/*      ACP_tdxHandleOfMaterial		hMaterial;*/
		GMT_tdxHandleToGameMaterial	hMaterial;
/* ANNECY MT 20/02/98 {*/
		ACP_tdxIndex                xNbPoints;
		ACP_tdxIndex				xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementPoints;
 
typedef struct GEO_tdstElementLines_
{
  MTH_tdxReal					xThickness;
  GEO_tdstDoubledIndex			*d_stListOfLineIndex;
/*ACP_tdxHandleOfMaterial		*d_hListOfLinesMaterial;*/
  GMT_tdxHandleToGameMaterial	*d_hListOfLinesMaterial;
  GEO_tdstColor					*d_stListOfLinesReceivedLightIntensity;
/* ANNECY MT 20/02/98 {*/
  ACP_tdxIndex					xNbLines;
  ACP_tdxIndex					xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementLines;
 
typedef struct GEO_tdstIndexedSphere_
{
        MTH_tdxReal                 xRadius;
/*      ACP_tdxHandleOfMaterial		hMaterial;*/
		GMT_tdxHandleToGameMaterial hMaterial;
        ACP_tdxIndex				xCenterPoint;
} GEO_tdstIndexedSphere;
 
typedef struct GEO_tdstElementSpheres_
{
        GEO_tdstIndexedSphere   *d_stListOfSpheres;
/* ANNECY MT 20/02/98 {*/
        ACP_tdxIndex            xNbSpheres;
		ACP_tdxIndex			xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementSpheres;
 
typedef struct GEO_tdstIndexedAlignedBox_
{
        ACP_tdxIndex                xMinPoint;
        ACP_tdxIndex                xMaxPoint;
/*      ACP_tdxHandleOfMaterial		hMaterial;*/
		GMT_tdxHandleToGameMaterial hMaterial;
} GEO_tdstIndexedAlignedBox;
 
typedef struct GEO_tdstElementAlignedBoxes_
{
        GEO_tdstIndexedAlignedBox   *d_stListOfAlignedBoxes;
/* ANNECY MT 20/02/98 {*/
        ACP_tdxIndex                xNbAlignedBoxes;
		ACP_tdxIndex				xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementAlignedBoxes;
 
typedef struct GEO_tdstIndexedCone_
{
        ACP_tdxIndex                xTopPoint;
        ACP_tdxIndex                xBasePoint;
        MTH_tdxReal                 xBaseRadius;
/*      ACP_tdxHandleOfMaterial		hMaterial;*/
		GMT_tdxHandleToGameMaterial hMaterial;
} GEO_tdstIndexedCone;
 
typedef struct GEO_tdstElementCones_
{
        GEO_tdstIndexedCone	*d_stListOfCones;
/* ANNECY MT 20/02/98 {*/
        ACP_tdxIndex        xNbCones;
		ACP_tdxIndex		xIndexOfParallelBox;
/* ANNECY MT }*/
} GEO_tdstElementCones;
 
 
#ifdef USE_ALTIMAPS
/*----------------------------------------------------*/
/*                    ALTIMAPS*/
/*----------------------------------------------------*/
 
/* --- Square descripton for an Altimap --- */
typedef struct GEO_tdstAltimapSquare_
{
  ACP_tdxIndex            xFaceIndex;           /* Contains the index of the first square's face in the map arrays */
  unsigned char           ucType;               /* Contains the identification type for a square */
} GEO_tdstAltimapSquare;
 
 
/* --- Properties of an Altimap triangle --- */
typedef struct GEO_tdstAltimapFace_
{
  MTH3D_tdstVector              stNormal;       /* Normal vector of the face */
  ACP_tdxIndex                  xUVIndex[3];    /* Index of UV values of the face */
  unsigned char                 ucMatIndex;     /* Index of the right Handle of Game Material for this face */
} GEO_tdstAltimapFace;
 
 
/* --- Element Altimap --- */
typedef struct GEO_tdstElementAltimap_
{ 
  MTH3D_tdstVector            stOrigin;             /* position of the Bottom-Left cornet in the scene */
  MTH_tdxReal                 xDeltaX;              /* width of an altimap square */
  MTH_tdxReal                 xDeltaY;              /* height of an altimap square */
  ACP_tdxIndex                xWidth;               /* number of squares for X axis */
  ACP_tdxIndex                xDepth;               /* number of squares for Y axis */
  ACP_tdxIndex                xNbFaces;             /* number of visible triangles */
  ACP_tdxIndex                xNbUVValues;          /* number of UV Values stored in the Altimap */
  MTH_tdxReal                 * d_xHeight;          /* Array for the height of the map's vertices */
  MTH3D_tdstVector            * d_stPointNormals;   /* Array containing the normal vector of vertices */
  ACP_tdst2DUVValues          * d_stUVValues;       /* Array with the different UV values for the altimap */
  GEO_tdstAltimapFace         * d_stFaces;          /* Array describing the attributes of each face */
  GEO_tdstAltimapSquare       * d_stSquare;         /* Array with the description of the squares */
  GMT_tdxHandleToGameMaterial * d_hMaterial;        /* Array of handles of Game Materials for the faces */
  ACP_tdxIndex                xNbMaterials;         /* number of handles to game materials stored */
} GEO_tdstElementAltimap;
 
/*----------------------------------------------------*/
#endif /*USE_ALTIMAPS*/
 
 
 
 
/*
-----------------------------------------------------------------------------
GLOBAL VARIABLE DECLARATION :
Ex : 
__MODULETAG_EXTERN <type> <variable name>
 #ifdef MODULETAG_GLOBALS
 = <initial values>
 #endif
 ;
-----------------------------------------------------------------------------
*/
 
/*
-----------------------------------------------------------------------------
PUBLIC FUNCTIONS DECLARATION:
Ex : 
extern CPA_EXPORT void MODULETAG_fn_vMyPublicFunction(void); 
Note : Public functions declaration must be done in PUBLIC HEADER files (.h)
in your Inc directory
-----------------------------------------------------------------------------
*/
 
/*----------------------------------------------------*/
/*											   SPRITES*/
/*----------------------------------------------------*/
#ifndef _FIRE_DEADCODE_U64_
extern CPA_EXPORT void
GEO_vCreateElementSprite (								   ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement *p_hElement ,
                                                           ACP_tdxIndex xNbSprites);
#endif /* _FIRE_DEADCODE_U64_ */
 
#ifndef _FIRE_DEADCODE_U64_
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementSprite*
GEO_p_stAllocElementSprite (							   ACP_tdxIndex xNbSprites );
/* END ANNECY MT }*/
#endif /* _FIRE_DEADCODE_U64_ */
 
extern CPA_EXPORT void
GEO_vSetSizeOfIndexedSprite (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           MTH2D_tdstVector *p_stSize);
 
extern CPA_EXPORT void
GEO_vGetSizeOfIndexedSprite (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           MTH2D_tdstVector *p_stSize);
 
extern CPA_EXPORT void
GEO_vSetCenterPointOfIndexedSprite(
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           ACP_tdxIndex xCenterPoint);
 
extern CPA_EXPORT void
GEO_vGetCenterPointOfIndexedSprite (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           ACP_tdxIndex *p_xCenterPoint);
 
extern CPA_EXPORT void
GEO_vSetHandleOfIndexedSprite (
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           ACP_tdxHandleOfSprite hSprite);
 
extern CPA_EXPORT void
GEO_vGetHandleOfIndexedSprite (
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfSprite,
                                                           ACP_tdxHandleOfSprite *p_hSprite);
/*ANNECY JMD {*/
extern CPA_EXPORT
void GEO_vSetConstraintOfIndexedSprite ( ACP_tdxHandleOfObject hObject, 
																				 ACP_tdxHandleOfElement hElement,
																				 ACP_tdxIndex xIndexOfSprite,
																				 MTH3D_tdstVector *p_stAxe) ;
extern CPA_EXPORT
void GEO_vSetUVOfIndexedSprite ( ACP_tdxHandleOfObject hObject, 
																 ACP_tdxHandleOfElement hElement,
																 ACP_tdxIndex xIndexOfSprite,
																 ACP_tdst2DUVValues *p_stUVpos,
																 ACP_tdst2DUVValues *p_stUVsize) ;
/*END ANNECY JMD }*/
 
/*----------------------------------------------------*/
/*									 INDEXED TRIANGLES*/
/*----------------------------------------------------*/
extern CPA_EXPORT void
GEO_vCreateElementIndexedTriangles (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement *p_hElement ,
                                                           ACP_tdxIndex xNbFaces,
                                                           ACP_tdxIndex xNbElementUV);
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementIndexedTriangles*
GEO_p_stAllocElementIndexedTriangles (					   ACP_tdxIndex xNbFaces,
                                                           ACP_tdxIndex xNbElementUV);
/* END ANNECY MT }*/
 
 
extern CPA_EXPORT void
GEO_vSetIndexedUVOfFaceOfIndexedTriangles (     
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex xUV1,
                                                           ACP_tdxIndex xUV2,
                                                           ACP_tdxIndex xUV3);
 
 
extern CPA_EXPORT void
GEO_vSetReceivedLightIntensityOfFaceOfIndexedTriangles (        
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
 
 
extern CPA_EXPORT void
GEO_vSetNormalOfIndexedTrianges (       
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
 
 
 
extern CPA_EXPORT void
GEO_vSetUVOfIndexedTriangles (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfUV,
                                                           ACP_tdst2DUVValues *p_stUV);
 
extern CPA_EXPORT void
GEO_vGetUVOfIndexedTriangles (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfUV,
                                                           ACP_tdst2DUVValues *p_stUV);
 
extern CPA_EXPORT void
GEO_vSetMaterialOfIndexedTriangles (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxHandleOfMaterial hMaterial);
 
 
 
extern CPA_EXPORT void
GEO_vSetFaceOfIndexedTriangles (
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex xPoint1,
                                                           ACP_tdxIndex xPoint2,
                                                           ACP_tdxIndex xPoint3);
 
extern CPA_EXPORT void
GEO_vGetFaceOfIndexedTriangles (        
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex *p_xPoint1,
                                                           ACP_tdxIndex *p_xPoint2,
                                                           ACP_tdxIndex *p_xPoint3);
 
 
extern CPA_EXPORT void
GEO_vGetIndexedUVOfFaceOfIndexedTriangles (     
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex *p_xUV1,
                                                           ACP_tdxIndex *p_xUV2,
                                                           ACP_tdxIndex *p_xUV3);
 
extern CPA_EXPORT void
GEO_vGetColorOfFaceOfIndexedTriangles ( 
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
 
 
 
extern CPA_EXPORT void
GEO_vGetNormalOfIndexedTrianges (       
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
 
extern CPA_EXPORT long
GEO_lGetIndexedTriangleNbFaces(ACP_tdxHandleOfObject hobj ,ACP_tdxHandleOfElement helem ) ;
 
extern CPA_EXPORT void
GEO_vGetMaterialOfIndexedTriangles (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxHandleOfMaterial *p_hMaterial);
extern CPA_EXPORT void
GEO_vSetGameMaterialOfIndexedTriangles (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           GMT_tdxHandleToGameMaterial hMaterial);
 
extern CPA_EXPORT void
GEO_vGetGameMaterialOfIndexedTriangles (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           GMT_tdxHandleToGameMaterial *p_hMaterial);
 
 
/*----------------------------------------------------*/
/*								   FACE MAP DESCRIPTOR*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_xCreateElementFaceMap (     
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement *p_hElement ,
                                                           ACP_tdxIndex xNbFaces);
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementFaceMapDescriptors*
GEO_p_stAllocElementFaceMap (							   ACP_tdxIndex xNbFaces );
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_xSetFaceOfElementFaceMap (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex xPoint1,
                                                           ACP_tdxIndex xPoint2,
                                                           ACP_tdxIndex xPoint3,
                                                           ACP_tdxHandleOfFMD hFaceMapDescriptor);
 
extern CPA_EXPORT void 
GEO_xGetFaceOfElementFaceMap (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           ACP_tdxIndex *p_xPoint1,
                                                           ACP_tdxIndex *p_xPoint2,
                                                           ACP_tdxIndex *p_xPoint3,
                                                           ACP_tdxHandleOfFMD *p_hFaceMapDescriptor);
 
extern CPA_EXPORT void 
GEO_xSetNormalOfFaceOfElementFaceMap (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
 
extern CPA_EXPORT void 
GEO_xGetNormalOfFaceOfElementFaceMap (  
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
 
extern CPA_EXPORT void 
GEO_xSetColorOfFaceOfElementFaceMap (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
extern CPA_EXPORT void 
GEO_xGetColorOfFaceOfElementFaceMap (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
/*----------------------------------------------------*/
/*											   TMESHES*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_xCreateElementTMesh (       
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement *p_hElement ,
                                                           ACP_tdxIndex xNumberOfMeshAtoms ,
                                                           ACP_tdxIndex xNumberOfUV ,
                                                           ACP_tdxIndex xNumberOfFaces);
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementTMeshes*
GEO_p_stAllocElementTMeshes (							   ACP_tdxIndex xNumberOfMeshAtoms ,
                                                           ACP_tdxIndex xNumberOfUV ,
                                                           ACP_tdxIndex xNumberOfFaces);
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_xSetAtomOfElementTMesh (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfMeshAtom,
                                                           ACP_tdxIndex xMeshAtom);
 
extern CPA_EXPORT void 
GEO_xGetAtomOfElementTMesh (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfMeshAtom,
                                                           ACP_tdxIndex *p_xMeshAtom);
 
extern CPA_EXPORT void 
GEO_xSetUVOfAtomOfElementTMesh (        
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfMeshAtom,
                                                           ACP_tdst2DUVValues *p_stUV);
 
extern CPA_EXPORT void 
GEO_xGetUVOfAtomOfElementTMesh (        
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfMeshAtom,
                                                           ACP_tdst2DUVValues *p_stUV);                                                    
 
extern CPA_EXPORT void 
GEO_xSetNormalOfFaceOfTMesh (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
                                                           
extern CPA_EXPORT void 
GEO_xGetNormalOfFaceOfTMesh (   
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           MTH3D_tdstVector *p_stNormal);
 
extern CPA_EXPORT void 
GEO_xSetColorOfFaceOfTMesh (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
extern CPA_EXPORT void 
GEO_xGetColorOfFaceOfTMesh (    
                                                           ACP_tdxHandleOfObject hObject , 
                                                           ACP_tdxHandleOfElement hElement ,
                                                           ACP_tdxIndex xIndexOfFace,
                                                           GEO_tdstColor *p_stReceivedLightIntensity);
 
/*----------------------------------------------------*/
/*												POINTS*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_xCreateElementPoints (      ACP_tdxHandleOfObject hObject , 
                            ACP_tdxHandleOfElement *p_hElement ,
                            ACP_tdxIndex xNumberOfPoints);
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementPoints*
GEO_p_stAllocElementPoints (	ACP_tdxIndex xNumberOfPoints);
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_xSetFatnessOfElementPoints (ACP_tdxHandleOfObject hObject , 
                                ACP_tdxHandleOfElement hElement ,
                                MTH_tdxReal xFatness);
 
extern CPA_EXPORT MTH_tdxReal 
GEO_xGetFatnessOfElementPoints (ACP_tdxHandleOfObject hObject , 
                                ACP_tdxHandleOfElement hElement );
 
extern CPA_EXPORT ACP_tdxIndex 
GEO_xGetIndexOfElementPoints (ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfPoint);
 
extern CPA_EXPORT void 
GEO_xSetIndexOfElementPoints (ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfPoint,
                              ACP_tdxIndex xIndexOfPoint);
 
extern CPA_EXPORT ACP_tdxHandleOfMaterial 
GEO_xGetMaterialOfElementPoints (ACP_tdxHandleOfObject hObject,
                                 ACP_tdxHandleOfElement hElement);
 
extern CPA_EXPORT void 
GEO_xSetMaterialOfElementPoints (ACP_tdxHandleOfObject hObject,
                                 ACP_tdxHandleOfElement hElement,
                                 ACP_tdxHandleOfMaterial hMaterial);
 
extern CPA_EXPORT GMT_tdxHandleToGameMaterial 
GEO_xGetGameMaterialOfElementPoints (ACP_tdxHandleOfObject hObject,
                                 ACP_tdxHandleOfElement hElement);
 
extern CPA_EXPORT void 
GEO_xSetGameMaterialOfElementPoints (ACP_tdxHandleOfObject hObject,
                                 ACP_tdxHandleOfElement hElement,
                                 GMT_tdxHandleToGameMaterial hMaterial);
 
/*----------------------------------------------------*/
/*											 	 LINES*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_xCreateElementLines (       ACP_tdxHandleOfObject hObject , 
                            ACP_tdxHandleOfElement *p_hElement ,
                            ACP_tdxIndex xNumberOfLines);
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementLines*
GEO_p_stAllocElementLines (	ACP_tdxIndex xNumberOfLines);
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_xSetThicknessOfElementLines (ACP_tdxHandleOfObject hObject , 
                                ACP_tdxHandleOfElement hElement ,
                                MTH_tdxReal xThickness);
 
extern CPA_EXPORT MTH_tdxReal 
GEO_xGetThicknessOfElementLines (ACP_tdxHandleOfObject hObject , 
                                ACP_tdxHandleOfElement hElement );
 
extern CPA_EXPORT void 
GEO_xSetIndexOfElementLines (ACP_tdxHandleOfObject hObject , 
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToSet,
                             GEO_tdstDoubledIndex *p_xIndexNumber);
 
extern CPA_EXPORT void 
GEO_xGetIndexOfElementLines (ACP_tdxHandleOfObject hObject ,
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToGet,
                             GEO_tdstDoubledIndex *p_xIndexNumber);
 
extern CPA_EXPORT void 
GEO_xSetMaterialOfElementLines (ACP_tdxHandleOfObject hObject , 
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToSet,
                             ACP_tdxHandleOfMaterial hMaterial);
 
extern CPA_EXPORT void 
GEO_xGetMaterialOfElementLines (ACP_tdxHandleOfObject hObject ,
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToGet,
                             ACP_tdxHandleOfMaterial *p_hMaterial);
 
extern CPA_EXPORT void 
GEO_xSetGameMaterialOfElementLines (ACP_tdxHandleOfObject hObject , 
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToSet,
                             GMT_tdxHandleToGameMaterial hMaterial);
 
extern CPA_EXPORT void 
GEO_xGetGameMaterialOfElementLines (ACP_tdxHandleOfObject hObject ,
                             ACP_tdxHandleOfElement hElement ,
                             ACP_tdxIndex xLineToGet,
                             GMT_tdxHandleToGameMaterial *p_hMaterial);
 
/*----------------------------------------------------*/
/*											   SPHERES*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_vCreateElementSpheres ( ACP_tdxHandleOfObject hObject,
                            ACP_tdxHandleOfElement *p_hElement,
                            ACP_tdxIndex xNbSpheres );
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementSpheres*
GEO_p_stAllocElementSpheres (	ACP_tdxIndex xNumberOfSpheres);
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_vSetCenterPointOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                     ACP_tdxHandleOfElement hElement,
                                     ACP_tdxIndex xNumberOfSphere,
                                     ACP_tdxIndex xIndexOfPoint );
 
extern CPA_EXPORT ACP_tdxIndex 
GEO_xGetCenterPointOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                     ACP_tdxHandleOfElement hElement,
                                     ACP_tdxIndex xNumberOfSphere );
 
extern CPA_EXPORT void 
GEO_vSetRadiusOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfSphere,
                                MTH_tdxReal xRadius );
 
extern CPA_EXPORT MTH_tdxReal 
GEO_xGetRadiusOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfSphere );
 
extern CPA_EXPORT void 
GEO_vSetMaterialOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                  ACP_tdxHandleOfElement hElement,
                                  ACP_tdxIndex xNumberOfSphere,
                                  ACP_tdxHandleOfMaterial hMaterial );
 
extern CPA_EXPORT ACP_tdxHandleOfMaterial 
GEO_hGetMaterialOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                  ACP_tdxHandleOfElement hElement,
                                  ACP_tdxIndex xNumberOfSphere );
 
extern CPA_EXPORT void 
GEO_vSetGameMaterialOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                  ACP_tdxHandleOfElement hElement,
                                  ACP_tdxIndex xNumberOfSphere,
                                  GMT_tdxHandleToGameMaterial hMaterial );
 
extern CPA_EXPORT GMT_tdxHandleToGameMaterial 
GEO_hGetGameMaterialOfIndexedSphere ( ACP_tdxHandleOfObject hObject,
                                  ACP_tdxHandleOfElement hElement,
                                  ACP_tdxIndex xNumberOfSphere );
 
/*----------------------------------------------------*/
/*										 ALIGNED BOXES*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void 
GEO_vCreateElementAlignedBoxes ( ACP_tdxHandleOfObject hObject,
                                 ACP_tdxHandleOfElement *p_hElement,
                                 ACP_tdxIndex xNbAlignedBoxes );
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementAlignedBoxes*
GEO_p_stAllocElementAlignedBoxes (	ACP_tdxIndex xNumberOfAlignedBoxes );
/* END ANNECY MT }*/
 
extern CPA_EXPORT void 
GEO_vSetMinMaxPointOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                         ACP_tdxHandleOfElement hElement,
                                         ACP_tdxIndex xNumberOfAlignedBox,
                                         ACP_tdxIndex xMinPoint,
                                         ACP_tdxIndex xMaxPoint );
 
 
extern CPA_EXPORT void 
GEO_vGetMinMaxPointOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                         ACP_tdxHandleOfElement hElement,
                                         ACP_tdxIndex xNumberOfAlignedBox,
                                         ACP_tdxIndex *p_xMinPoint,
                                         ACP_tdxIndex *p_xMaxPoint );
 
extern CPA_EXPORT void 
GEO_vSetMaterialOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                      ACP_tdxHandleOfElement hElement,
                                      ACP_tdxIndex xNumberOfAlignedBox,
                                      ACP_tdxHandleOfMaterial hMaterial );
 
extern CPA_EXPORT ACP_tdxHandleOfMaterial 
GEO_vGetMaterialOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                      ACP_tdxHandleOfElement hElement,
                                      ACP_tdxIndex xNumberOfAlignedBox );
 
extern CPA_EXPORT void 
GEO_vSetGameMaterialOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                      ACP_tdxHandleOfElement hElement,
                                      ACP_tdxIndex xNumberOfAlignedBox,
                                      GMT_tdxHandleToGameMaterial hMaterial );
 
extern CPA_EXPORT GMT_tdxHandleToGameMaterial 
GEO_vGetGameMaterialOfIndexedAlignedBox ( ACP_tdxHandleOfObject hObject,
                                      ACP_tdxHandleOfElement hElement,
                                      ACP_tdxIndex xNumberOfAlignedBox );
 
/*----------------------------------------------------*/
/*												  MISC*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT ACP_tdxIndex
GEO_lGetElementLinesNbLines( ACP_tdxHandleOfObject hObject , 
                               ACP_tdxHandleOfElement hElement );
extern CPA_EXPORT ACP_tdxIndex
GEO_lGetIndexedSphereNbSpheres ( ACP_tdxHandleOfObject hObject,
                                  ACP_tdxHandleOfElement hElement);
extern CPA_EXPORT ACP_tdxIndex
GEO_lGetAlignedBoxNbBoxes ( ACP_tdxHandleOfObject hObject,
                                                   ACP_tdxHandleOfElement hElement);
extern CPA_EXPORT ACP_tdxIndex
GEO_lGetElementPointsNbPoints( ACP_tdxHandleOfObject hObject , 
                                                          ACP_tdxHandleOfElement hElement );
 
 
/*----------------------------------------------------*/
/*												 CONES*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void
GEO_vCreateElementCones ( ACP_tdxHandleOfObject hObject,
                          ACP_tdxHandleOfElement *p_hElement,
                          ACP_tdxIndex xNbCones );
 
/* ANNECY MT 23/02/98 {*/
extern CPA_EXPORT GEO_tdstElementCones*
GEO_p_stAllocElementCones (	ACP_tdxIndex xNumberOfCones);
/* END ANNECY MT }*/
 
extern CPA_EXPORT ACP_tdxIndex
GEO_lGetConeNbCones ( ACP_tdxHandleOfObject hObject,
                      ACP_tdxHandleOfElement hElement);
 
extern CPA_EXPORT void 
GEO_vSetPointsOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfCone,
                              ACP_tdxIndex xTopPoint,
                              ACP_tdxIndex xBasePoint );
 
extern CPA_EXPORT void 
GEO_vGetPointsOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfCone,
                              ACP_tdxIndex *p_xTopPoint,
                              ACP_tdxIndex *p_xBasePoint );
 
extern CPA_EXPORT void 
GEO_vSetRadiusOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfCone,
                              MTH_tdxReal xRadius );
 
extern CPA_EXPORT MTH_tdxReal 
GEO_xGetRadiusOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex xNumberOfCone );
 
extern CPA_EXPORT void 
GEO_vSetMaterialOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfCone,
                                ACP_tdxHandleOfMaterial hMaterial );
 
extern CPA_EXPORT ACP_tdxHandleOfMaterial 
GEO_vGetMaterialOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfCone );
                                                                          
extern CPA_EXPORT void 
GEO_vSetGameMaterialOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfCone,
                                GMT_tdxHandleToGameMaterial hMaterial );
 
extern CPA_EXPORT GMT_tdxHandleToGameMaterial 
GEO_vGetGameMaterialOfIndexedCone ( ACP_tdxHandleOfObject hObject,
                                ACP_tdxHandleOfElement hElement,
                                ACP_tdxIndex xNumberOfCone );
                                                                        
 
#ifdef USE_ALTIMAPS
/*----------------------------------------------------*/
/*                      ALTIMAPS*/
/*----------------------------------------------------*/
 
extern CPA_EXPORT void
GEO_vCreateElementAltimap( ACP_tdxHandleOfObject   hObject, 
                           ACP_tdxHandleOfElement *p_hElement,
                           ACP_tdxIndex           xNbVertices,
                           ACP_tdxIndex           xNbSquares,
                           ACP_tdxIndex           xNbVisibleTriangles,
                           ACP_tdxIndex           xNbUVValues,
                           ACP_tdxIndex           xNbMaterials );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapOrigin( ACP_tdxHandleOfObject    hObject, 
                       ACP_tdxHandleOfElement   hElement,
                       MTH3D_tdstVector         stOrigin );
 
extern CPA_EXPORT void
GEO_vGetAltimapOrigin( ACP_tdxHandleOfObject    hObject, 
                       ACP_tdxHandleOfElement   hElement,
                       MTH3D_tdstVector         *stOrigin );      
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapSquarePattern( ACP_tdxHandleOfObject  hObject, 
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex           xWidth,
                              MTH_tdxReal            xSquareDimX,
                              ACP_tdxIndex           xDepth,
                              MTH_tdxReal            xSquareDimY );
 
extern CPA_EXPORT void
GEO_vGetAltimapSquarePattern( ACP_tdxHandleOfObject  hObject, 
                              ACP_tdxHandleOfElement hElement,
                              ACP_tdxIndex           *xWidth,
                              MTH_tdxReal            *xSquareDimX,
                              ACP_tdxIndex           *xDepth,
                              MTH_tdxReal            *xSquareDimY );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapNbUVValues( ACP_tdxHandleOfObject       hObject, 
                           ACP_tdxHandleOfElement      hElement,
                           ACP_tdxIndex                xNbUVValues );
 
extern CPA_EXPORT void
GEO_vGetAltimapNbUVValues( ACP_tdxHandleOfObject       hObject, 
                           ACP_tdxHandleOfElement      hElement,
                           ACP_tdxIndex                *xNbUVValues );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapNbFaces( ACP_tdxHandleOfObject       hObject, 
                        ACP_tdxHandleOfElement      hElement,
                        ACP_tdxIndex                xNbFace );
 
extern CPA_EXPORT void
GEO_vGetAltimapNbFaces( ACP_tdxHandleOfObject       hObject, 
                        ACP_tdxHandleOfElement      hElement,
                        ACP_tdxIndex                *xNbFace );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapVertexHeight( ACP_tdxHandleOfObject  hObject, 
                             ACP_tdxHandleOfElement hElement,
                             ACP_tdxIndex           xNumPoint,
                             MTH_tdxReal            xHeight );
 
extern CPA_EXPORT void
GEO_vGetAltimapVertexHeight( ACP_tdxHandleOfObject  hObject, 
                             ACP_tdxHandleOfElement hElement,
                             ACP_tdxIndex           xNumPoint,
                             MTH_tdxReal            *xHeight );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapPointNormal( ACP_tdxHandleOfObject   hObject, 
                            ACP_tdxHandleOfElement  hElement,
                            ACP_tdxIndex            xNumPoint,
                            MTH3D_tdstVector        stNormal );
 
extern CPA_EXPORT void
GEO_vGetAltimapPointNormal( ACP_tdxHandleOfObject   hObject, 
                            ACP_tdxHandleOfElement  hElement,
                            ACP_tdxIndex            xNumPoint,
                            MTH3D_tdstVector        *stNormal );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapSquare(  ACP_tdxHandleOfObject   hObject, 
                        ACP_tdxHandleOfElement  hElement,
                        ACP_tdxIndex            xNumSquare,
                        unsigned char           ucTypeOfSquare,
                        ACP_tdxIndex            xIndexOfFirstSquareTriangle );
 
extern CPA_EXPORT void
GEO_vGetAltimapSquare(  ACP_tdxHandleOfObject   hObject, 
                        ACP_tdxHandleOfElement  hElement,
                        ACP_tdxIndex            xNumSquare,
                        unsigned char           *ucTypeOfSquare,
                        ACP_tdxIndex            *xIndexOfFirstSquareTriangle );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapUVValue( ACP_tdxHandleOfObject   hObject, 
                        ACP_tdxHandleOfElement  hElement,
                        ACP_tdxIndex            xNumUV,
                        ACP_tdst2DUVValues      stUV );
 
extern CPA_EXPORT void
GEO_vGetAltimapUVValue( ACP_tdxHandleOfObject   hObject, 
                        ACP_tdxHandleOfElement  hElement,
                        ACP_tdxIndex            xNumUV,
                        ACP_tdst2DUVValues      *stUV );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapNbMaterials( ACP_tdxHandleOfObject       hObject, 
                            ACP_tdxHandleOfElement      hElement,
                            ACP_tdxIndex                xNbMaterials );
 
extern CPA_EXPORT void
GEO_vGetAltimapNbMaterials( ACP_tdxHandleOfObject       hObject, 
                            ACP_tdxHandleOfElement      hElement,
                            ACP_tdxIndex                *xNbMaterials );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapFaceNormal( ACP_tdxHandleOfObject  hObject, 
                           ACP_tdxHandleOfElement hElement,
                           ACP_tdxIndex           xNumFace,
                           MTH3D_tdstVector       stNormal );       
 
extern CPA_EXPORT void
GEO_vGetAltimapFaceNormal( ACP_tdxHandleOfObject  hObject, 
                           ACP_tdxHandleOfElement hElement,
                           ACP_tdxIndex           xNumFace,
                           MTH3D_tdstVector       *stNormal );        
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapFaceUVIndex( ACP_tdxHandleOfObject   hObject, 
                            ACP_tdxHandleOfElement  hElement,
                            ACP_tdxIndex            xNumFace,
                            ACP_tdxIndex            xUVIndex1,
                            ACP_tdxIndex            xUVIndex2,
                            ACP_tdxIndex            xUVIndex3 );
 
extern CPA_EXPORT void
GEO_vGetAltimapFaceUVIndex( ACP_tdxHandleOfObject   hObject, 
                            ACP_tdxHandleOfElement  hElement,
                            ACP_tdxIndex            xNumFace,
                            ACP_tdxIndex            *xUVIndex1,
                            ACP_tdxIndex            *xUVIndex2,
                            ACP_tdxIndex            *xUVIndex3 );
/*------------------------------------------*/
extern CPA_EXPORT void
GEO_vSetAltimapFaceMaterialIndex( ACP_tdxHandleOfObject         hObject,
                                  ACP_tdxHandleOfElement        hElement,
                                  ACP_tdxIndex                  xNumFace,
                                  unsigned char                 ucMatIndex );
 
extern CPA_EXPORT void
GEO_vGetAltimapFaceMaterialIndex( ACP_tdxHandleOfObject         hObject,
                                  ACP_tdxHandleOfElement        hElement,
                                  ACP_tdxIndex                  xNumFace,
                                  unsigned char                 *ucMatIndex );
 
/*----------------------------------------------------*/
#endif /*USE_ALTIMAPS*/
 
/* ANNECY MT 20/02/98 {*/
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementIndexedTriangles( ACP_tdxHandleOfObject		hObject,
											  ACP_tdxHandleOfElement	hElement,
											  ACP_tdxIndex				xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementIndexedTriangles( ACP_tdxHandleOfObject		hObject,
											  ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementFaceMapDescriptors( ACP_tdxHandleOfObject	hObject,
												ACP_tdxHandleOfElement	hElement,
												ACP_tdxIndex			xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementFaceMapDescriptors( ACP_tdxHandleOfObject	hObject,
												ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementSprites( ACP_tdxHandleOfObject	hObject,
								 	 ACP_tdxHandleOfElement	hElement,
								 	 ACP_tdxIndex			xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementSprites( ACP_tdxHandleOfObject	hObject,
									 ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementTMeshes( ACP_tdxHandleOfObject	hObject,
								 	 ACP_tdxHandleOfElement	hElement,
								 	 ACP_tdxIndex			xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementTMeshes( ACP_tdxHandleOfObject	hObject,
									 ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementPoints( ACP_tdxHandleOfObject	hObject,
								    ACP_tdxHandleOfElement	hElement,
								 	ACP_tdxIndex			xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementPoints( ACP_tdxHandleOfObject	hObject,
									ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementLines( ACP_tdxHandleOfObject	hObject,
								   ACP_tdxHandleOfElement	hElement,
								   ACP_tdxIndex				xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementLines( ACP_tdxHandleOfObject	hObject,
								   ACP_tdxHandleOfElement	hElement);
 
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementAlignedBoxes( ACP_tdxHandleOfObject		hObject,
										  ACP_tdxHandleOfElement	hElement,
										  ACP_tdxIndex				xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementAlignedBoxes( ACP_tdxHandleOfObject		hObject,
										  ACP_tdxHandleOfElement	hElement);
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementSpheres( ACP_tdxHandleOfObject	hObject,
								     ACP_tdxHandleOfElement	hElement,
								     ACP_tdxIndex			xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementSpheres( ACP_tdxHandleOfObject	hObject,
								     ACP_tdxHandleOfElement	hElement);
extern CPA_EXPORT void
GEO_vSetParallelBoxOfElementCones( ACP_tdxHandleOfObject	hObject,
								   ACP_tdxHandleOfElement	hElement,
								   ACP_tdxIndex				xNumFace);
 
extern CPA_EXPORT ACP_tdxIndex
GEO_xGetParallelBoxOfElementCones( ACP_tdxHandleOfObject	hObject,
								   ACP_tdxHandleOfElement	hElement);
/* ANNECY MT }*/
 
																
																
/*
-----------------------------------------------------------------------------
PRIVATE FUNCTIONS DECLARATION: 
Ex : 
extern void MODULETAG_fn_vMyPrivateFunction(void); 
Note : Private functions MUST appear ONLY in PRIVATE HEADER files (.h) in 
your Src directory with source files (.c)
-----------------------------------------------------------------------------
*/
 
 
#ifdef __cplusplus
};
#endif /* __cplusplus */
 
 
#endif /* __GEO_ELEMENT_H  */
 
