This functions grouped here are used to create and manipulate Custom Components. Custom components are defined in *.vspscript files included in the /"Custom Scripts/" directory. Examples of Custom Components are available in the directory for reference.
Click here to return to the main page.
More...
Functions | |
string | AddParm (int type, const string &in name, const string &in group) |
string | GetCurrCustomGeom () |
string | GetCustomParm (int index) |
int | AddGui (int type, const string &in label=string(), const string &in parm_name=string(), const string &in group_name=string(), double range=10.0) |
void | UpdateGui (int gui_id, const string &in parm_id) |
string | AddXSecSurf () |
void | RemoveXSecSurf (const string &in xsec_id) |
void | ClearXSecSurfs () |
void | SkinXSecSurf (bool closed_flag=false) |
void | CloneSurf (int index, Matrix4d &in mat) |
void | TransformSurf (int index, Matrix4d &in mat) |
void | SetVspSurfType (int type, int surf_index=- 1) |
void | SetVspSurfCfdType (int type, int surf_index=- 1) |
void | SetCustomXSecLoc (const string &in xsec_id, const vec3d &in loc) |
vec3d | GetCustomXSecLoc (const string &in xsec_id) |
void | SetCustomXSecRot (const string &in xsec_id, const vec3d &in rot) |
vec3d | GetCustomXSecRot (const string &in xsec_id) |
bool | CheckClearTriggerEvent (int gui_id) |
void | SetupCustomDefaultSource (int type, int surf_index, double l1, double r1, double u1, double w1, double l2=0, double r2=0, double u2=0, double w2=0) |
void | ClearAllCustomDefaultSources () |
void | SetCustomCenter (double x, double y, double z) |
string | AppendXSec (const string &in xsec_surf_id, int type) |
string | AppendCustomXSec (const string &in xsec_surf_id, int type) |
void | CutCustomXSec (const string &in xsec_surf_id, int index) |
void | CopyCustomXSec (const string &in xsec_surf_id, int index) |
void | PasteCustomXSec (const string &in xsec_surf_id, int index) |
string | InsertCustomXSec (const string &in xsec_surf_id, int type, int index) |
int AddGui | ( | int | type, |
const string &in | label = string() , |
||
const string &in | parm_name = string() , |
||
const string &in | group_name = string() , |
||
double | range = 10.0 |
||
) |
Add a GUI element for the current custom Geom. Some inputs may not be used depending on the input type. The Parm name and group name are used to identify the Parm ID associated with the GUI element.
[in] | type | GUI element type enum (i.e. GDEV_SLIDER_ADJ_RANGE) |
[in] | label | Optional GUI device label |
[in] | parm_name | Optional Parm name |
[in] | group_name | Optional Parm group name |
[in] | range | Optional GUI element range |
Function to add a new Parm of input type, name, and group for a custom Geom component
[in] | type | Parm type enum (i.e. PARM_DOUBLE_TYPE) |
[in] | name | Parm name |
[in] | group | Parm group |
string AddXSecSurf | ( | ) |
Add an XSecSurf to the current custom Geom /code{.cpp}
==== Add Cross Sections =====// string seat_surf = AddXSecSurf();
AppendCustomXSec( seat_surf, XS_POINT);
AppendCustomXSec( seat_surf, XS_ROUNDED_RECTANGLE);
AppendCustomXSec( seat_surf, XS_ROUNDED_RECTANGLE);
AppendCustomXSec( seat_surf, XS_POINT); /endcode
Append an XSec to the current custom Geom. This function is identical to AppendXSec.
[in] | xsec_surf_id | XSecSurf ID |
[in] | type | XSec type enum (i.e. XSEC_WEDGE) |
Append an XSec to the current custom Geom. This function is identical to AppendCustomXSec.
[in] | xsec_surf_id | XSecSurf ID |
[in] | type | XSec type enum (i.e. XSEC_WEDGE) |
bool CheckClearTriggerEvent | ( | int | gui_id | ) |
Check and clear a trigger event for a custom Geom GUI element
[in] | gui_id | GUI element index |
void ClearAllCustomDefaultSources | ( | ) |
Clear all default sources for the current custom Geom
void ClearXSecSurfs | ( | ) |
Clear all XSecSurf from the current custom Geom /code{.cpp}
==== Add Cross Sections =====// string surf1 = AddXSecSurf();
string surf2 = AddXSecSurf();
ClearXSecSurfs(); /endcode
void CloneSurf | ( | int | index, |
Matrix4d &in | mat | ||
) |
Make a copy of the current custom Geom's main surface at given index and apply a transformation
[in] | index | Main surface index |
[in] | mat | Transformation matrix |
void CopyCustomXSec | ( | const string &in | xsec_surf_id, |
int | index | ||
) |
Copy an XSec from the current custom Geom and keep it in memory
[in] | xsec_surf_id | XSecSurf ID |
[in] | index | XSec index |
void CutCustomXSec | ( | const string &in | xsec_surf_id, |
int | index | ||
) |
Remove an XSec from the current custom Geom and keep it in memory
[in] | xsec_surf_id | XSecSurf ID |
[in] | index | XSec index |
string GetCurrCustomGeom | ( | ) |
Get the Geom ID of the current custom Geom
string GetCustomParm | ( | int | index | ) |
Get the Parm ID for the input Parm index of the current custom Geom
[in] | index | Parm index |
Get the location of an XSec for the current custom Geom
[in] | xsec_id | XSec ID |
Get the rotation of an XSec for the current custom Geom
[in] | xsec_id | XSec ID |
Insert a new XSec at the given index for the currently selected custom Geom
[in] | xsec_surf_id | XSecSurf ID |
[in] | type | XSec type enum (i.e. XSEC_WEDGE) |
[in] | index | XSec index |
void PasteCustomXSec | ( | const string &in | xsec_surf_id, |
int | index | ||
) |
Paste the XSec currently held in memory for the current custom Geom at given index
[in] | xsec_surf_id | XSecSurf ID |
[in] | index | XSec index |
void RemoveXSecSurf | ( | const string &in | xsec_id | ) |
Remove an XSecSurf from the current custom Geom
[in] | xsec_id | XSecSurf ID |
void SetCustomCenter | ( | double | x, |
double | y, | ||
double | z | ||
) |
Set the center point of the current custom Geom
[in] | x | X coordinate |
[in] | y | Y coordinate |
[in] | z | Z coordinate |
Set the location of an XSec for the current custom Geom
[in] | xsec_id | XSec ID |
[in] | loc | 3D location |
Set the rotation of an XSec for the current custom Geom
[in] | xsec_id | XSec ID |
[in] | rot | Angle of rotation about the X, Y and Z axes (degrees) |
void SetupCustomDefaultSource | ( | int | type, |
int | surf_index, | ||
double | l1, | ||
double | r1, | ||
double | u1, | ||
double | w1, | ||
double | l2 = 0 , |
||
double | r2 = 0 , |
||
double | u2 = 0 , |
||
double | w2 = 0 |
||
) |
Add a CFD Mesh default source for the current custom Geom. Note, certain input params may not be used depending on the source type.
[in] | type | CFD Mesh source type enum (i.e. BOX_SOURCE) |
[in] | surf_index | Main surface index |
[in] | l1 | Source first edge length |
[in] | r1 | Source first radius |
[in] | u1 | Source first U location |
[in] | w1 | Source first W location |
[in] | l2 | Source second edge length |
[in] | r2 | Source second radius |
[in] | u2 | Source second U location |
[in] | w2 | Source second W location |
void SetVspSurfCfdType | ( | int | type, |
int | surf_index = - 1 |
||
) |
Set the surface CFD type for the current custom Geom at given surface index
[in] | type | CFD surface type enum (i.e. CFD_TRANSPARENT) |
[in] | surf_index | Main surface index. The default value of -1 is used to indicate all main surfaces are the same type. |
void SetVspSurfType | ( | int | type, |
int | surf_index = - 1 |
||
) |
Set the surface type for the current custom Geom at given surface index
[in] | type | Surface type enum (i.e DISK_SURF) |
[in] | surf_index | Main surface index. The default value of -1 is used to indicate all main surfaces are the same type. |
void SkinXSecSurf | ( | bool | closed_flag = false | ) |
Perform a skinning update for the current custom Geom. This is typically the last call in the UpdateSurf function that gets called every time the Geom is updated.
[in] | closed_flag | Flag to set the last XSec equal to the first |
void TransformSurf | ( | int | index, |
Matrix4d &in | mat | ||
) |
Perform a transformation for the main surface at input index for the current custom Geom
[in] | index | Main surface index |
[in] | mat | Transformation matrix |
void UpdateGui | ( | int | gui_id, |
const string &in | parm_id | ||
) |
Update the GUI element with an associated Parm /code{.cpp}
==== UpdateGui Is Called Every Time The Gui is Updated ====// void UpdateGui() { string geom_id = GetCurrCustomGeom();
UpdateGui( WidthSlider, GetParm( geom_id, "Width", "Design" ) );
UpdateGui( SeatHeightSlider, GetParm( geom_id, "SeatHeight", "Design" ) );
UpdateGui( SeatLengthSlider, GetParm( geom_id, "SeatLength", "Design" ) );
UpdateGui( BackHeightSlider, GetParm( geom_id, "BackHeight", "Design" ) );
} /endcode
[in] | gui_id | Index of the GUI element |
[in] | parm_id | Parm ID |