The functions in this group allow for sets to be scaled, rotated, and translated. Click here to return to the main page.
More...
|
| 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) |
◆ 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
string fuseid =
AddGeom(
"FUSELAGE" );
if ( !closeTo( after_max.
z() - after_min.
z(), before_max.
x() - before_min.
x(), 1e-6 ) ||
!closeTo( after_max.
x() - after_min.
x(), before_max.
z() - before_min.
z(), 1e-6 ) )
{
Print( "ERROR: RotateSet did not rotate the geometry" );
__failure++;
}
vec3d GetGeomBBoxMax(const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
vec3d GetGeomBBoxMin(const std::string &geom_id, int main_surf_ind=0, bool ref_frame_is_absolute=true)
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)
void Update(bool update_managers=true)
- Parameters
-
| [in] | set_index | int Set index |
| [in] | x_rot_deg | double Rotation about the X axis (degrees) |
| [in] | y_rot_deg | double Rotation about the Y axis (degrees) |
| [in] | z_rot_deg | double Rotation about the Z axis (degrees) |
◆ ScaleSet()
| void vsp::ScaleSet |
( |
int | set_index, |
|
|
double | scale ) |
|
extern |
Apply a scale factor to a set
string fuseid =
AddGeom(
"FUSELAGE" );
if ( !closeTo( after_max.
x() - after_min.
x(), 2.0 * ( before_max.
x() - before_min.
x() ), 1e-6 ) )
{
Print( "ERROR: ScaleSet did not double the extent" );
__failure++;
}
void ScaleSet(int set_index, double scale)
- Parameters
-
| [in] | set_index | int Set index |
| [in] | scale | double Scale 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
string fuseid =
AddGeom(
"FUSELAGE" );
if ( !closeTo( after_max.
z() - after_min.
z(), 2.0 * ( before_max.
x() - before_min.
x() ), 1e-6 ) ||
!closeTo( after_max.
x() - after_min.
x(), 2.0 * ( before_max.
z() - before_min.
z() ), 1e-6 ) )
{
Print( "ERROR: TransformSet did not rotate and scale the geometry" );
__failure++;
}
if ( !closeTo( after_max.
y() - after_min.
y(), 2.0 * ( before_max.
y() - before_min.
y() ), 1e-6 ) )
{
Print( "ERROR: TransformSet did not scale the geometry in Y" );
__failure++;
}
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_index | int Set index |
| [in] | translation_vec | vec3d Translation vector |
| [in] | x_rot_deg | double Rotation about the X axis (degrees) |
| [in] | y_rot_deg | double Rotation about the Y axis (degrees) |
| [in] | z_rot_deg | double Rotation about the Z axis (degrees) |
| [in] | scale | double Scale factor |
| [in] | scale_translations_flag | bool Flag 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
string fuseid =
AddGeom(
"FUSELAGE" );
if ( !closeTo( after_min.
x() - before_min.
x(), 2.0, 1e-6 ) || !closeTo( after_min.
y() - before_min.
y(), 3.0, 1e-6 ) )
{
Print( "ERROR: TranslateSet did not move the geometry" );
__failure++;
}
void TranslateSet(int set_index, const vec3d &translation_vec)
- Parameters
-
| [in] | set_index | int Set index |
| [in] | translation_vec | vec3d Translation vector |