Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

hyp.file.implx.h

00001 /*
00002 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00003  Ephydryne Components.
00004  Ephydryne is a part of the Hyperion Project.
00005 ----------------------------------------------------------
00006  Copyright (c) 2001 Pierre Rebours.
00007 
00008  This library is free software; you can redistribute it and/or
00009  modify it under the terms of the GNU Lesser General Public
00010  License as published by the Free Software Foundation; either
00011  version 2.1 of the License, or (at your option) any later version.
00012 
00013  This library is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  
00017  See hyp.license.txt file for more information about the license.
00018  
00019  Web: http://lagrandeporte.multimania.com/hyperion
00020  Email: pierre_rebours@yahoo.com
00021 ----------------------------------------------------------
00022  CVS
00023  $Log$
00024  
00025  Creation 24/03/01 Pierre Rebours
00026 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00027 */
00028 
00029 //implementeur d'un modèle pont "degénéré", car un seul format
00030 
00031 
00032 #ifndef _hyp_file_implx_h_
00033 #define _hyp_file_implx_h_
00034 
00035 
00045 class CXImplFile :
00046 public CImplBase,
00047 public ID3DMeshObject,
00048 hyp_ker::CUnknown
00049 {
00050 public:
00052         CXImplFile(hyp_ker::IUnknown*);
00053         virtual ~CXImplFile();
00054         hyp_DECLARE_IUNKNOWN
00055         virtual hyp_ker::com_result NondelegatingQueryInterface(const hyp_ker::hypIID&,void**);
00056         static hyp_ker::com_result CreateInstance(hyp_ker::IUnknown* ,hyp_ker::CUnknown**);
00057         hyp_ker::com_result Init(void); 
00058         void FinalRelease(void);
00060 
00064         virtual void SetObject(hyp_ker::IUnknown* pObject) {
00065                 CImplBase::SetObject(pObject);
00066         }
00068         
00072         virtual void InitializeD3DMeshBuilder(LPDIRECT3DRMMESHBUILDER3);
00073         virtual void SaveD3DMeshBuilder(const std::string&);
00074         virtual void SaveD3DHypMesh(const std::string&);
00075         virtual void LoadD3DHypMesh(const std::string&);
00077 
00078         class CXOF {
00079                 CXImplFile* m_pImplFile;
00080         protected:
00081                 CXOF(CXImplFile* impl_file) : m_pImplFile(impl_file) { }
00082                 inline hyp_ker::IUnknown* GetMeshUnknown(void) {
00083                         return m_pImplFile->m_spUnknownMesh;
00084                 }
00085                 inline LPDIRECTXFILE GetXOFile(void) {
00086                         return m_pImplFile->m_spDXFile;
00087                 }
00088                 
00089                 DWORD GetVertexProperties(const CMeshData::SVertex&);
00090                 DWORD GetVertexDOF(const CMeshData::SVertex&);
00091                 void SetVertexDOF(const CFlag&,hyp_fem::IFEOBoundaryConditions*);
00092                 void SetVertexProperties(const CFlag&,hyp_fem::IGeometricVertex*);              
00093         };
00094 
00095         class CXOFSave :
00096         protected CXOF {
00097         public:
00098                 CXOFSave(CXImplFile*, const std::string&);
00099                 ~CXOFSave();
00100 
00101                 void SaveMesh(void);
00102                 void SaveMatrix(void);
00103                 void SaveGeometry(void);
00104 
00105         private:
00106                 void CreateDataObject(REFGUID, LPCSTR,const GUID*,DWORD,LPVOID);                        
00107                 LPDIRECTXFILESAVEOBJECT m_pXOFSave;
00108         };
00109         
00110         class CXOFLoad :
00111         protected CXOF {
00112         public:
00113                 CXOFLoad(CXImplFile*,const std::string&);
00114                 ~CXOFLoad();
00115                 void Load(void);
00116                 void LoadMesh(LPDIRECTXFILEDATA);
00117                 void LoadMatrix(LPDIRECTXFILEDATA);
00118 
00119         private:                
00120                 LPDIRECTXFILEENUMOBJECT m_pXOFEnum;
00121         };
00122 
00123         
00124         
00125 private:
00126         hyp_ker::CSmartInterface<IDirectXFile> m_spDXFile;
00127 
00128         friend CXOF;
00129 };
00130 
00131 
00132 #endif

Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.