Add rayman2 source files
This commit is contained in:
74
Rayman_X/cpa/public/PIC/Deplacer.h
Normal file
74
Rayman_X/cpa/public/PIC/Deplacer.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/* Fichier de gestion des deplacements en 3d a l'aide de la souris.*/
|
||||
/* Olivier Didelot le 18 decembre 1995.*/
|
||||
/* Derniere modification : Olivier Didelot le 17 janvier 1996.*/
|
||||
/* Derniere modification : Marc Villemain le 04 juillet 1996 : adaptation ACP*/
|
||||
|
||||
#ifndef PIC_DEPLACER_H
|
||||
#define PIC_DEPLACER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* For DLL using these function :*/
|
||||
#include "cpa_expt.h"
|
||||
|
||||
#define GLI_tdstEqPlan_ PIC_tdstEqPlan_
|
||||
#define GLI_tdstEqPlan PIC_tdstEqPlan
|
||||
#define GLI_vCreatePlan PIC_vCreatePlan
|
||||
#define GLI_cIsPlanNull PIC_cIsPlanNull
|
||||
#define GLI_vDefinePlanEquation PIC_vDefinePlanEquation
|
||||
#define GLI_vDefinePlanByNormale PIC_vDefinePlanByNormale
|
||||
#define GLI_vDefinePlanBy3Points PIC_vDefinePlanBy3Points
|
||||
#define GLI_bIntersectionPlanDroite PIC_bIntersectionPlanDroite
|
||||
#define GLI_bGetVecteurDeplacement PIC_bGetVecteurDeplacement
|
||||
#define GLI_vInitDeplacement PIC_vInitDeplacement
|
||||
#define GLI_vEndDeplacement PIC_vEndDeplacement
|
||||
|
||||
/* Un plan est defini par son equation :*/
|
||||
/* a.x + b.y + c.z + d=0*/
|
||||
typedef struct PIC_tdstEqPlan_
|
||||
{
|
||||
MTH_tdxReal xA;
|
||||
MTH_tdxReal xB;
|
||||
MTH_tdxReal xC;
|
||||
MTH_tdxReal xD;
|
||||
|
||||
} PIC_tdstEqPlan ;
|
||||
|
||||
extern CPA_EXPORT void PIC_vCreatePlan ( PIC_tdstEqPlan *p_stPlan );
|
||||
extern CPA_EXPORT BOOL PIC_cIsPlanNull ( PIC_tdstEqPlan *p_stPlan );
|
||||
extern CPA_EXPORT void PIC_vDefinePlanEquation ( PIC_tdstEqPlan *p_stPlan ,
|
||||
MTH_tdxReal xA ,
|
||||
MTH_tdxReal xB ,
|
||||
MTH_tdxReal xC ,
|
||||
MTH_tdxReal xD );
|
||||
extern CPA_EXPORT void PIC_vDefinePlanByNormale ( PIC_tdstEqPlan *p_stPlan ,
|
||||
MTH3D_tdstVector *p_stNormal,
|
||||
MTH3D_tdstVector *p_stPoint );
|
||||
extern CPA_EXPORT void PIC_vDefinePlanBy3Points ( PIC_tdstEqPlan *p_stPlan ,
|
||||
MTH3D_tdstVector *p_stA,
|
||||
MTH3D_tdstVector *p_stB,
|
||||
MTH3D_tdstVector *p_stC );
|
||||
extern CPA_EXPORT BOOL PIC_bIntersectionPlanDroite ( PIC_tdstEqPlan *p_stPlan ,
|
||||
MTH3D_tdstVector *p_stA ,
|
||||
MTH3D_tdstVector *p_stB ,
|
||||
MTH3D_tdstVector *p_stInter );
|
||||
|
||||
|
||||
|
||||
/* Calculate the moving vector of 3d Mouse, if this is possible.*/
|
||||
extern CPA_EXPORT BOOL PIC_bGetVecteurDeplacement ( GLI_tdst2DVertex *p_stMouse2D ,
|
||||
MTH3D_tdstVector *p_stVect ) ;
|
||||
extern CPA_EXPORT void PIC_vInitDeplacement ( GLD_tdhDevice hDev ,
|
||||
GLD_tdhViewport hVp ,
|
||||
GLI_tdst2DVertex *p_stMouse2D ,
|
||||
MTH3D_tdstVector *p_stPointMobil);
|
||||
extern CPA_EXPORT void PIC_vEndDeplacement ( void ) ;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* PIC_DEPLACER_H*/
|
62
Rayman_X/cpa/public/PIC/Pick_st.h
Normal file
62
Rayman_X/cpa/public/PIC/Pick_st.h
Normal file
@@ -0,0 +1,62 @@
|
||||
#ifndef PICKING_ST_H
|
||||
#define PICKING_ST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GLI_C_DepthPickingElements PIC_C_DepthPickingElements
|
||||
#define GLI_C_ModePickingFace PIC_C_ModePickingFace
|
||||
#define GLI_C_ModePickingEdge PIC_C_ModePickingEdge
|
||||
#define GLI_C_ModePickingPoint PIC_C_ModePickingPoint
|
||||
#define GLI_tdeModePicking_ PIC_tdeModePicking_
|
||||
#define GLI_tdeModePicking PIC_tdeModePicking
|
||||
#define PIC_tdstDataOfElement_ GLI_tdstDataOfElement_
|
||||
#define GLI_tdstDataOfElement PIC_tdstDataOfElement
|
||||
#define GLI_tdstPickedObject_ PIC_tdstPickedObject_
|
||||
#define GLI_tdstPickedObject PIC_tdstPickedObject
|
||||
|
||||
/* For DLL using these function :*/
|
||||
#include "cpa_expt.h"
|
||||
|
||||
#define PIC_C_DepthPickingElements 3
|
||||
|
||||
typedef enum PIC_tdeModePicking_
|
||||
{
|
||||
PIC_C_ModePickingFace,
|
||||
PIC_C_ModePickingEdge,
|
||||
PIC_C_ModePickingPoint,
|
||||
|
||||
} PIC_tdeModePicking;
|
||||
|
||||
|
||||
typedef struct GLI_tdstDataOfElement_
|
||||
{
|
||||
MTH3D_tdstVector stHit; /* position 3D*/
|
||||
MTH_tdxReal xDistance; /* distance objet 3d origine de l'axe*/
|
||||
ACP_tdxHandleOfElement xElements;
|
||||
|
||||
/* union*/
|
||||
/* {*/
|
||||
ACP_tdxIndex xIndexOfFace; /* handle de la face*/
|
||||
ACP_tdxIndex xIndexOfEdge; /* handle du edge le plus proche*/
|
||||
ACP_tdxIndex xIndexOfPoint; /* handle du sommet le plus proche*/
|
||||
/* };*/
|
||||
|
||||
} PIC_tdstDataOfElement;
|
||||
|
||||
|
||||
typedef struct PIC_tdstPickedObject_
|
||||
{
|
||||
PIC_tdeModePicking xModePicking; /* type de data*/
|
||||
ACP_tdxIndex xNbElements; /* nombre d'<27>l<EFBFBD>ments (max = GLI_C_ProfondeurPickingElements)*/
|
||||
PIC_tdstDataOfElement aDEF_stDataOfElement[PIC_C_DepthPickingElements];
|
||||
|
||||
} PIC_tdstPickedObject;
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif
|
65
Rayman_X/cpa/public/PIC/Picking.h
Normal file
65
Rayman_X/cpa/public/PIC/Picking.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef PICKING_H
|
||||
#define PICKING_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* For DLL using these function :*/
|
||||
#include "cpa_expt.h"
|
||||
|
||||
/* Oliv' removal - 19/05/1998*/
|
||||
/*#define GLI_vMouse3DScreen PIC_vMouse3DScreen
|
||||
#define GLI_bIntersectSegmentWithGeometricObject PIC_bIntersectSegmentWithGeometricObject
|
||||
#define GLI_bIntersectSemiAxeWithGeometricObject PIC_bIntersectSemiAxeWithGeometricObject
|
||||
#define GLI_bIsObjectPick PIC_bIsObjectPick
|
||||
#define GLI_vGetPosCamAndMouse PIC_vGetPosCamAndMouse
|
||||
#define GLI_xIntersectSemiAxeWithSphereBox PIC_xIntersectSemiAxeWithSphereBox*/
|
||||
|
||||
extern CPA_EXPORT void PIC_vMouse3DScreen ( GLD_tdhDevice hDev,
|
||||
GLD_tdhViewport hVp,
|
||||
GLI_tdst2DVertex *p_stInput ,
|
||||
MTH3D_tdstVector *p_stOutput );
|
||||
|
||||
extern CPA_EXPORT BOOL PIC_bIntersectSegmentWithGeometricObject(MTH3D_tdstVector *p_stCameraPos,
|
||||
MTH3D_tdstVector *p_stVertex12,
|
||||
GEO_tdstGeometricObject *p_stObject ,
|
||||
PIC_tdstPickedObject *p_stPickedObject);
|
||||
|
||||
extern CPA_EXPORT BOOL PIC_bIntersectSemiAxeWithGeometricObject(PIC_tdeModePicking xModePicking,
|
||||
MTH3D_tdstVector *p_stCameraPos,
|
||||
MTH3D_tdstVector *p_stVertex12,
|
||||
struct GEO_tdstGeometricObject_ *p_stObject ,
|
||||
PIC_tdstPickedObject *p_stPickedObject);
|
||||
|
||||
extern CPA_EXPORT BOOL PIC_bIsObjectPick(PIC_tdeModePicking xModePicking,
|
||||
GLD_tdhDevice hDev,
|
||||
GLD_tdhViewport hVp,
|
||||
GLI_tdst2DVertex *p_stSouris2D ,
|
||||
struct GEO_tdstGeometricObject_ *p_stObject ,
|
||||
PIC_tdstPickedObject *p_stPickedObject );
|
||||
|
||||
extern CPA_EXPORT void PIC_vGetPosCamAndMouse(GLD_tdhDevice hDev,
|
||||
GLD_tdhViewport hVp,
|
||||
GLI_tdst2DVertex *p_stSouris2D,
|
||||
MTH3D_tdstVector *p_stSouris3D,
|
||||
MTH3D_tdstVector *p_stCamera);
|
||||
|
||||
extern CPA_EXPORT BOOL PIC_xIntersectSemiAxeWithSphereBox(MTH3D_tdstVector *p_stVertexA,
|
||||
MTH3D_tdstVector *p_stVectAB,
|
||||
GLI_tdstSphere *p_stSphere );
|
||||
|
||||
|
||||
extern CPA_EXPORT void fn_vSetZCamera(GLD_tdhDevice hDev,
|
||||
GLD_tdhViewport hVp,
|
||||
MTH3D_tdstVector *p_stSrcVertex,
|
||||
MTH3D_tdstVector *p_stDstVertex,
|
||||
MTH_tdxReal z);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user