| 604 | /////////////////////////////////////////// |
| 605 | |
| 606 | void ui_push_surface(pose_t surface_pose, vec3 layout_start, vec2 layout_dimensions) { |
| 607 | vec3 right = surface_pose.orientation * vec3_right; |
| 608 | matrix trs = matrix_trs(surface_pose.position + right*layout_start, surface_pose.orientation); |
| 609 | hierarchy_push(trs); |
| 610 | |
| 611 | skui_layers.add(layer_t{}); |
| 612 | ui_layout_push(layout_start, layout_dimensions, true); |
| 613 | |
| 614 | layer_t* layer = &skui_layers.last(); |
| 615 | const matrix *to_local = hierarchy_to_local(); |
| 616 | for (int32_t i = 0; i < handed_max; i++) { |
| 617 | layer->finger_pos [i] = skui_hand[i].finger = matrix_transform_pt(*to_local, skui_hand[i].finger_world); |
| 618 | layer->finger_prev [i] = skui_hand[i].finger_prev = matrix_transform_pt(*to_local, skui_hand[i].finger_world_prev); |
| 619 | layer->thumb_pos [i] = skui_hand[i].thumb = matrix_transform_pt(*to_local, skui_hand[i].thumb_world); |
| 620 | layer->pinch_pt_pos [i] = skui_hand[i].pinch_pt = matrix_transform_pt(*to_local, skui_hand[i].pinch_pt_world); |
| 621 | layer->pinch_pt_prev[i] = skui_hand[i].pinch_pt_prev = matrix_transform_pt(*to_local, skui_hand[i].pinch_pt_world_prev); |
| 622 | } |
| 623 | } |
| 624 | |
| 625 | /////////////////////////////////////////// |
| 626 |
no test coverage detected