This group of functions is available for interacting with a HumanGeom through the API. Click here to return to the main page.
More...
◆ 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)
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_id | string HumanGeom Geom ID |
| [in] | preset | int Preset posture enum (i.e. HUMAN_PRESET_STANDING) |