AnimatLab  2
Test
ISimulatorInterface.cs
1 // VBConversions Note: VB project level imports
2 using System.Collections.Generic;
3 using System;
4 using System.Diagnostics;
5 using System.Data;
6 using System.Xml.Linq;
7 using Microsoft.VisualBasic;
8 using System.Collections;
9 using System.Linq;
10 // End of VB project level imports
11 
12 
13 
14 
16 {
17  delegate void VoidHandler();
18  delegate void ErrorHandler(string strError);
19  delegate void CreateSimHandler(ref string strXml);
20  public interface ISimulatorInterface
21  {
22 
23 
24 #region EventSystems
25 
26  // Event OnSimulationCreate As CreateSimHandler VBConversions Warning: events in interfaces not supported in C#.
27  // Event SimulationRunning As VoidHandler VBConversions Warning: events in interfaces not supported in C#.
28  // Event NeedToStopSimulation As VoidHandler VBConversions Warning: events in interfaces not supported in C#.
29  // Event HandleNonCriticalError As ErrorHandler VBConversions Warning: events in interfaces not supported in C#.
30  // Event HandleCriticalError As ErrorHandler VBConversions Warning: events in interfaces not supported in C#.
31 
32  void FireNeedToStopSimulationEvent();
33  void FireHandleNonCriticalErrorEvent(string strError);
34  void FireHandleCriticalErrorEvent(string strError);
35 
36 #endregion
37 
38 #region Properties
39 
40  long CurrentMillisecond();
41  bool Paused();
42  bool SimRunning();
43  bool Loaded();
44  bool SimOpen();
45  void SetProjectPath(string strPath);
46  void SetLogger(ILogger lpLog);
47 
48 #endregion
49 
50 #region SimulationControl
51 
52  bool AddWindow(IntPtr hParentWnd, string sWindowType, string sWindowXml);
53  void RemoveWindow(IntPtr hParentWnd);
54  void OnWindowGetFocus(string sID);
55  void OnWindowLoseFocus(string sID);
56 
57  void CreateAndRunSimulation(bool bPaused);
58  void CreateSimulation();
59  void CreateSimulation(string sXml);
60  void Simulate(bool bPaused);
61  void ShutdownSimulation();
62  bool StartSimulation();
63  bool PauseSimulation();
64  void StopSimulation();
65 
66  void CreateStandAloneSim(string sModuleName, string sExePath);
67 
68  string ErrorMessage();
69 
70  void SaveSimulationFile(string sFile);
71  void TrackCamera(bool bTrackCamera, string sLookAtStructureID, string sLookAtBodyID);
72 
73 #endregion
74 
75 #region VideoPlayback
76 
77  string AddKeyFrame(string strType, long lStartMillisecond, long lEndMillisecond);
78  void RemoveKeyFrame(string strID);
79  string MoveKeyFrame(string strID, long lStartMillisecond, long lEndMillisecond);
80  void EnableVideoPlayback(string strID);
81  void DisableVideoPlayback();
82  void StartVideoPlayback();
83  void StopVideoPlayback();
84  void StepVideoPlayback(int iFrameCount);
85  void MoveSimulationToKeyFrame(string strID);
86  void SaveVideo(string strPath);
87 
88 #endregion
89 
90 #region HelperMethods
91 
92  void ReInitializeSimulation();
93  int RetrieveChartData(string sChartKey, ref float[,] aryTimeData, ref float[,] aryData);
94  void GenerateCollisionMeshFile(string sOriginalMeshFile, string sCollisionMeshFile, float fltScaleX, float fltScaleY, float fltScaleZ);
95  void ConvertV1MeshFile(string sOriginalMeshFile, string NewMeshFile, string strTexture);
96  PositionRotationInfo GetPositionAndRotationFromD3DMatrix(double[,] aryTransform);
97 
98 #endregion
99 
100 #region DataAccess
101 
102  bool AddItem(string sParentID, string sItemType, string sID, string sXml, bool bThrowError, bool bDoNotInit);
103  bool RemoveItem(string sParentID, string sItemType, string sID, bool bThrowError);
104  bool SetData(string sID, string sDataType, string sValue, bool bThrowError);
105  bool FindItem(string sID, bool bThrowError);
106 
107 #endregion
108 
109  }
110 
111 }