Quellcode durchsuchen

Enable rotation control.

jcsyshc vor 1 Jahr
Ursprung
Commit
4bb7752e10

+ 2 - 2
data/config_dental.yaml

@@ -60,7 +60,7 @@ sophiar:
   augment:
     - name: Bone
       trans_var: femur_in_tracker_denoised
-      model_file: /home/tpx/project/TransparentAR/data/E1_AR/E1_Model.obj
+      model_file: /home/tpx/data/20230303_TransCut/mandible.stl
       registration:
         collect_obj: point_picker_in_femur_ref
         collect_var: picked_point_in_femur_ref
@@ -68,5 +68,5 @@ sophiar:
         probe_var: probe_in_femur
     - name: Plan
       trans_var: femur_in_tracker_denoised
-      model_file: /home/tpx/project/TransparentAR/data/E1_AR/E1_Implant.obj
+      model_file: /home/tpx/data/20230303_TransCut/mandible_path.stl
       background: Bone

+ 7 - 7
data/sophiar_config.json

@@ -16,13 +16,13 @@
       "name": "femur_in_femur_ref",
       "type": "transform_obj",
       "value": [
-        34.34018126820815,
-        -44.83303063330605,
-        24.112401735811442,
-        0.7008713002927913,
-        -0.15030845884955477,
-        0.6856915303702952,
-        0.12654608963776195
+        50.961547063534596,
+        -273.54475069308717,
+        3.5040515569900395,
+        -0.2428981381618023,
+        0.6433270930524138,
+        -0.28797747851629213,
+        0.6664830963270257
       ]
     },
     {

+ 1 - 0
src/main_impl/impl_types.h

@@ -51,6 +51,7 @@ struct augment_store_type {
     bool enable = true;
 
     Eigen::Vector3f extra_offset = {};
+    Eigen::Vector3f extra_rotation = {};
 };
 
 #endif //REMOTEAR3_MAIN_IMPL_TYPES_H

+ 3 - 1
src/main_impl/render_related.cpp

@@ -213,7 +213,7 @@ void prepare_augment_info() {
             augment_render->set_actor_visibility(item.actor, false);
         } else {
             augment_render->set_actor_visibility(item.actor, item.enable);
-            auto extra_transform = transform_combine_eigen_xyz_deg(item.extra_offset, Eigen::Vector3f::Zero());
+            auto extra_transform = transform_combine_eigen_xyz_deg(item.extra_offset, item.extra_rotation);
             augment_render->set_actor_transform(item.actor, trans.value().cast<float>() * extra_transform);
             augment_render->set_actor_color(item.actor, item.color, item.ambient_factor);
             augment_render->set_actor_alpha_factor(item.actor, item.alpha_factor);
@@ -239,6 +239,8 @@ void show_augment_ui() {
                 }
                 ImGui::DragFloat3("Offset (mm)", item.extra_offset.data(),
                                   0.05f, 0.0f, 0.0f, "%.02f");
+                ImGui::DragFloat3("Offset (deg)", item.extra_rotation.data(),
+                                  0.1f, -180.0f, 180.0f, "%.01f");
                 ImGui::TreePop();
             }
         }