OpenVSPAPI  3.20.0
Functions
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 ScaleSet (int set_index, double scale)
 
void RotateSet (int set_index, double x_rot_deg, double y_rot_deg, double z_rot_deg)
 
void TranslateSet (int set_index, const vec3d &in translation_vec)
 
void TransformSet (int set_index, const vec3d &in 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 RotateSet ( int  set_index,
double  x_rot_deg,
double  y_rot_deg,
double  z_rot_deg 
)

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
ScaleSet( 3, 0, 90, 0 );
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 ScaleSet ( int  set_index,
double  scale 
)

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 );
Parameters
[in]set_indexSet index
[in]scaleScale factor

◆ TransformSet()

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

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 );
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 TranslateSet ( int  set_index,
const vec3d &in  translation_vec 
)

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
ScaleSet( 3, vec3d( 2, 3, 0 ) );
Parameters
[in]set_indexSet index
[in]translation_vecTranslation vector
ScaleSet
void ScaleSet(int set_index, double scale)
vec3d
A class for representing 3D vectors.
Definition: openvsp_as.h:341
SetSetFlag
void SetSetFlag(const string &in geom_id, int set_index, bool flag)
AddGeom
string AddGeom(const string &in type, const string &in parent=string())
TransformSet
void TransformSet(int set_index, const vec3d &in translation_vec, double x_rot_deg, double y_rot_deg, double z_rot_deg, double scale, bool scale_translations_flag)