//ROMTEAM WorldEditor //////////////////////////////////////////////////////////////////////////////////////// // File : ITObject.cpp: implementation of the ITObject class. // Author : Ionut Grozea // Date : 97.11 // Description : //////////////////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "ACP_Base.h" #include "ITF.h" #include "incGAM.h" #include "GLI.h" #include "DPT.h" #undef CPA_WANTS_IMPORT #undef CPA_EXPORT #define CPA_WANTS_EXPORT #include "OGD.h" #undef CPA_WANTS_EXPORT #ifndef CPA_WANTS_IMPORT #define CPA_WANTS_IMPORT #endif #include "3dinterf.hpp" #include "DlgObject.h" ////////////////////////////////////////////////////////////////////////////////////////////////////// // Method : ITObject3D::ITObject3D // Date : 97.11 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Description : constructor to create a new object // Author : Ionut Grozea ////////////////////////////////////////////////////////////////////////////////////////////////////// // Modification : add _csName in constructor // Date : 97.12 // By : Cristian Stegaru ////////////////////////////////////////////////////////////////////////////////////////////////////// ITObject3D::ITObject3D (CPA_EditorBase *_p_oEditor ,int vi_x ,int vi_y , float(* vf_Ver )[3] , WORD (*vf_IT)[3] , const CString _csName, tdeSaveStatus _eStatus) : Shape3D (TRUE , _p_oEditor, vi_x*vi_y ,1 , _csName, _eStatus) { m_vi_x = vi_x ; m_vi_y = vi_y; CommonITObject3D ( vi_x , vi_y, vf_Ver , vf_IT); } ////////////////////////////////////////////////////////////////////////////////////////////////////// // Method : ITObject3D::CreateITObject3D // Date : 97.11 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Description : set vertices of ITObject3D // Author : Ionut Grozea ////////////////////////////////////////////////////////////////////////////////////////////////////// // Modification : // Date : // By : ////////////////////////////////////////////////////////////////////////////////////////////////////// void ITObject3D::CreateITObject3D(int vi_x ,int vi_y, float(* vf_Ver )[3] , WORD (*vf_IT)[3]) { int i; MTH3D_tdstVector *pa13_stPoint = new MTH3D_tdstVector[vi_x*vi_y]; for (i = 0 ; iGetDLLIdentity()->hModule ); //problems // CDlgObject dlg(this) ; // if ( dlg.DoModal()==IDOK) // { // SetRadius(dlg.m_fRadius); // SetSamplingRate(dlg.m_Nx, dlg.m_Ny); // } AfxSetResourceHandle(hOldInst); return TRUE; } ////////////////////////////////////////////////////////////////////////////////////////////////////// // Method :ITObject3D::SetScaleX // Date : 97.11 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Description : set scale x of ITObject3D // Author : Ionut Grozea ////////////////////////////////////////////////////////////////////////////////////////////////////// // Modification : // Date : // By : ////////////////////////////////////////////////////////////////////////////////////////////////////// void ITObject3D::SetScaleX(float fScale) { int i; MTH3D_tdstVector* p_stPoint = new MTH3D_tdstVector; for ( i=0 ; ixX = (p_stPoint->xX)*fScale; fn_vSetPoint (i , p_stPoint); } delete[] p_stPoint; } ////////////////////////////////////////////////////////////////////////////////////////////////////// // Method :ITObject3D::SetScaleY // Date : 97.11 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Description : set scale y of ITObject3D // Author : Ionut Grozea ////////////////////////////////////////////////////////////////////////////////////////////////////// // Modification : // Date : // By : ////////////////////////////////////////////////////////////////////////////////////////////////////// void ITObject3D::SetScaleY(float fScale) { int i; MTH3D_tdstVector* p_stPoint = new MTH3D_tdstVector; for ( i=0 ; ixY = (p_stPoint->xY)*fScale; fn_vSetPoint (i , p_stPoint); } delete[] p_stPoint; } ////////////////////////////////////////////////////////////////////////////////////////////////////// // Method :ITObject3D::SetScaleY // Date : 97.11 ////////////////////////////////////////////////////////////////////////////////////////////////////// // Description : set scale y of ITObject3D // Author : Ionut Grozea ////////////////////////////////////////////////////////////////////////////////////////////////////// // Modification : // Date : // By : ////////////////////////////////////////////////////////////////////////////////////////////////////// void ITObject3D::SetScaleZ(float fScale) { int i; MTH3D_tdstVector* p_stPoint = new MTH3D_tdstVector; for ( i=0 ; ixZ = (p_stPoint->xZ)*fScale; fn_vSetPoint (i , p_stPoint); } delete[] p_stPoint; }