Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,387 @@
/* (c) Ubi Studios 1996*/
/* See Vincent Greco for any comment or question*/
#ifndef __3DOBJECT_HPP__
#define __3DOBJECT_HPP__
#ifdef CPA_WANTS_IMPORT
#pragma message("=================================================================================")
#pragma message("=================================================================================")
#pragma message("WARNING, use of 3DGEOM DLL objects with CPA_WANTS_IMPORT defined.")
#pragma message("=================================================================================")
#pragma message("=================================================================================")
#endif
/****************************************/
#ifndef 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
#endif
/****************************************/
class SectionElement;
/****************************************/
/* enums*/
/****************************************/
typedef enum
{
C_Ok, C_BadElement, C_BadValue
}
tdeGeomResult;
typedef enum
{
C_Set, C_Inc
}
tdeModifType;
typedef enum
{
C_X, C_Y, C_Z
}
tdeCompoType;
/****************************************/
/* structs*/
/****************************************/
/* BEGIN CPA2 Cristi Petrescu 98-02-*/
/* In a modification we do not need to keep the value. This can be retrieved at save time from the object data*/
/* Remember: in the mdf files we keep the update values, not the backup*/
/* END CPA2 Cristi Petrescu 98-02-*/
typedef struct tdstModifPoint_
{
ACP_tdxIndex xIndexOfPoint;
/* BEGIN CPA2 Cristi Petrescu 98-02-*/
/*MTH3D_tdstVector st3DPoint;*/
/* END CPA2 Cristi Petrescu 98-02-*/
}
tdstModifPoint;
typedef struct tdstModifGMT_
{
ACP_tdxHandleOfElement hElement;
ACP_tdxIndex xElementType;
ACP_tdxIndex xIndexInElement;
/* BEGIN CPA2 Cristi Petrescu 98-02-*/
/*CString csGameMaterialName;*/
GMT_tdxHandleToGameMaterial hGameMaterial;
/* END CPA2 Cristi Petrescu 98-02-*/
}
tdstModifGMT;
typedef struct tdstModifFMD_
{
ACP_tdxIndex xElementIT;
ACP_tdxIndex xIndexFaceIT;
ACP_tdxIndex xElementFMD;
ACP_tdxIndex xIndexFaceFMD;
} tdstModifFMD ;
typedef struct tdstInfoFMD_
{
ACP_tdxHandleOfFMD hFMD;
SectionElement *p_oSectionElementFMD;
} tdstInfoFMD;
/****************************************/
/* classes*/
/****************************************/
class SectionElement : public CPA_SectionObject
{
/* datas*/
private:
void *m_hElement;
/* methods*/
public:
SectionElement(const CString csReferencedSectionName, char *p_szDataPath, SCR_tdpfn_Ntfy_Callback pCallBack,
void *pSectionData = NULL, BOOL bExistingSection = TRUE)
:CPA_SectionObject(csReferencedSectionName, p_szDataPath, pCallBack, pSectionData, bExistingSection)
{}
void SetElement (void *_hElement) { m_hElement = _hElement; }
void *hGetElement (void) { return m_hElement; }
};
class CPA_EXPORT Geometry3D : public CPA_ModifiableObject, public CPA_EdMot<ACP_tdxHandleOfObject>
{
/* datas*/
private:
ACP_tdxHandleOfObject m_hBoundingVolume;
BOOL m_bMustRecomputeBdV;
BOOL m_bEndCreated;
CPA_SectionObject *m_p_oModifSection;
/*CPA_SectionObject *m_p_oModifListSection;*/
CPA_List<tdstModifPoint> m_oListOfModifiedPoints;
CPA_List<tdstModifGMT> m_oListOfGMTModif;
CPA_List<tdstModifFMD> m_oListOfFMDModif;
BOOL m_bMustSaveFMD;
CPA_List<tdstInfoFMD> m_oListOfFMD;
long m_lUniqueFMD;
public:
/*ROMTEAM WorldEditor (Viorel Preoteasa) 20/01/98*/
void fn_vSetMustRecomputeBdV(BOOL B = TRUE){m_bMustRecomputeBdV = B;}
/*ENDROMTEAM WorldEditor (Viorel Preoteasa)*/
/*ROMTEAM WorldEditor (Cristian Stegaru) 01/98*/
CPA_List<SectionElement> m_oListOfElementSections;
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
/**/
/**/
/* methods on 3DObject.cpp*/
/**/
/**/
public:
static void StaticInit(CPA_MainWorld *_p_oMainWorld);
/* constructor to encapsulate an existing engine object*/
Geometry3D(CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
/* constructor to create and save a new object*/
Geometry3D(CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
/* constructor to create and a new object which can't be save*/
Geometry3D(CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
~Geometry3D();
/* virtual member overlapped*/
/* CPA_BaseObject*/
void *GetData (void) { return (void*)GetStruct(); }
long GetDataType (void) { return HIE_C_ulEDT_Geometric; }
/* to choose unicity criteria*/
tdeMissingCriteria fn_eCheckUnicity (const CString csNewName) { return fn_eCheckUnicityWithOwner(csNewName); }
/* CPA_SaveObject*/
/* virtual functions*/
BOOL fn_bCanBeModified (void);
void fn_vUpdateSectionName (void);
void fn_vNotifySave (void);
void fn_vNotifyUnSave (void);
void fn_vNotifyRestore (void);
void fn_vNotifyRename (void);
void fn_vNotifySaveObject (void);
void fn_vNotifyUnSaveObject (void);
void fn_vNotifyRestoreObject (void);
void fn_vNotifyRenameObject (void);
void fn_vNotifySaveElement (ACP_tdxHandleOfElement _hElement);
void fn_vNotifyUnSaveElement (ACP_tdxHandleOfElement _hElement);
void fn_vNotifyRestoreElement (ACP_tdxHandleOfElement _hElement);
void fn_vNotifyRenameElement (ACP_tdxHandleOfElement _hElement);
/* Modif Section*/
void SetExistingModifSection (BOOL _bExists);
/* BEGIN CPA2 Cristi Petrescu 98-02-*/
void mfn_vComputeModifSectionName (char *_p_cFileName);
void mfn_vLoadModifSection (void);
void mfn_vCreateModifSection (char *szModifSectionName = NULL);
/* END CPA2 Cristi Petrescu 98-02-*/
/*void SetExistingModifListSection(BOOL _bExists);*/
/* Load CallBack*/
static SCR_tde_Anl_ReturnValue CallBackLoad (SCR_tdst_File_Description *_p_stFile, char *_pszName, char *_ap_szParams[], SCR_tde_Anl_Action _eAction);
static SCR_tde_Anl_ReturnValue CallBackLoadModif (SCR_tdst_File_Description *_p_stFile, char *_pszName, char *_ap_szParams[], SCR_tde_Anl_Action _eAction);
/*static SCR_tde_Anl_ReturnValue CallBackLoadModifList(SCR_tdst_File_Description *_p_stFile, char *_pszName, char *_ap_szParams[], SCR_tde_Anl_Action _eAction);*/
/* Save CallBack*/
static void CallBackSaveModifGeometricObject ( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
/*static void CallBackSaveModifListGeometricObject( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);*/
static void CallBackSaveGeometricObject ( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
static void CallBackSaveGeometricElement ( SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
static void CallBackSaveElementIndexedTriangle (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementIndexedTriangles *p_stElement);
static void CallBackSaveElementFaceMapDescriptors (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementFaceMapDescriptors *p_stElement);
static void CallBackSaveFaceMapDescriptors (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, void *p_vData, SCR_tde_Ntfy_Action eAction);
static void CallBackSaveElementSprites (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementSprite *p_stElement);
static void CallBackSaveElementTMeshes (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementTMeshes *p_stElement);
static void CallBackSaveElementPoints (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementPoints *p_stElement);
static void CallBackSaveElementLines (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementLines *p_stElement);
static void CallBackSaveElementSpheres (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementSpheres *p_stElement);
static void CallBackSaveElementAlignedBox (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementAlignedBoxes *p_stElement);
static void CallBackSaveElementCones (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementCones *p_stElement);
/* BEGIN CPA2 Cristi Petrescu 98-03-*/
#ifdef USE_ALTIMAPS
static void CallBackSaveElementAltimap (SCR_tdst_File_Description *p_stFile, char *p_szSectionName, GEO_tdstElementAltimap *p_stElement);
#endif
/* END CPA2 Cristi Petrescu 98-03-*/
/**/
void mfn_vSaveModifications (FILE *_pFile, char *_szIdentity);
BOOL mfn_bMustSaveModifications (void);
BOOL mfn_bMustSaveFMD (void) { return m_bMustSaveFMD; }
void mfn_vSaveFMD (void);
/*ROMTEAM WorldEditor (Cristian Stegaru 12/97)*/
virtual void mfn_vInitElement (char *szFileReference, char *szClassPath, BOOL bSectionExists = FALSE);
void mfn_vRefreshElement ();
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
protected:
/* MODIFICATIONS*/
void fn_vInitModifSections (void);
void fn_vInitFMD (void);
/* points*/
void fn_vClearModificationsList (void);
void fn_vAddModification (ACP_tdxIndex _xIndex/*, MTH3D_tdstVector *_p_st3DPoint*/);
tdstModifPoint *fn_p_stGetModification (ACP_tdxIndex _xIndex);
void fn_vOwnerSetPoint (ACP_tdxIndex xNumPoint,MTH3D_tdstVector *p_stPoint);
/* material*/
void fn_vClearGMTModificationsList(void);
void fn_vAddGMTModification (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement, GMT_tdxHandleToGameMaterial _hGameMaterial);
tdstModifGMT *fn_p_stGetGMTModification (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement);
void fn_vOwnerSetMaterial (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement, GMT_tdxHandleToGameMaterial _hGameMaterial);
/* FMD*/
void fn_vClearFMDModificationsList(void);
void fn_vAddFMDModification (ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT, ACP_tdxIndex xElementFMD, ACP_tdxIndex xFaceFMD);
void fn_vDelFMDModification (ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT, ACP_tdxIndex xElementFMD, ACP_tdxIndex xFaceFMD);
tdstModifFMD *fn_p_stGetFMDModification (ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT, ACP_tdxIndex xElementFMD, ACP_tdxIndex xFaceFMD);
/**/
/**/
/* methods on 3DObject.cxx*/
/**/
/**/
public:
/**/
/* object modifications*/
/**/
void fn_vGetPoint (ACP_tdxIndex xNumPoint,MTH3D_tdstVector *p_stPoint);
void fn_vSetPoint (ACP_tdxIndex xNumPoint,MTH3D_tdstVector *p_stPoint);
void fn_vTranslatePoint (ACP_tdxIndex _xPoint,MTH3D_tdstVector *_p_st3DTranslation);
void fn_vSetOnState (CString _ocsModificationType, BOOL _bInitialState);
ACP_tdxIndex fn_xGetNbIndexedElements (ACP_tdxHandleOfElement _hElement);
static char *mfn_p_szGetGameMaterialName(GMT_tdxHandleToGameMaterial hGameMaterial);
CPA_BaseObject *fn_p_oGetGameMaterial (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement = 0);
void fn_vSetGameMaterial (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement, CPA_BaseObject *_p_oGMT);
void fn_vSetEngineGameMaterial (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement, GMT_tdxHandleToGameMaterial _hGameMaterial);
/**/
/* bounding volume*/
/**/
ACP_tdxHandleOfObject fn_hGetBoundingVolume (void);
void fn_vComputeBoundingVolume (BOOL _bRecompute = FALSE);
/**/
/* element construction*/
/**/
tdeGeomResult fn_vSetListOfPoints (ACP_tdxIndex xNbPoints, MTH3D_tdstVector *p_stPoint);
void fn_vEndCreation (void);
void fn_vAllocAndComputeListOfPointsMaterial(void);
/* spheres*/
ACP_tdxHandleOfElement fn_hCreateElementSpheres(ACP_tdxIndex xNbSpheres);
tdeGeomResult fn_eSetIndexedSphere (ACP_tdxHandleOfElement hElementSphere, ACP_tdxIndex xIndexOfSphere, ACP_tdxIndex xCenter, MTH_tdxReal xRadius);
/* aligned box*/
ACP_tdxHandleOfElement fn_hCreateElementAlignedBox (ACP_tdxIndex xNbAlignedBoxes);
tdeGeomResult fn_eSetAlignedBox (ACP_tdxHandleOfElement hElementAlignedBox, ACP_tdxIndex xNumberOfAlignedBox, ACP_tdxIndex xMinPoint, ACP_tdxIndex xMaxPoint);
/* cone*/
ACP_tdxHandleOfElement fn_hCreateElementCone (ACP_tdxIndex xNbCones);
tdeGeomResult fn_eSetCone (ACP_tdxHandleOfElement hElementCone, ACP_tdxIndex xNumberOfCone, ACP_tdxIndex xTopPoint, ACP_tdxIndex xBasePoint, MTH_tdxReal xBaseRadius);
tdeGeomResult fn_eSetConePoints (ACP_tdxHandleOfElement hElementCone, ACP_tdxIndex xNumberOfCone, ACP_tdxIndex xTopPoint, ACP_tdxIndex xBasePoint);
tdeGeomResult fn_eSetConeBaseRadius (ACP_tdxHandleOfElement hElementCone, ACP_tdxIndex xNumberOfCone, MTH_tdxReal xBaseRadius);
tdeGeomResult fn_eGetConePoints (ACP_tdxHandleOfElement hElementCone, ACP_tdxIndex xNumberOfCone, ACP_tdxIndex *_p_xTopPoint, ACP_tdxIndex *_p_xBasePoint);
MTH_tdxReal fn_xGetConeBaseRadius (ACP_tdxHandleOfElement hElementCone, ACP_tdxIndex xNumberOfCone);
/* indexed triangle*/
ACP_tdxHandleOfElement fn_hCreateElementIndexedTriangle (ACP_tdxIndex xNbFaces, ACP_tdxIndex xNbElementUV);
tdeGeomResult fn_eSetIndexedTriangle (ACP_tdxHandleOfElement hElementIT, ACP_tdxIndex xNumberOfFace, ACP_tdxIndex xPoint1, ACP_tdxIndex xPoint2, ACP_tdxIndex xPoint3);
tdeGeomResult fn_eGetIndexedTrianglePoints (ACP_tdxHandleOfElement hElementIT, ACP_tdxIndex xNumberOfFace, ACP_tdxIndex *_p_xPt1, ACP_tdxIndex *_p_xPt2, ACP_tdxIndex *_p_xPt3);
/* BEGIN CPA2 Cristi Petrescu 98-03-*/
/* altimap*/
#ifdef USE_ALTIMAPS
ACP_tdxHandleOfElement fn_hCreateElementAltimap (ACP_tdxIndex xNbVertices, ACP_tdxIndex xNbSquares, ACP_tdxIndex xNbVisibleTriangles, ACP_tdxIndex xNbUVValues, ACP_tdxIndex xNbMaterials);
#endif
/* END CPA2 Cristi Petrescu 98-03-*/
/* point*/
ACP_tdxHandleOfElement fn_hCreateElementPoints (ACP_tdxIndex xNumberOfPoints);
tdeGeomResult fn_eSetIndexedPoint (ACP_tdxHandleOfElement hElementPoint, ACP_tdxIndex xNumberOfPoint, ACP_tdxIndex xIndexOfPoint);
tdeGeomResult fn_eSetFatnessOfElementPoint (ACP_tdxHandleOfElement hElementPoint, MTH_tdxReal xFatness);
ACP_tdxIndex fn_xGetIndexedPointPoint (ACP_tdxHandleOfElement hElementPoint, ACP_tdxIndex xNumberOfPoint);
MTH_tdxReal fn_xGetFatness (ACP_tdxHandleOfElement hElementPoint, ACP_tdxIndex xNumberOfPoint);
/* sphere transformations*/
tdeGeomResult fn_eGetCenter (MTH3D_tdstVector *p_st3DCenter, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eGetCenterX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eGetCenterY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eGetCenterZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eSetCenter (MTH3D_tdstVector *p_stPoint, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eSetCenterX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eSetCenterY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eSetCenterZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eGetRadius (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
tdeGeomResult fn_eSetRadius (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
/* Aligned box*/
tdeGeomResult fn_eGetMinPoint (MTH3D_tdstVector *p_st3DPoint, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMinPoint (MTH3D_tdstVector *p_st3DPoint, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMinPointX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMinPointY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMinPointZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMinPointX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMinPointY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMinPointZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eGetMaxPoint (MTH3D_tdstVector *p_st3DPoint, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMaxPoint (MTH3D_tdstVector *p_st3DPoint, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMaxPointX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMaxPointY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eSetMaxPointZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMaxPointX (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMaxPointY (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eIncMaxPointZ (MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
/* BEGIN CPA2 Cristi Petrescu 98-03-*/
/* Use the Engine functions please (GEO_...)*/
/* or the Altimap3D object*/
/* Altimaps transf*/
/*tdeGeomResult fn_eGetOrigin (MTH3D_tdstVector *p_st3DPoint, ACP_tdxHandleOfElement hElement);*/
/*tdeGeomResult fn_eSetOrigin (MTH3D_tdstVector st3DPoint, ACP_tdxHandleOfElement hElement);*/
/*tdeGeomResult fn_eGetSquarePattern (ACP_tdxIndex *p_xWidth, MTH_tdxReal *p_xSquareDimX, ACP_tdxIndex *p_xDepth, MTH_tdxReal *p_xSquareDimY, ACP_tdxHandleOfElement hElement);*/
/*tdeGeomResult fn_eSetSquarePattern (ACP_tdxIndex xWidth, MTH_tdxReal xSquareDimX, ACP_tdxIndex xDepth, MTH_tdxReal xSquareDimY, ACP_tdxHandleOfElement hElement);*/
/*tdeGeomResult fn_eSetNbFaces (ACP_tdxIndex xNbSquares, ACP_tdxHandleOfElement hElement);*/
/* END CPA2 Cristi Petrescu 98-03-*/
/* indexed triangles transformations*/
void fn_vMoveFaceToFaceDescriptors(ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT, ACP_tdxIndex *p_xElementFMD, ACP_tdxIndex *p_xFaceFMD);
void fn_vMoveFaceDescriptorsToFace(ACP_tdxIndex xElementFMD, ACP_tdxIndex xFaceFMD, ACP_tdxIndex xElementIT, ACP_tdxIndex xFaceIT);
/**/
/* type verification*/
/**/
BOOL fn_bIsSphere (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumSphere = 0);
BOOL fn_bIsAlignedBox (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
BOOL fn_bIsCone (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumCone = 0);
BOOL fn_bIsIndexedTriangle (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumIT = 0);
BOOL fn_bIsPoint (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumPoint = 0);
BOOL fn_bIsLine (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumLine = 0);
/* BEGIN CPA2 Cristi Petrescu 98-03-*/
BOOL fn_bIsAltimap (ACP_tdxHandleOfElement hElement);
/* END CPA2 Cristi Petrescu 98-03-*/
BOOL fn_bIsFMD (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumFace = 0);
/*ROMTEAM WorldEditor (Viorel Preoteasa 20/01/98) */
public:
void fn_vEndModification (void);
/*protected:*/
/* void fn_vEndModification (void);*/
/*ENDROMTEAM WorldEditor (Viorel Preoteasa) */
GMT_tdxHandleToGameMaterial fn_hGetDefaultGameMaterial (void);
/*CPA2 Stegaru Cristian 98-05*/
ACP_tdxIndex mfn_iGetFacesNumber ();
MTH3D_tdstVector mfn_3dvGetMinCoordinates ();
MTH3D_tdstVector mfn_3dvGetMaxCoordinates ();
MTH3D_tdstVector mfn_3dvGetSizes (); /*dX, dY, dZ*/
/*End CPA2 Stegaru Cristian 98-05*/
protected:
void fn_vEndGMTModification (ACP_tdxHandleOfElement hElement, ACP_tdxIndex xDataElementIndex = 0);
tdeGeomResult fn_eModifyMinPoint (tdeModifType eModif,tdeCompoType eCompo,MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
tdeGeomResult fn_eModifyMaxPoint (tdeModifType eModif,tdeCompoType eCompo,MTH_tdxReal *p_xValue, ACP_tdxHandleOfElement hElement, ACP_tdxIndex xNumBox = 0);
GMT_tdxHandleToGameMaterial fn_hGetGameMaterial (ACP_tdxHandleOfElement _hElement, ACP_tdxIndex _xIndexInElement);
void fn_vComputeElementReferencedSectionName (char *_szSectionName, ACP_tdxHandleOfElement _hElement);
void fn_vInitElementSection (ACP_tdxHandleOfElement _hElement);
};
#endif /*__3DOBJECT_HPP__*/

View File

@@ -0,0 +1,73 @@
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Altimap3D.hpp: interface for the ITSphere3D class.*/
/* Author : Cristi Petrescu*/
/* Date : 98.02.05*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __Altimap3D_HPP__
#define __Altimap3D_HPP__
#ifdef USE_ALTIMAPS
#ifndef 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
#endif
class Altimap3D;
class CPA_EXPORT AltimapUndo : public CPA_Modif
{
/* the altimap object*/
Altimap3D *m_pAltimap3D;
/* the undo info*/
GEO_tdstElementAltimap *m_p_stAltimapUndo;
public:
AltimapUndo(Altimap3D *pAltimap3D);
BOOL Do () {return Undo ();};
BOOL Undo ();
~AltimapUndo (void);
};
class CPA_EXPORT Altimap3D : public Shape3D
{
friend class AltimapUndo;
private:
/*BOOL m_bNewAltimap; // if this is false, then try to adjust the old altimap*/
AltimapUndo *m_pAltimapUndo;
void CommonAltimap3D (ACP_tdxIndex xWidth = 10, ACP_tdxIndex xDepth = 10, MTH_tdxReal xSquareDimX = 1, MTH_tdxReal xSquareDimY = 1);
public:
/*Set the global parameters*/
void SetOrigin (MTH3D_tdstVector st3DPoint);
void SetWidth (ACP_tdxIndex xWidth);
void SetDepth (ACP_tdxIndex xDepth);
void SetSquareDimX (MTH_tdxReal xSquareDimX);
void SetSquareDimY (MTH_tdxReal xSquareDimY);
/*Get the global parameters*/
MTH3D_tdstVector GetOrigin (void);
ACP_tdxIndex GetWidth (void);
ACP_tdxIndex GetDepth (void);
MTH_tdxReal GetSquareDimX (void);
MTH_tdxReal GetSquareDimY (void);
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/* constructors & destructors*/
Altimap3D (CPA_EditorBase *_p_oEditor, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Altimap3D (CPA_EditorBase *_p_oEditor, ACP_tdxIndex xWidth = 10, ACP_tdxIndex xDepth = 10, MTH_tdxReal xSquareDimX = 1, MTH_tdxReal xSquareDimY = 1, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
~Altimap3D();
CPA_Modif *GetUndoData() {return m_pAltimapUndo = new AltimapUndo (this);};
};
#endif /* USE_ALTIMAPS*/
#endif /* */

View File

@@ -0,0 +1,68 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Arrow3D.hpp: interface for the Arrow3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ARROWS3D_HPP__
#define __ARROWS3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Arrow3D : public Shape3D
{
/* data*/
private:
ACP_tdxHandleOfElement m_hElement;
/* functions*/
private:
void CommonArrow3D();
public:
Arrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Arrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Arrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Arrow3D();
ACP_tdxHandleOfElement GetHElement(){return m_hElement;}
};
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* Name: : DoubleArrow3D:*/
/* Author : Ionut Grozea*/
/* Date : 01.05.1998*/
/* Description : DoubleArrow3D object.*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
class CPA_EXPORT DoubleArrow3D : public Shape3D
{
/* data*/
private:
ACP_tdxHandleOfElement m_hElement;
/* functions*/
private:
void CommonDoubleArrow3D();
public:
DoubleArrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
DoubleArrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
DoubleArrow3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~DoubleArrow3D();
ACP_tdxHandleOfElement GetHElement(){return m_hElement;}
};
#endif /**/

View File

@@ -0,0 +1,39 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Bar3D.hpp: interface for the Bar3D class.*/
/* Author : Viorel Preoteasa*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __BAR3D_HPP__
#define __BAR3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
class CPA_EXPORT Bar3D : public Shape3D
{
/* data*/
private:
ACP_tdxHandleOfElement m_hElement;
/* functions*/
private:
void CommonBar3D();
public:
Bar3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Bar3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Bar3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Bar3D();
ACP_tdxHandleOfElement GetHElement(){return m_hElement;}
};
#endif /**/

View File

@@ -0,0 +1,89 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Box3D.hpp: interface for the Box3D class.*/
/* Author : Cristi Petrescu*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/*////////////////////////////////////////////////////////////////////*/
#ifndef __Box3D_HPP__
#define __Box3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Box3D : public Shape3D
{
/* data*/
private:
/* for mouse resizing*/
MTH3D_tdstVector m_stCenterInMousePlane;
/* functions*/
private:
void CommonBox3D();
public:
/* mouse interface*/
/*virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);*/
virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/*virtual BOOL _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/
/*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/
/* manage esential data*/
/* All the Set functions return TRUE if the given value is correct, FALSE if not (for example, the given*/
/* MinPointX is greater than the actual MaxPointX. The MinPointX is then set to the MaxPointX)*/
/* In both case, the new value is returned*/
MTH3D_tdstVector GetMinPoint (); /* return the 3D coordinates of the point with the min coordinates*/
BOOL SetMinPoint (MTH3D_tdstVector *);
BOOL SetMinPointX (GLI_tdxValue *);
BOOL SetMinPointY (GLI_tdxValue *);
BOOL SetMinPointZ (GLI_tdxValue *);
BOOL IncMinPointX (GLI_tdxValue *);
BOOL IncMinPointY (GLI_tdxValue *);
BOOL IncMinPointZ (GLI_tdxValue *);
MTH3D_tdstVector GetMaxPoint (); /* return the 3D coordinates of the point with the max coordinates*/
BOOL SetMaxPoint (MTH3D_tdstVector *);
BOOL SetMaxPointX (GLI_tdxValue *);
BOOL SetMaxPointY (GLI_tdxValue *);
BOOL SetMaxPointZ (GLI_tdxValue *);
BOOL IncMaxPointX (GLI_tdxValue *);
BOOL IncMaxPointY (GLI_tdxValue *);
BOOL IncMaxPointZ (GLI_tdxValue *);
MTH3D_tdstVector GetCenter (); /* return the 3D coordinates of the center of the box*/
/* (in fact, it is the middle of the min point and the max point)*/
GLI_tdxValue GetLength (); /* return the length of the box*/
GLI_tdxValue GetWidth (); /* return the width of the box*/
GLI_tdxValue GetHeight (); /* return the height of the box*/
void SetCenter (MTH3D_tdstVector *); /* set the center of the box, dimensions are unchanged*/
void SetCenterX (GLI_tdxValue);
void SetCenterY (GLI_tdxValue);
void SetCenterZ (GLI_tdxValue);
BOOL SetLength (GLI_tdxValue *);
BOOL SetWidth (GLI_tdxValue *);
BOOL SetHeight (GLI_tdxValue *);
/* constructors/destructors*/
Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Box3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Box3D();
};
#endif /* */

View File

@@ -0,0 +1,73 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Cone3D.hpp: interface for the Cone3D class.*/
/* Author : Cristi Petrescu*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __Cone3D_HPP__
#define __Cone3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Cone3D : public Shape3D
{
/* data*/
private:
/* for mouse resizing*/
BOOL m_bChangeTopPointOfCone;
/*MTH3D_tdstVector m_stCenterInMousePlane;*/
/* functions*/
private:
void CommonCone3D();
public:
/* mouse interface*/
/*virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);*/
virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
/*virtual BOOL _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/
/*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/
virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/* manage esential data*/
MTH3D_tdstVector GetBasePoint (); /* Return the 3D coordinates of the base point*/
MTH3D_tdstVector GetTopPoint (); /* Return the 3D coordinates of the top point*/
void SetBasePoint (MTH3D_tdstVector *); /* Set the 3D coordinates of the base point*/
void SetTopPoint (MTH3D_tdstVector *); /* Set the 3D coordinates of the top point*/
void SetBasePointX (GLI_tdxValue);
void SetBasePointY (GLI_tdxValue);
void SetBasePointZ (GLI_tdxValue);
void SetTopPointX (GLI_tdxValue);
void SetTopPointY (GLI_tdxValue);
void SetTopPointZ (GLI_tdxValue);
MTH3D_tdstVector GetCenter ();
void SetCenter (MTH3D_tdstVector *);
GLI_tdxValue GetRadius (); /* Get the radius of the cone*/
BOOL SetRadius (GLI_tdxValue *); /* Set the radius of the cone. Return FALSE if value is not correct*/
GLI_tdxValue GetAngle (); /* Return the angle (in degrees) of the cone*/
BOOL SetAngle (GLI_tdxValue *); /* Set the angle (in degrees) of the cone. Return FALSE if value is not correct*/
/* constructors/destructors*/
Cone3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Cone3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Cone3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Cone3D();
};
#endif /* */

View File

@@ -0,0 +1,85 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : ITBox3D.hpp: interface for the ITBox3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ITBox3D_HPP__
#define __ITBox3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
/*#include "3dinterf.hpp" */
class ITBox3D;
class CPA_EXPORT ITBoxUndo : public CPA_Modif
{
float m_fX;
float m_fY;
float m_fZ;
ITBox3D *m_pBox;
BOOL m_bFirst;
public:
ITBoxUndo(ITBox3D *box);
BOOL Do(){ return m_bFirst ? TRUE : Undo();}
BOOL Undo();
};
class CPA_EXPORT ITBox3D : public Shape3D
{
/* data*/
private:
/* functions*/
private:
MTH3D_tdstVector m_stCenterInMousePlane;
public:
/* void SetScale(float fScale);*/
void SetScaleX(float fScale);
void SetScaleY(float fScale);
void SetScaleZ(float fScale);
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
void SetScaleXYZ(float fXScale, float fYScale, float fZScale);
virtual void mfn_vSave (CString csEPOFile, CString csEPOName, int iIdx);
virtual void mfn_vLoad (CString csEPOFile, CString csEPOName);
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
ITBox3D (CPA_EditorBase *_p_oEditor, float scale = 1.f ,const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
void CommonITBox3D();
void CreateITBox3D();
BOOL m_Flag;
float m_fGlobal;
float m_fX;
float m_fY;
float m_fZ;
float m_fXold;
float m_fYold;
float m_fZold;
ACP_tdxHandleOfElement GetHElement();
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL _OnMouseMove(UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
BOOL _OnLButtonDown(UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
~ITBox3D();
CPA_Modif *GetUndoData(){ return new ITBoxUndo(this); }
};
#endif /**/

View File

@@ -0,0 +1,85 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : ITCon3D.hpp: interface for the ITCon3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ITCon3D_HPP__
#define __ITCon3D_HPP__
#ifndef 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
#endif
class ITCon3D;
class CPA_EXPORT ITConUndo : public CPA_Modif
{
float m_fRadius;
float m_fHeight;
int m_Ns, m_Nt;
ITCon3D *m_pCon;
BOOL m_bFirst;
public:
ITConUndo(ITCon3D *con);
/* ~ITSphereUndo(){};*/
BOOL Do(){ return m_bFirst ? TRUE : Undo();}
BOOL Undo();
};
class CPA_EXPORT ITCon3D : public ParamSurface3D
{
private:
int m_Flag1,m_Flag2,m_Flag3;
BOOL m_Flag;
float m_fGlobal;
float m_fRadius;
float m_fHeight;
float m_fRadiusold;
float m_fHeightold;
float resultold;
int i;
ACP_tdxHandleOfElement m_hElement;
int m_Ns, m_Nt;
MTH3D_tdstVector m_stCenterInMousePlane;
private:
void CommonITCon3D(float radius , float height, int ns, int nt);
public:
float x(float s, float t);
float y(float s, float t);
float z(float s, float t);
ACP_tdxHandleOfElement GetHElement();
BOOL SetRadius(GLI_tdxValue Radius);
BOOL SetHeight(GLI_tdxValue Radius);
void SetSamplingRate(int Ns, int Nt);
void GetSamplingRate(int &Ns, int &Nt);
GLI_tdxValue GetRadius();
GLI_tdxValue GetHeight();
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL _OnMouseMove(UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
BOOL _OnLButtonDown(UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
/* constructors & destructors*/
ITCon3D (CPA_EditorBase *_p_oEditor, float radius = 1.f , float height = 1.f, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
ITCon3D (CPA_EditorBase *_p_oEditor, float radius = 1.f , float height = 1.f, int ns = 10, int nt = 10, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
~ITCon3D();
CPA_Modif *GetUndoData(){ return new ITConUndo(this); }
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
virtual void mfn_vSave (CString csEPOFile, CString csEPOName, int iIdx);
virtual void mfn_vLoad (CString csEPOFile, CString csEPOName);
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
};
#endif /* */

View File

@@ -0,0 +1,77 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : ITSphere3D.hpp: interface for the ITSphere3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ITSphere3D_HPP__
#define __ITSphere3D_HPP__
#ifndef 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
#endif
class ITSphere3D;
class CPA_EXPORT ITSphereUndo : public CPA_Modif
{
float m_fRadius;
int m_Ns, m_Nt;
ITSphere3D *m_pSphere;
BOOL m_bFirst;
public:
ITSphereUndo(ITSphere3D *sphere);
/* ~ITSphereUndo(){};*/
BOOL Do(){ return m_bFirst ? TRUE : Undo();}
BOOL Undo();
};
class CPA_EXPORT ITSphere3D : public ParamSurface3D
{
private:
float m_fRadius;
ACP_tdxHandleOfElement m_hElement;
int m_Ns, m_Nt;
MTH3D_tdstVector m_stCenterInMousePlane;
private:
void CommonITSphere3D(float radius, int ns, int nt);
public:
float x(float s, float t);
float y(float s, float t);
float z(float s, float t);
ACP_tdxHandleOfElement GetHElement();
BOOL SetRadius(GLI_tdxValue Radius);
void SetSamplingRate(int Ns, int Nt);
void GetSamplingRate(int &Ns, int &Nt);
GLI_tdxValue GetRadius();
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
BOOL _OnMouseMove(UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
BOOL _OnLButtonDown(UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
/* constructors & destructors*/
ITSphere3D (CPA_EditorBase *_p_oEditor, float radius = 1.f , const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
ITSphere3D (CPA_EditorBase *_p_oEditor, float radius = 1.f , int ns = 10, int nt = 10, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
~ITSphere3D();
CPA_Modif *GetUndoData(){ return new ITSphereUndo(this); }
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
virtual void mfn_vSave (CString csEPOFile, CString csEPOName, int iIdx);
virtual void mfn_vLoad (CString csEPOFile, CString csEPOName);
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
};
#endif /* */

View File

@@ -0,0 +1,45 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : ITObject3D.hpp: interface for the ITObject3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __ITObject3D_HPP__
#define __ITObject3D_HPP__
#ifndef 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
#endif
class CPA_EXPORT ITObject3D : public Shape3D
{
private:
private:
void CommonITObject3D(int vi_x ,int vi_y, float( *vf_Ver )[3] , WORD (*vf_IT)[3]);
void CreateITObject3D(int vi_x ,int vi_y, float(* vf_Ver )[3] , WORD (*vf_IT)[3]);
int m_vi_x;
int m_vi_y;
public:
ACP_tdxHandleOfElement GetHElement();
BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
void SetScaleX(float fScale);
void SetScaleY(float fScale);
void SetScaleZ(float fScale);
/* constructors & destructors*/
/*ROMTEAM WorldEditor (Cristian Stegaru 12/97)*/
ITObject3D (CPA_EditorBase *_p_oEditor ,int vi_x ,int vi_y, float(* vf_Ver )[3] , WORD (*vf_IT)[3] , const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
~ITObject3D();
};
#endif /* */

View File

@@ -0,0 +1,67 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Line3D.hpp: interface for the Line3D, Arc3D and Bezier3D classes.*/
/* Author : Viorel Preoteasa*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __LINE3D_HPP__
#define __LINE3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/*jawka*/
/*#include "..\\Ai\\AiBase\\Mth_CiAr.h"*/
/*#include "..\\Ai\\AiBase\\Way_Dyna.h"*/
#include "mth.h"
#include "acp_base.h"
#include "gld.h"
/*#include "..\\Ai\\AiBase\\Mth_Bez.h"*/
/* no geometric object created : */
#define EDWAY_C_ucModeNoObject 0
/* a geometric object is created */
#define EDWAY_C_ucModeRealObject 1
class CPA_EXPORT Line3D
{
/* data*/
protected:
ACP_tdxHandleOfObject m_hGeometricObject;
ACP_tdxHandleOfElement m_hLineElement;
long m_lColor;
GLD_tdstViewportAttributes *m_pstViewPortAttributes;
MTH3D_tdstVector **m_dstListOfPoints;
ACP_tdstDynaParam *m_pstDynaParams;
unsigned char m_ucObjectMode;
/* functions*/
protected:
MTH3D_tdstVector *GetListOfPoints();
public:
Line3D ();
~Line3D();
void SetColor(long lColor){m_lColor = lColor;}
void SetViewPortAttributes(GLD_tdstViewportAttributes *pstViewPortAttributes){m_pstViewPortAttributes = pstViewPortAttributes;}
void Draw();
virtual unsigned char GetSamplingRate() = 0;
void GetPoint(unsigned char _ucSamplingNumber, MTH3D_tdstVector*_pstSampledPoint);
long GetColor(){return m_lColor;}
/* GLD_tdstViewportAttributes *GetViewPortAttributes(){return m_pstViewPortAttributes;}*/
};
#endif /**/

View File

@@ -0,0 +1,41 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Oktaedron3D.hpp: interface for the Oktaedron3D class.*/
/* Author : Ionut Grozea*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __Oktaedron3D_HPP__
#define __Oktaedron3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Oktaedron3D : public Shape3D
{
public:
Oktaedron3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Oktaedron3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Oktaedron3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Oktaedron3D();
private:
void CommonOktaedron3D();
};
#endif

View File

@@ -0,0 +1,48 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : ParamSurface3D.hpp: interface for the ParamSurface3D class.*/
/* Author : Viorel Preoteasa*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __PARAMSURFACE3D_HPP__
#define __PARAMSURFACE3D_HPP__
#ifndef 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
#endif
class CPA_EXPORT ParamSurface3D : public Shape3D
{
private:
int m_IndexTriangleNb;
void CommonParamSurface3D();
float Dist(MTH3D_tdstVector &a, MTH3D_tdstVector &b);
protected:
/*ROMTEAM WorldEditor (Cristian Stegaru 12/97)*/
/*tested in NewElement method; first time it is true, then false*/
BOOL m_bFirstInit;
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
public:
ACP_tdxHandleOfElement NewElement(ACP_tdxHandleOfElement hElement, int ns, int nt);
virtual float x(float s, float t){return s;}
virtual float y(float s, float t){return t;}
virtual float z(float s, float t){return s+t;}
ParamSurface3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
ParamSurface3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
ParamSurface3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~ParamSurface3D();
/*private:*/
/* void CommonShape3D (void);*/
};
#endif /* PARAMSURFACE3D_HPP__*/

View File

@@ -0,0 +1,48 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Plane3D.hpp: interface for the Plane3D class.*/
/* Author : Viorel Preoteasa*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __PLANE3D_HPP__
#define __PLANE3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Plane3D : public Shape3D
{
/* data*/
private:
ACP_tdxHandleOfElement m_hElement[3];
/* functions*/
private:
void CommonPlane3D();
public:
ACP_tdxHandleOfElement GetHElement(int i){return m_hElement[i];}
/* constructors/destructors*/
Plane3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Plane3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Plane3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Plane3D();
};
#endif /* PLANE3D*/

View File

@@ -0,0 +1,70 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Point3D.hpp: interface for the Point3D class.*/
/* Author : Cristi Petrescu*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __Point3D_HPP__
#define __Point3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Point3D : public Shape3D
{
/* data*/
private:
/* for mouse resizing*/
MTH3D_tdstVector m_stCenterInMousePlane;
/* functions*/
private:
void CommonPoint3D();
public:
/* mouse interface*/
/* this object is not mouse editable*/
/*virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);*/
/*virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);*/
/*virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);*/
virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/*virtual BOOL _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/
/*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/
/* manage esential data*/
MTH3D_tdstVector GetPoint (); /* return the 3D coordinates of the point*/
void SetPoint (MTH3D_tdstVector *); /* set the 3D coordinates of the point*/
void SetPointX (GLI_tdxValue);
void SetPointY (GLI_tdxValue);
void SetPointZ (GLI_tdxValue);
MTH3D_tdstVector GetCenter () { return GetPoint (); }
void SetCenter (MTH3D_tdstVector * _pCenter) { SetPoint (_pCenter); }
void SetColorOfPoint (BOOL _bSelected); /* Set the color of the point : selected or not selected*/
private:
void UpdateTestPointPosition (); /* Set the position of the test point with the position of the point*/
public:
/* constructors/destructors*/
Point3D (CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Point3D (CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Point3D (CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Point3D();
};
#endif /* */

View File

@@ -0,0 +1,103 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Shape3D.h: interface for the Shape3D class.*/
/* Author : Ionut Grozea & Cristi Petrescu*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* (c) Ubi Studios 1997*/
/* See Ionut & Cristi for any comment or question*/
#ifndef __SHAPE3D_HPP__
#define __SHAPE3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class Geometry3D_Interface;
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
#define STR_LENGTH 200
#define NB_LENGTH 10
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
class CPA_EXPORT Shape3D : public Geometry3D
{
/* data*/
protected:
/* activate/inactivate user interactions*/
BOOL m_bModifiable;
/* for the mouse interaction (resizing)*/
BOOL m_bActiveMode;
MTH3D_tdstVector m_stGlobalSelectedPoint; /* The 3D coordinates of the point of the object pointed by the mouse in the global repere*/
MTH3D_tdstVector m_stLocalSelectedPoint; /* The 3D coordinates of the same point in the local repere*/
/* the super object for real positioning*/
/* we need that because we ought to know where is our object placed in space*/
CPA_SuperObject *m_pSuperObject;
/* engine handle*/
ACP_tdxHandleOfElement m_hElement;
/* keyboard*/
static BOOL m_bSizeKeyPressed;
/* the Geometric DLL*/
static Geometry3D_Interface *m_pGeometry3DDLL;
/* members*/
public:
/*ROMTEAM WorldEditor (Cristian Stegaru 01/98)*/
virtual void mfn_vSave (CString csEPOFile, CString csEPOName, int iIdx);
virtual void mfn_vLoad (CString csEPOFile, CString csEPOName);
void EndCreate();
/*ENDROMTEAM WorldEditor (Cristian Stegaru)*/
/* inits, for data like keyb configuration*/
static void SetGeometry3DDLL (Geometry3D_Interface *pGeometry3DDLL) {m_pGeometry3DDLL = pGeometry3DDLL;};
/* mouse interface*/
virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);
virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/* keyboard interface*/
static BOOL _OnKeyUp (UINT nChar , UINT nRepCnt = 0, UINT nFlags = 0);
static BOOL _OnKeyDown(UINT nChar, UINT nRepCnt = 0, UINT nFlags = 0);
/* constructors/destructor*/
Shape3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Shape3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements, CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Shape3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
/* access the Engine handle*/
ACP_tdxHandleOfElement GetEngineHandle () {return m_hElement;};
/* set the SuperObject*/
void SetSuperObject (CPA_SuperObject *pSuperObject) {m_pSuperObject = pSuperObject;};
/* essential data*/
virtual MTH3D_tdstVector GetCenter () { MTH3D_tdstVector jj; return jj; }; /* return the 3D coordinates of the center of the sphere*/
virtual void SetCenter (MTH3D_tdstVector *) {}; /* set the 3D coordinates of the center of the sphere*/
virtual CPA_Modif *GetUndoData(){ return NULL; }
~Shape3D();
protected:
void ConvertPointGlobalToLocal (MTH3D_tdstVector * pDest , POS_tdstCompletePosition * pAbsoluteMatrix , MTH3D_tdstVector * pSource);
void ConvertPointLocalToGlobal (MTH3D_tdstVector * pDest , POS_tdstCompletePosition * pAbsoluteMatrix , MTH3D_tdstVector * pSource);
void ConvertVectorGlobalToLocal (MTH3D_tdstVector * pDest , POS_tdstCompletePosition * pAbsoluteMatrix , MTH3D_tdstVector * pSource);
void ConvertVectorLocalToGlobal (MTH3D_tdstVector * pDest , POS_tdstCompletePosition * pAbsoluteMatrix , MTH3D_tdstVector * pSource);
private:
void CommonShape3D (void);
};
#endif /* __SHAPE3D_HPP__*/

View File

@@ -0,0 +1,67 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Sphere3D.hpp: interface for the Sphere3D class.*/
/* Author : Cristi Petrescu*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __SPHERE3D_HPP__
#define __SPHERE3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Sphere3D : public Shape3D
{
/* data*/
private:
/* for mouse resizing*/
MTH3D_tdstVector m_stCenterInMousePlane;
/* functions*/
private:
void CommonSphere3D();
public:
/* mouse interface*/
/*virtual BOOL _OnLButtonUp (UINT nFlags, tdstMousePos * p_stPos);*/
virtual BOOL _OnLButtonDown (UINT nFlags, tdstMousePos * p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo * p_stObject);
virtual BOOL _OnMouseMove (UINT nFlags, tdstMousePos * p_stPos, MTH3D_tdstVector * pDeplacement);
/*virtual BOOL _OnKeyUp (UINT nChar , UINT nRepCnt , UINT nFlags);*/
/*virtual BOOL _OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);*/
virtual BOOL _OnLButtonDblClk (UINT nFlags, tdstMousePos *p_stPos, ACP_tdxIndex xIndex, HIE_tdstPickInfo *p_stPickInfo);
/* manage esential data*/
MTH3D_tdstVector GetCenter (); /* return the 3D coordinates of the center of the sphere*/
void SetCenter (MTH3D_tdstVector *); /* set the 3D coordinates of the center of the sphere*/
void SetCenterX (GLI_tdxValue);
void SetCenterY (GLI_tdxValue);
void SetCenterZ (GLI_tdxValue);
GLI_tdxValue GetRadius (); /* return the radius of the sphere*/
BOOL SetRadius (GLI_tdxValue * _Radius); /* set the radius of the sphere*/
/* Return FALSE if the given value if not correct*/
/* (that is, negative. Radius is then set to 0).*/
/* The new radius is returned in * _Radius.*/
/* constructors/destructors*/
Sphere3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Sphere3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Sphere3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Sphere3D();
};
#endif /* */

View File

@@ -0,0 +1,48 @@
/*ROMTEAM WorldEditor*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
/* File : Symbolical3D.hpp: interface for the Symbolical3D class.*/
/* Author : Viorel Preoteasa*/
/* Date : 97.11*/
/* Description :*/
/*//////////////////////////////////////////////////////////////////////////////////////*/
#ifndef __SYMBOLICAL3D_HPP__
#define __SYMBOLICAL3D_HPP__
/****************************************/
#ifndef 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
#endif
/****************************************/
/****************************************/
/* classes*/
/****************************************/
class CPA_EXPORT Symbolical3D : public Shape3D
{
/* data*/
private:
ACP_tdxHandleOfElement m_hElement;
/* functions*/
private:
void CommonSymbolical3D();
public:
ACP_tdxHandleOfElement GetHElement(){return m_hElement;}
/* constructors/destructors*/
Symbolical3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ const CString _csName = "", tdeSaveStatus _eStatus = E_ss_NoSave);
Symbolical3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, /*ACP_tdxIndex xNbPoints, ACP_tdxIndex xNbElements,*/ CPA_BaseObject *_p_oOwnerFile, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Responsible);
Symbolical3D (BOOL bModifiable, CPA_EditorBase *_p_oEditor, CPA_BaseObject *_p_oOwnerFile, ACP_tdxHandleOfObject _hObject, const CString _csName = "", char *_p_cRefPath = NULL, tdeSaveStatus _eStatus = E_ss_Modify);
~Symbolical3D();
};
#endif /* Symbolical3D*/