![]() |
NDEVR
API Documentation
|
Takes user input in order to modify a model in real-time. More...
Public Types | |
| enum | ModelEditMode : uint04 { e_no_edit , e_center_locked_scale , e_center_scale , e_two_point_locked_scale , e_two_point_scale , e_two_length_scale , e_offset , e_vertex_offset , e_rotate , e_place_and_rotate , e_place_no_rotate , e_flip_left , e_flip_front , e_flip_vertical , e_set_real_thickness , e_rubber_stamp , e_erase , e_add_selection_mask , e_edit_mode_size , e_model_function } |
| Enumerates the available model editing modes. More... | |
| Public Types inherited from SnapController | |
| enum | LockMode { e_lock_ignore_snap , e_lock_to_nearest_snap , e_lock_if_no_snap , e_only_allow_snap , e_ignore } |
| Controls how axis/plane locking interacts with snapping behavior. More... | |
| enum | PointsDrawMode { e_points , e_triangle , e_lines , e_line_fan , e_polyline } |
| Determines how snapped points are drawn or connected visually in the viewport. More... | |
Public Member Functions | |
| ModelEditController (DesignObjectLookup *manager) | |
| Constructs a ModelEditController. | |
| Model | activeModel () const |
| Returns the currently active model being edited. | |
| UUID | activeModelFunction () const |
| Returns the UUID of the currently active model function, if any. | |
| void | addEditFunction (const DynamicPointer< ModelFunction > &function) |
| Adds a custom model function to the controller. | |
| virtual void | addNextFinishedCallback (std::function< void(bool canceled, UUID id)> callback) |
| Registers a callback to be invoked when the next edit operation finishes. | |
| virtual void | addPoint (const SnapPoint &point) override |
| Adds a snap point as input to the current editing operation. | |
| void | addPoint (const Vertex< 3, fltp08 > &point) override |
| Adds a 3D point as input to the current editing operation. | |
| virtual void | begin () override |
| Begins the current editing operation, setting up required state. | |
| virtual void | cancel () override |
| Cancels the current editing operation, reverting changes. | |
| SubSelectionMode | defaultSelectionMode () const |
| Returns the default sub-selection mode for the current edit mode. | |
| Buffer< UUID > | editedModels () |
| Returns the list of model UUIDs that have been edited during this operation. | |
| const Dictionary< UUID, DynamicPointer< ModelFunction > > & | editFunctions () const |
| Returns the dictionary of all registered model edit functions. | |
| TranslatedString | expandedHint () const |
| Returns an expanded hint with detailed description of the current editing operation. | |
| virtual void | finish () override |
| Finishes the current editing operation, applying changes. | |
| void | finishSelection () |
| Completes the selection phase of the current editing operation. | |
| Matrix< fltp08 > | gravityAdjust (const Matrix< fltp08 > &mat) const |
| Applies gravity adjustment to a transformation matrix. | |
| bool | hasCommandLock () const |
| Checks whether the controller currently holds a command lock. | |
| bool | hasFinishedMouseActions () const |
| Checks whether all required mouse actions for the current edit have been completed. | |
| TranslatedString | hint () const |
| Returns a short hint describing the current editing operation. | |
| bool | isSelecting () const |
| Checks whether the controller is currently in a selection state. | |
| const UUID & | material () const |
| Returns the UUID of the current paint material. | |
| Matrix< fltp08 > | originalTransform () const |
| Returns the original transform matrix of the model before editing began. | |
| const UUID & | pasteModel () const |
| Returns the UUID of the model being pasted (for rubber stamp / paste operations). | |
| void | refreshState () |
| Refreshes the internal state of the controller based on the current edit mode. | |
| bool | selectionModeAllowed (const SubSelectionMode &mode) const |
| Checks whether a given sub-selection mode is allowed in the current edit state. | |
| void | setActiveEditFunction (const UUID &function) |
| Sets the currently active custom model function by UUID. | |
| void | setActiveModel (UUID model) |
| Sets the model that is currently being edited. | |
| void | setActiveVertex (const Matrix< fltp08 > &complete_transform, UUID geometry, uint04 vertex_id) |
| Sets the active vertex for vertex-level editing operations. | |
| void | setAutoFinish (bool auto_finish) |
| Enables or disables automatic finishing of the edit when conditions are met. | |
| void | setOriginalTransform (const Matrix< fltp08 > &transform) |
| Sets the original transform matrix for undo/reference purposes. | |
| void | setPasteModel (UUID model) |
| Sets the model to be used for paste/rubber stamp operations. | |
| void | setupSelectionInfo (const MouseEvent &event, Camera *camera, SelectionInfo &info) override |
| Sets up selection info from a mouse event and camera for the editing operation. | |
| void | setUseGravity (bool use_gravity) |
| Enables or disables gravity-based placement adjustment. | |
| bool | shouldShowInterface () const |
| Checks whether the active function or edit mode has a UI interface to display. | |
| TranslatedString | title () const |
| Returns the display title for the current editing operation. | |
| bool | tryCommandLock () |
| Attempts to acquire a command lock for the current editing operation. | |
| virtual void | updateLocation (const Vertex< 3, fltp08 > &location, bool is_select=false, Camera *camera=nullptr) override |
| Updates the current location during an editing operation. | |
| bool | usingGravity () const |
| Checks whether gravity-based placement is currently enabled. | |
| Public Member Functions inherited from SnapController | |
| SnapController (DesignObjectLookup *manager) | |
| Constructs a SnapController associated with the given DesignObjectLookup. | |
| void | clearSnapSelection () |
| Clears all currently accumulated snap selection points and resets the visual state. | |
| Vertex< 3, fltp08 > | currentLocation () const |
| Returns the current snap location in 3D space. | |
| Vertex< 3, fltp08 > | lastPoint () const |
| Returns the most recent snap location. | |
| const Buffer< SnapPoint > & | lastSnapPoints () const |
| Returns the buffer of snap points from the most recent snap calculation. | |
| void | lockAxis (uint01 axis, fltp08 lock) |
| Locks a specific axis to a fixed coordinate value. | |
| uint04 | pointCount () const |
| Returns the number of points currently recorded by the snap controller. | |
| const Buffer< Vertex< 3, fltp08 > > & | points () const |
| Returns the buffer of all accumulated snap points. | |
| SelectionMode | selectionMode () const |
| Returns the current selection mode. | |
| void | setCustomSnapManager (const ConstPointer< SnapsManager > &snap_manager) |
| Sets a custom snap manager to override the default snapping behavior. | |
| virtual void | setFinishedCallback (const std::function< void(bool is_accepted)> &callback) |
| Sets a callback invoked when the snap operation finishes. | |
| void | setLocation (const Vertex< 3, fltp08 > &location, bool is_click=false, Camera *camera=nullptr) |
| Sets the current snap location, optionally registering it as a click. | |
| void | setLockLine (const LineSegment< 3, fltp08 > &line) |
| Sets a line segment to constrain snap positions along. | |
| void | setLockMode (LockMode mode) |
| Sets the lock mode that controls how axis/plane locking interacts with snapping. | |
| void | setLockPlane (const Plane< 3, fltp08 > &plane) |
| Sets a plane to constrain snap positions onto. | |
| void | setPointsDrawMode (PointsDrawMode mode) |
| Sets the visual draw mode for how accumulated points are rendered. | |
| void | setSelectionMode (SelectionMode mode) |
| Sets the selection mode used during snap interaction. | |
| void | setShowLengthLabels (bool show) |
| Sets whether length labels are displayed along guide lines. | |
| void | setShowPointLabels (bool show) |
| Sets whether coordinate labels are displayed at snap points. | |
| virtual void | setUpdateCallback (const std::function< void()> &callback) |
| Sets a callback invoked whenever the snap location or state is updated. | |
Public Attributes | |
| Resource< ModelEditMode > | edit_mode |
| The resource tracking the current edit mode. | |
| Public Attributes inherited from SnapController | |
| Resource< SnapPoint > | current_snap_point |
| The currently active snap point resource, updated as the mouse moves. | |
Protected Member Functions | |
| void | onMouseSelect () |
| Called when a mouse-based selection occurs. | |
| void | onSelect (UUID object) |
| Called when an object is selected during an editing operation. | |
| virtual bool | processKeyEvent (const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override |
| Processes a keyboard event during the editing operation. | |
| virtual bool | processMouseEvent (MouseControllerEvent &event, SelectionInfo &info) override |
| Processes a mouse event during the editing operation. | |
| void | refreshOffsetState () |
| Refreshes the state for offset (translation) editing mode. | |
| void | refreshPlaceState () |
| Refreshes the state for place editing mode. | |
| void | refreshRealThicknessState () |
| Refreshes the state for real thickness editing mode. | |
| void | refreshRotateState () |
| Refreshes the state for rotate editing mode. | |
| void | refreshScaleState () |
| Refreshes the state for scale editing mode. | |
| void | refreshTwoPointSelectState () |
| Refreshes the state for two-point selection editing mode. | |
| void | refreshVertexOffsetState () |
| Refreshes the state for vertex offset editing mode. | |
| void | setSelectionFilters () |
| Configures the selection filters based on the current edit mode. | |
| void | updateGravityPoints () |
| Updates the cached gravity points used for gravity-based placement. | |
| Protected Member Functions inherited from SnapController | |
| void | addGuideLineModel () |
| Adds a guide line model to the scene for visual feedback. | |
| void | addGuidePlaneModel () |
| Adds a guide plane model to the scene for visual feedback. | |
| void | addGuidePointModel () |
| Adds a guide point model to the scene for visual feedback. | |
| void | calcLockLineLocation (SnapPoint &point, const SelectionInfo &info) |
| Calculates the constrained snap point position along a lock line. | |
| void | calcLockPlaneLocation (SnapPoint &point, const SelectionInfo &info) |
| Calculates the constrained snap point position on a lock plane. | |
| SnapPoint | calcSnapPoint (const SelectionInfo &info, DesignObjectLookup *lookup) |
| Calculates the best snap point for the current selection context. | |
| void | drawDefaultGuideLines (const SnapPoint &point) |
| Draws the default set of guide lines based on the current snap point context. | |
| void | drawDefaultGuidePlane (const SnapPoint &point) |
| Draws the default guide plane based on the current snap point context. | |
| UUID | lineMaterial (const SnapPoint &point) |
| Returns the material UUID appropriate for the given snap point's guide line type. | |
| UUID | pointMaterial (const SnapPoint &point) |
| Returns the material UUID appropriate for the given snap point type. | |
| bool | processMouseSelection (MouseControllerEvent &event) |
| Processes a mouse event for object selection (non-snap interaction). | |
| bool | processMouseSnap (MouseControllerEvent &event, SelectionInfo &info) |
| Processes a mouse event specifically for snapping logic. | |
| void | processUserInput () |
| Processes any pending user text input for dimension locking. | |
| void | setGuideLine (uint04 index, const Vertex< 3, fltp08 > &p1, const Vector< 3, fltp08 > &p2, const UUID &material) |
| Sets the start position, direction, and material of a guide line at the given index. | |
| void | setGuideLineVisible (bool visible) |
| Sets the visibility of all guide lines. | |
| void | setGuideLineVisible (uint04 index, bool visible) |
| Sets the visibility of a specific guide line by index. | |
| void | setGuidePlane (uint04 index, const Vector< 3, fltp08 > &normal, const Vertex< 3, fltp08 > &location, fltp08 radius) |
| Sets the orientation, position, and size of a guide plane at the given index. | |
| void | setGuidePlaneVisible (bool visible) |
| Sets the visibility of all guide planes. | |
| void | setGuidePlaneVisible (uint04 index, bool visible) |
| Sets the visibility of a specific guide plane by index. | |
| void | setGuidePoint (uint04 index, const Vertex< 3, fltp08 > &p1, const UUID &material) |
| Sets the position and material of a guide point at the given index. | |
| void | setGuidePointVisible (bool visible) |
| Sets the visibility of all guide points. | |
| void | setGuidePointVisible (uint04 index, bool visible) |
| Sets the visibility of a specific guide point by index. | |
| Model | setupGuideModel () |
| Creates and returns a Model configured as a guide visual element. | |
| void | updateRecentGeometry (const SnapPoint &point) |
| Updates the recent geometry cache with the latest snap point for extending/snapping to nearby geometry in future operations. | |
Protected Attributes | |
| DynamicPointer< ModelFunction > | m_active_edit_function |
| The currently active custom model function. | |
| bool | m_auto_finish |
| Whether to automatically finish when conditions are met. | |
| CommandLockObject | m_command_lock |
| Lock object preventing concurrent command execution. | |
| Plane< 3, fltp08 > | m_command_plane |
| The plane used for constrained editing operations. | |
| UUID | m_current_geometry |
| UUID of the geometry being edited at vertex level. | |
| Model | m_current_model |
| The model currently being edited. | |
| uint04 | m_current_vertex |
| Index of the vertex being edited at vertex level. | |
| Dictionary< UUID, DynamicPointer< ModelFunction > > | m_edit_functions |
| Dictionary of registered custom model functions. | |
| Buffer< UUID > | m_edited_models |
| List of model UUIDs modified during the current operation. | |
| Buffer< Vertex< 3, fltp08 > > | m_gravity_points |
| Cached gravity points for gravity-based placement. | |
| bool | m_ignore_elevation |
| Whether to ignore elevation changes during editing. | |
| bool | m_is_selecting |
| Whether the controller is currently in selection mode. | |
| bool | m_lock_scale |
| Whether to lock the scale during editing. | |
| Vector< 3, fltp08 > | m_mouse_scene_original |
| Scene-space mouse position at the start of the edit. | |
| Vector< 2, sint02 > | m_mouse_screen_original |
| Screen-space mouse position at the start of the edit. | |
| std::function< void(bool canceled, UUID id)> | m_next_finished_callback |
| Callback invoked when the next edit operation finishes. | |
| Matrix< fltp08 > | m_original_matrix |
| The original transform of the model before editing. | |
| UUID | m_paint_material |
| UUID of the material used for paint operations. | |
| UUID | m_paste_model |
| UUID of the model used for paste/rubber stamp operations. | |
| bool | m_snap_to_normal |
| Whether to snap orientation to surface normals. | |
| bool | m_use_gravity |
| Whether gravity-based placement is enabled. | |
| bool | m_yaw_to_normal |
| Whether to align yaw to surface normals. | |
| Protected Attributes inherited from SnapController | |
| UUID | m_blue_line_material = Constant<UUID>::Invalid |
| Material for Z-axis (blue) guide lines. | |
| UUID | m_center_point_material = Constant<UUID>::Invalid |
| Material for snap points at center points. | |
| UUID | m_current_line_material = Constant<UUID>::Invalid |
| Material UUID for the current guide line being drawn. | |
| ConstPointer< SnapsManager > | m_custom_snap_manager |
| Optional custom snap manager overriding default snap behavior. | |
| UUID | m_edge_point_material = Constant<UUID>::Invalid |
| Material for snap points on edges. | |
| UUID | m_end_point_material = Constant<UUID>::Invalid |
| Material for snap points at endpoints. | |
| UUID | m_extend_line_material = Constant<UUID>::Invalid |
| Material for extension guide lines. | |
| std::function< void(bool is_accepted)> | m_finished_callback |
| Callback invoked when the snap operation finishes. | |
| UUID | m_free_line_material = Constant<UUID>::Invalid |
| Material for free (unconstrained) guide lines. | |
| UUID | m_free_point_material = Constant<UUID>::Invalid |
| Material for free (unconstrained) snap points. | |
| UUID | m_green_line_material = Constant<UUID>::Invalid |
| Material for Y-axis (green) guide lines. | |
| Buffer< UUID > | m_guide_line_material |
| Materials assigned to each guide line. | |
| Buffer< UUID > | m_guide_line_model |
| UUIDs of individual guide line models. | |
| UUID | m_guide_model = Constant<UUID>::Invalid |
| UUID of the root guide model in the scene. | |
| Buffer< UUID > | m_guide_plane_material |
| Materials assigned to each guide plane. | |
| Buffer< UUID > | m_guide_plane_model |
| UUIDs of individual guide plane models. | |
| Buffer< UUID > | m_guide_point_material |
| Materials assigned to each guide point. | |
| Buffer< UUID > | m_guide_point_model |
| UUIDs of individual guide point models. | |
| bool | m_is_active |
| Whether the snap controller is currently active. | |
| bool | m_is_horizontal_locked = false |
| Whether horizontal axis locking is currently active. | |
| bool | m_is_using_lock_plane = false |
| Whether a lock plane is currently in use for constraining. | |
| bool | m_is_vertical_locked = false |
| Whether vertical axis locking is currently active. | |
| Camera * | m_last_camera = nullptr |
| The camera used in the last event processing. | |
| Buffer< std::pair< UUID, uint04 > > | m_last_lines |
| Recently snapped line geometry (UUID and vertex index pairs). | |
| DesignObjectLookup * | m_last_lookup = nullptr |
| The DesignObjectLookup used in the last event processing. | |
| Buffer< std::pair< UUID, uint04 > > | m_last_meshes |
| Recently snapped mesh geometry (UUID and face index pairs). | |
| MouseEvent | m_last_mouse_event |
| The most recently processed mouse event. | |
| Buffer< std::pair< UUID, uint04 > > | m_last_points |
| Recently snapped point geometry (UUID and vertex index pairs). | |
| UUID | m_last_selection_camera = Constant<UUID>::Invalid |
| UUID of the camera used in the last selection operation. | |
| Buffer< SnapPoint > | m_last_snap_points |
| The most recently computed set of candidate snap points. | |
| Buffer< UUID > | m_line_guide_text |
| UUIDs of text labels attached to guide lines. | |
| UUID | m_line_mesh = Constant<UUID>::Invalid |
| UUID of the mesh used for guide lines. | |
| Vertex< 3, fltp08 > | m_location |
| The current snap location in 3D space. | |
| Vertex< 3, fltp08 > | m_lock_axis |
| Per-axis lock values (NaN or invalid means unlocked). | |
| LineSegment< 3, fltp08 > | m_lock_line |
| The line segment used for line-lock constraining. | |
| Vertex< 3, fltp08 > | m_lock_location |
| The reference location used for lock calculations. | |
| LockMode | m_lock_mode |
| The active lock mode controlling snap-lock interaction. | |
| Plane< 3, fltp08 > | m_lock_plane |
| The plane used for plane-lock constraining. | |
| UUID | m_locked_line_material = Constant<UUID>::Invalid |
| Material for locked/constrained guide lines. | |
| DesignObjectLookup * | m_manager |
| The DesignObjectLookup this controller operates on. | |
| UUID | m_mid_point_material = Constant<UUID>::Invalid |
| Material for snap points at midpoints. | |
| UUID | m_on_face_point_material = Constant<UUID>::Invalid |
| Material for snap points on faces. | |
| SnapPoint | m_original_snap |
| The original snap point before lock adjustments. | |
| UUID | m_perpendicular_line_material = Constant<UUID>::Invalid |
| Material for perpendicular guide lines. | |
| UUID | m_plane_mesh = Constant<UUID>::Invalid |
| UUID of the mesh used for guide planes. | |
| PointsDrawMode | m_point_draw_mode |
| The current draw mode for accumulated points. | |
| Buffer< UUID > | m_point_guide_text |
| UUIDs of text labels attached to guide points. | |
| UUID | m_point_material = Constant<UUID>::Invalid |
| Material for generic snap points. | |
| UUID | m_point_mesh = Constant<UUID>::Invalid |
| UUID of the mesh used for guide points. | |
| Buffer< Vertex< 3, fltp08 > > | m_points |
| Accumulated 3D snap points from user clicks. | |
| UUID | m_red_line_material = Constant<UUID>::Invalid |
| Material for X-axis (red) guide lines. | |
| SelectionMode | m_selection_mode |
| The current selection mode used during interaction. | |
| bool | m_show_length_label |
| Whether length labels are displayed on guide lines. | |
| bool | m_show_location_label |
| Whether coordinate labels are displayed at snap points. | |
| UUID | m_tangent_line_material = Constant<UUID>::Invalid |
| Material for tangent guide lines. | |
| std::function< void()> | m_update_callback |
| Callback invoked when the snap state is updated. | |
| EditDimensionLockInformation | m_user_edit |
| Current user dimension lock edit state. | |
Takes user input in order to modify a model in real-time.
ModelEditController extends SnapController to provide interactive model editing capabilities. It supports various edit modes including scaling, rotating, offsetting, placing, flipping, and custom model functions. The controller manages command locking, gravity-based placement, and coordinates with the selection system.
Definition at line 180 of file ModelEditController.h.
Enumerates the available model editing modes.
| Enumerator | |
|---|---|
| e_no_edit | No active editing operation. |
| e_center_locked_scale | Scale from center with locked aspect ratio. |
| e_center_scale | Scale from center with free aspect ratio. |
| e_two_point_locked_scale | Scale using two reference points with locked aspect ratio. |
| e_two_point_scale | Scale using two reference points with free aspect ratio. |
| e_two_length_scale | Scale by specifying two lengths. |
| e_offset | Translate/offset the model. |
| e_vertex_offset | Translate a single vertex of the model. |
| e_rotate | Rotate the model. |
| e_place_and_rotate | Place the model at a location and allow rotation. |
| e_place_no_rotate | Place the model at a location without rotation. |
| e_flip_left | Flip the model along the left/right axis. |
| e_flip_front | Flip the model along the front/back axis. |
| e_flip_vertical | Flip the model along the vertical axis. |
| e_set_real_thickness | Set a real-world thickness value on the model. |
| e_rubber_stamp | Duplicate and place copies of the model (rubber stamp tool). |
| e_erase | Erase or remove parts of the model. |
| e_add_selection_mask | Add a selection mask to the model. |
| e_edit_mode_size | Sentinel value representing the number of built-in edit modes. |
| e_model_function | Delegate editing to a custom ModelFunction. |
Definition at line 186 of file ModelEditController.h.
| ModelEditController::ModelEditController | ( | DesignObjectLookup * | manager | ) |
Constructs a ModelEditController.
| [in] | manager | The design object lookup used for scene queries. |
References ModelEditController().
Referenced by ModelEditController().
|
inline |
Returns the currently active model being edited.
Definition at line 260 of file ModelEditController.h.
References m_current_model.
| UUID ModelEditController::activeModelFunction | ( | ) | const |
| void ModelEditController::addEditFunction | ( | const DynamicPointer< ModelFunction > & | function | ) |
Adds a custom model function to the controller.
| [in] | function | A dynamic pointer to the ModelFunction to add. |
|
inlinevirtual |
Registers a callback to be invoked when the next edit operation finishes.
| [in] | callback | A function receiving (canceled, model_id) when the operation completes. |
Definition at line 406 of file ModelEditController.h.
References m_next_finished_callback.
|
overridevirtual |
Adds a snap point as input to the current editing operation.
| [in] | point | The snap point to add. |
Reimplemented from SnapController.
Adds a 3D point as input to the current editing operation.
| [in] | point | The 3D point to add. |
Reimplemented from SnapController.
| SubSelectionMode ModelEditController::defaultSelectionMode | ( | ) | const |
Returns the default sub-selection mode for the current edit mode.
Returns the list of model UUIDs that have been edited during this operation.
Definition at line 368 of file ModelEditController.h.
References m_edited_models.
|
inline |
Returns the dictionary of all registered model edit functions.
Definition at line 296 of file ModelEditController.h.
References m_edit_functions.
| TranslatedString ModelEditController::expandedHint | ( | ) | const |
Returns an expanded hint with detailed description of the current editing operation.
Applies gravity adjustment to a transformation matrix.
| [in] | mat | The transformation matrix to adjust. |
|
inline |
Checks whether the controller currently holds a command lock.
Definition at line 242 of file ModelEditController.h.
References m_command_lock.
| bool ModelEditController::hasFinishedMouseActions | ( | ) | const |
Checks whether all required mouse actions for the current edit have been completed.
| TranslatedString ModelEditController::hint | ( | ) | const |
Returns a short hint describing the current editing operation.
| bool ModelEditController::isSelecting | ( | ) | const |
Checks whether the controller is currently in a selection state.
|
inline |
Returns the UUID of the current paint material.
Definition at line 248 of file ModelEditController.h.
References m_paint_material.
|
protected |
Called when an object is selected during an editing operation.
| [in] | object | The UUID of the selected object. |
Returns the original transform matrix of the model before editing began.
Definition at line 380 of file ModelEditController.h.
References m_original_matrix.
|
inline |
Returns the UUID of the model being pasted (for rubber stamp / paste operations).
Definition at line 254 of file ModelEditController.h.
References m_paste_model.
|
overrideprotectedvirtual |
Processes a keyboard event during the editing operation.
| [in] | event | The key event to process. |
| [in] | lookup | The design object lookup for scene queries. |
| [in] | camera | The active camera. |
Reimplemented from SnapController.
|
overrideprotectedvirtual |
Processes a mouse event during the editing operation.
| [in] | event | The mouse controller event to process. |
| [in] | info | The selection info associated with the event. |
Reimplemented from SnapController.
| bool ModelEditController::selectionModeAllowed | ( | const SubSelectionMode & | mode | ) | const |
Checks whether a given sub-selection mode is allowed in the current edit state.
| [in] | mode | The sub-selection mode to check. |
| void ModelEditController::setActiveEditFunction | ( | const UUID & | function | ) |
| void ModelEditController::setActiveModel | ( | UUID | model | ) |
Sets the model that is currently being edited.
| [in] | model | The UUID of the model to make active. |
| void ModelEditController::setActiveVertex | ( | const Matrix< fltp08 > & | complete_transform, |
| UUID | geometry, | ||
| uint04 | vertex_id ) |
Sets the active vertex for vertex-level editing operations.
| [in] | complete_transform | The full transform matrix of the geometry. |
| [in] | geometry | The UUID of the geometry containing the vertex. |
| [in] | vertex_id | The index of the vertex within the geometry. |
| void ModelEditController::setAutoFinish | ( | bool | auto_finish | ) |
Enables or disables automatic finishing of the edit when conditions are met.
| [in] | auto_finish | True to enable auto-finish, false to disable. |
Sets the original transform matrix for undo/reference purposes.
| [in] | transform | The original transformation matrix to store. |
| void ModelEditController::setPasteModel | ( | UUID | model | ) |
Sets the model to be used for paste/rubber stamp operations.
| [in] | model | The UUID of the model to paste. |
|
overridevirtual |
Sets up selection info from a mouse event and camera for the editing operation.
| [in] | event | The mouse event providing input. |
| [in] | camera | The camera used for ray casting. |
| [in] | info | The selection info to populate. |
Reimplemented from SnapController.
| void ModelEditController::setUseGravity | ( | bool | use_gravity | ) |
Enables or disables gravity-based placement adjustment.
| [in] | use_gravity | True to enable gravity adjustment, false to disable. |
| bool ModelEditController::shouldShowInterface | ( | ) | const |
Checks whether the active function or edit mode has a UI interface to display.
| TranslatedString ModelEditController::title | ( | ) | const |
Returns the display title for the current editing operation.
| bool ModelEditController::tryCommandLock | ( | ) |
Attempts to acquire a command lock for the current editing operation.
|
overridevirtual |
Updates the current location during an editing operation.
| [in] | location | The new 3D location. |
| [in] | is_select | Whether this update represents a selection action. |
| [in] | camera | The camera used for the update, or nullptr. |
Reimplemented from SnapController.
| bool ModelEditController::usingGravity | ( | ) | const |
Checks whether gravity-based placement is currently enabled.