File tree 1 file changed +23
-0
lines changed
MAVGCL/src/com/comino/flight/ui/widgets/view3D/objects
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,29 @@ private void registerHandlers(final Node node) {
174
174
}
175
175
}
176
176
});
177
+
178
+ node .setOnMouseClicked ((me ) -> {
179
+ if (me .getClickCount ()==2 ) {
180
+ vv_angle = 0 ;
181
+ switch (perspective ) {
182
+ case OBSERVER_PERSPECTIVE :
183
+ camera .setTranslateX (0 ); camera .setTranslateY (0 );
184
+ camera .setTranslateZ (CAMERA_INITIAL_DISTANCE );
185
+ this .ry .setAngle (CAMERA_INITIAL_Y_ANGLE );
186
+ this .rx .setAngle (CAMERA_INITIAL_X_ANGLE );
187
+ this .setRotateZ (180.0 );
188
+ camera .setFieldOfView (CAMERA_INITIAL_FOV_OBS );
189
+ break ;
190
+ case VEHICLE_PERSPECTIVE :
191
+ camera .setTranslateX (0 ); camera .setTranslateY (0 );
192
+ camera .setTranslateZ (0 );
193
+ this .rx .setAngle (CAMERA_INITIAL_X_ANGLE );
194
+ camera .setFieldOfView (CAMERA_INITIAL_FOV_VCL );
195
+ break ;
196
+ }
197
+
198
+ }
199
+ });
177
200
}
178
201
179
202
}
You can’t perform that action at this time.
0 commit comments