59 void InitGeom(
const string&
id,
const string& module_name,
const string& display_name );
60 void SetCurrCustomGeom(
const string&
id ) { m_CurrGeom = id; }
61 string GetCurrCustomGeom() {
return m_CurrGeom; }
63 void ReadCustomScripts( Vehicle* veh );
64 vector< GeomType > GetCustomTypes() {
return m_CustomTypeVec; }
67 string AddParm(
int type,
const string & name,
const string & group );
68 string GetCustomParm(
int index );
71 int AddGui(
int type,
const string & label =
string(),
const string & parm_name =
string(),
const string & group_name =
string(),
double range = 10 );
72 vector< GuiDef > GetGuiDefVec(
const string & geom_id );
75 void AddUpdateGui(
int gui_id,
const string & parm_id );
76 vector< GuiUpdate > GetGuiUpdateVec();
77 bool CheckClearTriggerEvent(
int gui_id );
81 void RemoveXSecSurf(
const string&
id );
82 void ClearXSecSurfs();
83 void SkinXSecSurf(
bool closed_flag );
84 void TransformSurf(
int index,
Matrix4d & mat );
85 void CloneSurf(
int index,
Matrix4d & mat );
88 void SetVspSurfType(
int type,
int surf_id = -1 );
91 void SetVspSurfCfdType (
int type,
int surf_id = -1);
94 void SetupCustomDefaultSource(
int type,
int surf_index,
double l1,
double r1,
double u1,
double w1,
95 double l2 = 0,
double r2 = 0,
double u2 = 0,
double w2 = 0 );
96 void ClearAllCustomDefaultSources();
98 void SetCustomCenter(
double x,
double y,
double z );
101 void SetCustomXSecLoc(
const string & xsec_id,
const vec3d & loc );
102 vec3d GetCustomXSecLoc(
const string & xsec_id );
103 void SetCustomXSecRot(
const string & xsec_id,
const vec3d & rot );
104 vec3d GetCustomXSecRot(
const string & xsec_id );
107 string AppendCustomXSec(
const string & xsec_surf_id,
int type );
108 void CutCustomXSec(
const string & xsec_surf_id,
int index );
109 void CopyCustomXSec(
const string & xsec_surf_id,
int index );
110 void PasteCustomXSec(
const string & xsec_surf_id,
int index );
111 string InsertCustomXSec(
const string & xsec_surf_id,
int type,
int index );
114 vector< string > GetCustomScriptModuleNames();
117 static int SaveScriptContentToFile(
const string & module_name,
const string & file_name );
127 vector< GeomType > m_CustomTypeVec;
128 map< string, string > m_ModuleGeomIDMap;
178 void SetScriptModuleName(
const string& name ) { m_ScriptModuleName = name; }
179 string GetScriptModuleName() {
return m_ScriptModuleName; }
180 void SetDisplayName(
const string& name ) { m_DisplayName = name; }
181 string GetDisplayName() {
return m_DisplayName; }
184 string AddParm(
int type,
const string & name,
const string & group );
185 string FindParmID(
int index );
188 int AddGui(
const GuiDef & gd );
189 vector< GuiDef > GetGuiDefVec() {
return m_GuiDefVec; }
190 void AddGuiTriggerEvent(
int gui_index );
191 bool CheckClearTriggerEvent(
int gui_index );
193 void AddUpdateGui(
const GuiUpdate & gu );
194 vector< GuiUpdate > GetGuiUpdateVec();
197 string AddXSecSurf();
198 void RemoveXSecSurf(
const string&
id );
199 void ClearXSecSurfs();
201 virtual int GetNumXSecSurfs()
const {
return (
int )m_XSecSurfVec.size(); }
202 virtual XSecSurf* GetXSecSurf(
int index );
205 virtual void SkinXSecSurf(
bool closed_flag );
206 virtual void CloneSurf(
int index,
Matrix4d & mat );
207 virtual void TransformSurf(
int index,
Matrix4d & mat );
210 virtual xmlNodePtr EncodeXml( xmlNodePtr & node );
211 virtual xmlNodePtr DecodeXml( xmlNodePtr & node );
214 virtual void SetVspSurfType(
int type,
int surf_id = -1 );
215 virtual void SetVspSurfCfdType(
int type,
int surf_id = -1);
218 virtual void AddDefaultSources(
double base_len = 1.0);
219 virtual void SetUpDefaultSource( SourceData & sd ) { m_DefaultSourceVec.push_back( sd ); }
220 virtual void ClearAllDefaultSources() { m_DefaultSourceVec.clear(); }
222 virtual void ComputeCenter();
223 virtual void Scale();
226 virtual void OffsetXSecs(
double off );
231 string m_ScriptModuleName;
232 string m_DisplayName;
234 vector< Parm* > m_CustomGeomParmVec;
235 vector< GuiDef > m_GuiDefVec;
236 vector< GuiUpdate > m_UpdateGuiVec;
237 vector< XSecSurf* > m_XSecSurfVec;
238 vector< int > m_TriggerVec;
239 vector< SourceData > m_DefaultSourceVec;
242 map< int, int > m_VspSurfTypeMap;
243 int m_VspSurfCfdType;
244 map< int, int > m_VspSurfCfdTypeMap;
247 virtual void UpdateSurf();
250 virtual void UpdateFlags();
252 bool m_ConformalFlag;
253 double m_ConformalOffset;
254 virtual void ApplyConformalOffset(
double off );