OpenVSP API Documentation 3.41.2
 
Loading...
Searching...
No Matches
Group Modification Functions

The functions in this group allow for sets to be scaled, rotated, and translated. Click here to return to the main page. More...

Functions

void vsp::ScaleSet (int set_index, double scale)
 
void vsp::RotateSet (int set_index, double x_rot_deg, double y_rot_deg, double z_rot_deg)
 
void vsp::TranslateSet (int set_index, const vec3d &translation_vec)
 
void vsp::TransformSet (int set_index, const vec3d &translation_vec, double x_rot_deg, double y_rot_deg, double z_rot_deg, double scale, bool scale_translations_flag)
 

Detailed Description

Function Documentation

◆ RotateSet()

void vsp::RotateSet ( int set_index,
double x_rot_deg,
double y_rot_deg,
double z_rot_deg )
extern

Rotate a set about the global X, Y, and Z axes

// Add Fuselage Geom
string fuseid = AddGeom( "FUSELAGE" );
SetSetFlag( fuseid, 3, true );
// Rotate 90 degrees about Y
RotateSet( 3, 0, 90, 0 );
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
void RotateSet(int set_index, double x_rot_deg, double y_rot_deg, double z_rot_deg)
void SetSetFlag(const std::string &geom_id, int set_index, bool flag)
Parameters
[in]set_indexSet index
[in]x_rot_degRotation about the X axis (degrees)
[in]y_rot_degRotation about the Y axis (degrees)
[in]z_rot_degRotation about the Z axis (degrees)

◆ ScaleSet()

void vsp::ScaleSet ( int set_index,
double scale )
extern

Apply a scale factor to a set

// Add Fuselage Geom
string fuseid = AddGeom( "FUSELAGE" );
SetSetFlag( fuseid, 3, true );
// Scale by a factor of 2
ScaleSet( 3, 2.0 );
void ScaleSet(int set_index, double scale)
Parameters
[in]set_indexSet index
[in]scaleScale factor

◆ TransformSet()

void vsp::TransformSet ( int set_index,
const vec3d & translation_vec,
double x_rot_deg,
double y_rot_deg,
double z_rot_deg,
double scale,
bool scale_translations_flag )
extern

Apply translation, rotation, and scale transformations to a set

// Add Fuselage Geom
string fuseid = AddGeom( "FUSELAGE" );
SetSetFlag( fuseid, 3, true );
// Translate 2 units in X and 3 units in Y, rotate 90 degrees about Y, and scale by a factor of 2
TransformSet( 3, vec3d( 2, 3, 0 ), 0, 90, 0, 2.0, true );
Definition Vec3d.h:235
void TransformSet(int set_index, const vec3d &translation_vec, double x_rot_deg, double y_rot_deg, double z_rot_deg, double scale, bool scale_translations_flag)
See also
TranslateSet, RotateSet, ScaleSet
Parameters
[in]set_indexSet index
[in]translation_vecTranslation vector
[in]x_rot_degRotation about the X axis (degrees)
[in]y_rot_degRotation about the Y axis (degrees)
[in]z_rot_degRotation about the Z axis (degrees)
[in]scaleScale factor
[in]scale_translations_flagFlag to apply the scale factor to translations

◆ TranslateSet()

void vsp::TranslateSet ( int set_index,
const vec3d & translation_vec )
extern

Translate a set along a given vector

// Add Fuselage Geom
string fuseid = AddGeom( "FUSELAGE" );
SetSetFlag( fuseid, 3, true );
// Translate 2 units in X and 3 units in Y
TranslateSet( 3, vec3d( 2, 3, 0 ) );
void TranslateSet(int set_index, const vec3d &translation_vec)
Parameters
[in]set_indexSet index
[in]translation_vecTranslation vector