OpenVSP API Documentation 3.51.2
Loading...
Searching...
No Matches
GearGeom Functions

This group of functions is available for interacting with the Bogie list of a GearGeom through the API. Click here to return to the main page. More...

Functions

string vsp::CreateAndAddBogie (const string &gear_id)
int vsp::GetNumBogies (const string &gear_id)
vector< string > vsp::GetAllBogies (const string &gear_id)
void vsp::DelBogie (const string &gear_id, const string &bogie_id)
void vsp::DelAllBogies (const string &gear_id)

Detailed Description

Function Documentation

◆ CreateAndAddBogie()

string vsp::CreateAndAddBogie ( const string & gear_id)
extern

Create a new Bogie and add it to the end of the Bogie list of the specified GearGeom. A GearGeom's landing gear is described by its list of Bogies. Each Bogie is a ParmContainer, so once you have the returned Bogie ID you can query and set its Parms with the normal Parm API functions.

string gear_id = AddGeom( "GEAR", "" ); // Add a landing gear Geom
string bogie_id = CreateAndAddBogie( gear_id ); // Create and add a Bogie
// Bogies are ParmContainers -- work with their Parms once you have the ID.
SetParmVal( bogie_id, "NumAcross", "Bogie", 2 ); // Two wheels across
SetParmVal( bogie_id, "NumTandem", "Bogie", 2 ); // Two wheels in tandem
string CreateAndAddBogie(const string &gear_id)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
double SetParmVal(const std::string &parm_id, double val)
See also
GetAllBogies, GetNumBogies, DelBogie, DelAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
string ParmContainer ID for the newly added Bogie

◆ DelAllBogies()

void vsp::DelAllBogies ( const string & gear_id)
extern

Delete all Bogies from the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
DelAllBogies( gear_id ); // GetNumBogies( gear_id ) == 0
void DelAllBogies(const string &gear_id)
See also
CreateAndAddBogie, DelBogie
Parameters
[in]gear_idstring GearGeom Geom ID

◆ DelBogie()

void vsp::DelBogie ( const string & gear_id,
const string & bogie_id )
extern

Delete the specified Bogie from the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
string bogie_id = CreateAndAddBogie( gear_id );
DelBogie( gear_id, bogie_id );
void DelBogie(const string &gear_id, const string &bogie_id)
See also
CreateAndAddBogie, DelAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
[in]bogie_idstring Bogie ParmContainer ID

◆ GetAllBogies()

vector< string > vsp::GetAllBogies ( const string & gear_id)
extern

Get the ParmContainer IDs of all the Bogies in the specified GearGeom, in list order.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
array<string> @bogie_ids = GetAllBogies( gear_id );
vector< string > GetAllBogies(const string &gear_id)
See also
CreateAndAddBogie, GetNumBogies, DelBogie
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
vector<string> Vector of Bogie ParmContainer IDs

◆ GetNumBogies()

int vsp::GetNumBogies ( const string & gear_id)
extern

Get the number of Bogies in the specified GearGeom.

string gear_id = AddGeom( "GEAR", "" );
CreateAndAddBogie( gear_id );
CreateAndAddBogie( gear_id );
int num_bogie = GetNumBogies( gear_id ); // num_bogie == 2
int GetNumBogies(const string &gear_id)
See also
CreateAndAddBogie, GetAllBogies
Parameters
[in]gear_idstring GearGeom Geom ID
Returns
int Number of Bogies in the specified GearGeom