Sets value of position variables of a specific element as per the source transform.
Syntax |
void set_position(const string &in name, const robotic::pose_transform @origin) |
---|---|
name |
Name of the basic element |
origin |
Transform of origin |
Result |
(none) |
Notes |
See the default variables section for more information about the variable. This method will automatically set the following variables: <name>.posX, <name>.posY, <name>.posZ, <name>.posA, <name>.posB, and <name>.posC with the corresponding qc() values: see equivalent example. |
Example of use:
bool execute(pan3d::object @panel) { robotic::pose_transform origin; ... panel.set_position("item1", origin); ... } |
Equivalent example:
bool execute(pan3d::object @panel) { robotic::pose_transform origin; ... panel.set_double("item1.posX", origin.get_qc(0)); panel.set_double("item1.posY", origin.get_qc(1)); panel.set_double("item1.posZ", origin.get_qc(2)); panel.set_double("item1.posA", origin.get_qc(3)); panel.set_double("item1.posB", origin.get_qc(4)); panel.set_double("item1.posC", origin.get_qc(5)); ... } |