## 2 Materials and Methods
### Interaction Approach  
In the maxillofacial reconstruction surgery VR simulator, interaction is carried out through controllers. The controllers are divided into left and right controllers, each consisting of a thumbstick, one menu button, two buttons (right: A/B; left: X/Y), and two trigger buttons (index trigger and grip trigger). Controller-based interaction is achieved using the raycasting technique. A ray is emitted from the model in the forward direction, synchronized with the movement of the controller. If the ray makes contact with the model within a specific time frame, the object is considered selected. Then, the thumbstick and controller buttons are used to perform tasks such as visualization, manipulation, and resection of the model. Figure 5 shows the interaction method using the HMD controller. Figure 6 shows the functions assigned to the left and right controller buttons.  
Specifically, the left-hand controller is used to manipulate the facial and iliac bone 3D models, the resection plane, and the resected models. When the index trigger is held down, a ray is emitted from the model associated with the left-hand controller. If the ray collides with a model for a certain period, the model is selected, and its information, along with the current manipulation state, is displayed on the UI. The manipulation state of the selected model can be changed using the X/Y buttons and the grip trigger, and the model can be manipulated by moving the thumbstick according to the manipulation state. Pressing the X button allows movement along the \(x\)-axis (left/right) and \(z\)-axis (forward/backward), and pressing the X button again allows movement along the \(y\)-axis (up/down). Pressing the Y button enables rotation along the yz-plane based on the \(x\)-axis, rotation along the \(xz\)-plane based on the \(y\)-axis, and pressing the Y button again allows rotation along the xy-plane  
Figure 5: Interaction method for maxillofacial reconstruction simulator.  
Figure 6: Functions assigned to the controller buttons: (**a**) left controller and (**b**) right controller.  
based on the \(z\)-axis. Moving the thumbstick in each state will move or rotate the selected model. The reason for performing _xyz_ axis translation and rotation with two button presses is that the thumbstick movement is limited to two dimensions. Finally, the grip trigger changes the state of the manipulated model to idle, preventing it from being affected by the thumbstick movement.  
The right-hand controller is used for visualizing the facial and iliac bone models, creating and removing resection planes, resecting and deleting 3D models, and saving the maxillofacial reconstruction model. Pressing the hand trigger launches the file browser, allowing the user to move the thumbstick to select the desired model. Pressing the A button then visualizes the model in the virtual space. When the index trigger is pressed, a ray is cast from the model associated with the right-hand controller. If the ray collides with the facial and iliac bone models, pressing the hand trigger creates a resection plane at the collision point. Additionally, if the ray collides with a model and the B button is pressed, that model is deleted. If the ray collides with an existing resection plane, pressing the hand trigger removes that resection plane. The created resection plane can be adjusted to the appropriate position using the left-hand controller, and pressing the B button while holding down the hand trigger resects the facial and iliac bone models according to the resection plane. Finally, after selecting a model with the ray, pressing the A and B buttons simultaneously exports the completed maxillofacial reconstruction model to a specific local folder in FBX and STL formats.