Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Flow3DDoc.h

00001 // Flow3DDoc.h : interface of the CFlow3DDoc class
00002 //
00004 #include "MyAlgoOptDialog.h"
00005 #include "VectorField.h"
00006 #include "StreamlineQueue.h"
00007 #include "MyMaterialDialog.h"   // Added by ClassView
00008 #include "Point3D.h"    // Added by ClassView
00009 #include "Defines.h"
00010 #include "StreamlinePiece.h"
00011 #include "DSepGrid.h"
00012 #include "MyAxisCross.h"
00013 #include "MyHistoDialog.h"
00014 #include "MyContTransfDialog.h"
00015 #include "MyRegPropDialog.h"
00016 #include "MyFocusContextDialog.h"
00017 
00018 #if !defined(AFX_FLOW3DDOC_H__44A19073_6C34_494B_8782_6CB89A05907A__INCLUDED_)
00019 #define AFX_FLOW3DDOC_H__44A19073_6C34_494B_8782_6CB89A05907A__INCLUDED_
00020 
00021 #if _MSC_VER > 1000
00022 #pragma once
00023 #endif // _MSC_VER > 1000
00024 
00026 class CFlow3DDoc : public CDocument
00027 {
00028 protected: // create from serialization only
00029         CFlow3DDoc();
00030         DECLARE_DYNCREATE(CFlow3DDoc)
00031 
00032 // Attributes
00033 public:
00035         RegProp m_RegProp[DEF_REGPROP_NUM];
00036 
00038         ContextProp m_ContextProp;
00040         ContTransfProp m_ContTransfProp[DEF_CONTTRANSFVALUES_NUM];
00041 
00043         float * m_EndTapTable;
00044 
00046         MyObject *m_MagicVolume;
00047 
00049         float *m_MinScalars;
00051         float *m_MaxScalars;
00052 
00054         CPoint3D m_MaxPos;
00056         CPoint3D m_MinPos;
00057 
00059         int m_PeriodLength;
00060 
00062         POSITION *m_AnimStartTbl;
00064         POSITION *m_AnimEndTbl;
00065 
00067         bool m_IsAnimation;
00069         bool m_IsArrows;
00070 
00072         int m_AlphaTblWidth;
00073 
00075         GLubyte *m_AlphaTable;
00076 
00078         int m_MagicVolType;
00079 
00081         MyRectangle m_Boundaries;
00082 
00084         CPoint3D m_BlMinPos;
00085 
00087         CPoint3D m_BlMaxPos;
00088 
00090         float m_BlZOffs;
00091 
00093         CStreamlineMaterial m_BlMaterial;
00094 
00096         bool m_IsPlaceSeedPoint;
00097 
00099         int m_RecalcType;
00100 
00102         int m_AnimSpeed;
00103 
00105         int m_AnimType;
00106 
00107 // Operations
00108 public:
00110         void CalcFieldMinMaxPos();
00112         void UpdateAnimIndex();
00114         void CreateAnimIndexTbl();
00116         void DoInsideTest();
00118         void UpdateContextProp();
00120         int GetAddInfoRepr();
00122         void SetAddInfoRepr(int repr);
00124         void CreateMinMaxScalars();
00125 
00127         float *CreateEndTapTable(int width);
00128 
00130         CVectorField *GetCurrentField();
00131 
00133         int GetCaPerSP();
00135         int GetResNum();
00136 
00138         int GetMaxIterations();
00139 
00141         float GetDt();
00143         float GetDTest();
00145         float GetDSepPerc();
00146 
00148         float GetMaxXPos();
00150         float GetMaxYPos();
00152         float GetMaxZPos();
00154         float GetMinXPos();
00156         float GetMinYPos();
00158         float GetMinZPos();
00159 
00161         float GetXRange();
00163         float GetYRange();
00165         float GetZRange();
00166 
00168         float GetMinDistPerc();
00169 
00171         int GetStreamlinesNum();
00172 
00174         long GetDisplSamplePNum();
00175 
00177         long GetSamplePointsNum();
00178 
00180         long GetCalculationTime();
00181 
00183         bool GetIsCorrectOrder();
00184 
00186         bool GetIsTapering();
00187 
00189         bool GetUseDisplayLists();
00190 
00191         
00193         bool GetIsAddInfo();
00194 
00196         bool GetIsCutLines();
00197 
00199         bool GetIsMagicVol();
00200 
00202         bool GetIsIncremential();
00203         
00205         bool GetIsCalcIncr();
00206 
00208         bool GetIsFocusContext();
00209 
00211         float GetInterPos();
00212 
00214         int GetAddInfoType();
00215         
00217         float GetScalar(int index, CStreamlinePiece *piece);
00218         
00220         void SetIsTapering(bool isTapering);
00221 
00223         void SetIsCutLines(bool isCutLines);
00224 
00226         void SetIsCorrectOrder(bool isCorrectOrder);
00227 
00229         void SetIsAddInfo(bool isAddInfo);
00230 
00232         void SetMinDistPerc(float minDistPerc);
00233 
00235         void SetUseDisplayLists(bool useDisplayLists);
00236 
00237         
00239         void SetAddInfoType(int addInfoType);
00240 
00242         void SetInterPos(float interPos);
00243 
00245         void UpdateMinMaxPos();
00246 
00248         void SetIsMagicVol(bool isMagicVol);
00249 
00251         void SetIsFocusContext(bool isFocusContext);
00252 
00254         float ThicknessCoeff(CSamplePoint *samplePoint);
00255 
00257         CObList * GetStreamlines();
00258         
00260         void CalcMinMaxScalars();
00261 
00263         CObList * GetXList();
00265         CObList * GetYList();
00267         CObList * GetZList();
00268         
00270         MyAxisCross * GetSeedPCross();
00271         
00273         POSITION InsertXList(CStreamlinePiece *piece, POSITION pos, bool sort);
00275         POSITION InsertYList(CStreamlinePiece *piece, POSITION pos, bool sort);
00277         POSITION InsertZList(CStreamlinePiece *piece, POSITION pos, bool sort);
00278 
00280         void UpdatePiecesLists();
00281 
00283         void UpdatePiece(CStreamlinePiece *piece, float *scalarVals);
00284 
00286         void Recalc();
00287 
00289         void CreateField();
00290 
00292         void InsertPiecesLists(CStreamline *streamline);
00293 
00295         void ResortPiecesLists();
00296 
00298         void DeletePiecesLists();
00299 
00301         void DeleteStreamlines();
00302 
00304         int GetIntegratorType();
00305 
00307         int GetInterpolatorType();
00308 
00310         void UpdateResIndex(RegProp &prop);
00311 
00313         int     GetEndTapWidth();
00315         void SetEndTapWidth(int width);
00316 
00318         bool GetIsEndTap();
00320         void SetIsEndTap(bool isEndTap);
00321 
00323         int CalcEndTapIndex(int index, int width, int lineLength);
00324         
00326         void CalcArrow_EndTap();
00327 
00329         bool IsDraw(bool &isInside, CStreamlinePiece *piece, int res, 
00330                                 int focusRes, int contextRes);
00331 
00333         void GetMinMaxScalar(int index, float &minScalar, float &maxScalar);
00334 
00335         // Sets property values for continuous transfer function.
00336         void SetContTransfProp(int index, ContTransfProp &prop);
00337         // Sets property values for continuous transfer function.
00338         void GetContTransfProp(int index, ContTransfProp &prop);
00339 
00341         void CalcIsDraw();
00342 
00343         // Initialises scalar regions.
00344         void InitRegions();
00345 
00346         // Initialises continuous scalar transfer function properties.
00347         void InitContTransfProp();
00348 
00349         virtual ~CFlow3DDoc();
00350 
00351         
00352 private:
00353         int m_AnimTblWidth;
00354         int m_MaxResIndex;
00355 
00356         int m_AddInfoRepr;
00357         bool m_IsEndTap;
00358         int m_EndTapWidth;
00359         CObList m_LinePieces;
00360         CObList m_Streamlines;
00361 
00362         int m_ResNum;
00363         int m_CalcResNum;
00364 
00365         MyAxisCross m_SeedPCross;
00366         
00367         bool m_IsCalcIncr;
00368         bool m_IsIncremential;
00369 
00370         bool m_IsCutLines;
00371 
00372         int m_MaxIterations;
00373         int m_IntegratorType;
00374         int m_InterpolatorType;
00375         int m_CaPerSP;
00376 
00377         float m_DSepPerc;
00378         float m_DTest;
00379         float m_Dt;
00380         
00381         CDSepGrid m_DSepGrid;
00382 
00384         bool m_IsFocusContext;
00385 
00387         bool m_IsMagicVol;
00388 
00390         float m_MinDistPerc;
00391         
00393         int m_AddInfoType;
00394 
00396         float m_InterPos;
00397         
00399         bool m_IsRegions;
00401         bool m_IsAddInfo;
00403         bool m_IsContTransf;
00404 
00406         long m_DisplSamplePNum;
00408         long m_CalculationTime;
00410         long m_SamplePointsNum;
00412         int m_StreamlinesNum;
00413 
00415         bool m_UseDisplayLists;
00417         bool m_IsCorrectOrder;
00418 
00420         bool m_IsTapering;
00421 
00423         float m_Param1;
00425         float m_Param2;
00427         float m_Param3;
00429         int m_ZDim;
00431         int m_YDim;
00433         int m_XDim;
00435         int m_SamplerType;
00437         bool m_IsSampleAddInfo;
00438 
00439         // Current vectorfield.
00440         CVectorField *m_CurrentField;
00441         
00443         CObList m_ZList;
00445         CObList m_YList;
00447         CObList m_XList;
00448 
00449 // Overrides
00450         // ClassWizard generated virtual function overrides
00451         //{{AFX_VIRTUAL(CFlow3DDoc)
00452         public:
00453         virtual BOOL OnNewDocument();
00454         virtual void Serialize(CArchive& ar);
00455         virtual void DeleteContents();
00456         //}}AFX_VIRTUAL
00457 
00458 // Implementation
00459 public:
00460         
00461                 
00462 #ifdef _DEBUG
00463         virtual void Dump(CDumpContext& dc) const;
00464 #endif
00465 
00466 protected:
00467 
00468 // Generated message map functions
00469 protected:
00470         //{{AFX_MSG(CFlow3DDoc)
00471         afx_msg void OnOptionsAlgorithm();
00472         afx_msg void OnSetFieldSamplingOptions() ;
00473         afx_msg void OnSetResolutionOptions();
00474         afx_msg void OnOpenData();
00475         afx_msg void OnSaveDataAs();
00476         //}}AFX_MSG
00477         DECLARE_MESSAGE_MAP()
00478 
00479 };
00480 
00482 
00483 //{{AFX_INSERT_LOCATION}}
00484 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00485 
00486 #endif // !defined(AFX_FLOW3DDOC_H__44A19073_6C34_494B_8782_6CB89A05907A__INCLUDED_)

Generated on Fri Aug 9 10:12:39 2002 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002