OpenVSP API Documentation 3.57.0
Loading...
Searching...
No Matches
HumanGeom Functions

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

Functions

void vsp::SetHumanPresetPose (const std::string &geom_id, int preset)

Detailed Description

Function Documentation

◆ SetHumanPresetPose()

void vsp::SetHumanPresetPose ( const std::string & geom_id,
int preset )
extern

Pose a HumanGeom in one of its preset postures, as the Set button of its Pose tab does. The preset sets R/L Sym and every pose angle (the joint angles of the torso, head and both sides); the pose method, its settings and the body's size are kept. Call Update afterward.

Each pose angle is a Parm of the "Pose" group (e.g. "HipFERt"), so a preset can be adjusted afterward, or a posture made from scratch, with SetParmVal.

string human_id = AddGeom( "HUMAN", "" );
if ( GetParmVal( human_id, "HipFERt", "Pose" ) != 80.0 )
{
Print( "ERROR: SetHumanPresetPose did not seat the Human" );
__failure++;
}
void Print(const std::string &data, bool new_line=true)
@ HUMAN_PRESET_SITTING
Definition APIDefines.h:985
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
void SetHumanPresetPose(const std::string &geom_id, int preset)
double GetParmVal(const std::string &parm_id)
void Update(bool update_managers=true)
See also
HUMAN_PRESET_POSE
Parameters
[in]geom_idstring HumanGeom Geom ID
[in]presetint Preset posture enum (i.e. HUMAN_PRESET_STANDING)
Here is the call graph for this function:
Here is the caller graph for this function: