NDEVR
API Documentation
ModelEditController

Takes user input in order to modify a model in real-time. More...

Inheritance diagram for ModelEditController:
[legend]
Collaboration diagram for ModelEditController:
[legend]

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< UUIDeditedModels ()
 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< fltp08gravityAdjust (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 UUIDmaterial () const
 Returns the UUID of the current paint material.
Matrix< fltp08originalTransform () const
 Returns the original transform matrix of the model before editing began.
const UUIDpasteModel () 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, fltp08currentLocation () const
 Returns the current snap location in 3D space.
Vertex< 3, fltp08lastPoint () 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< ModelEditModeedit_mode
 The resource tracking the current edit mode.
Public Attributes inherited from SnapController
Resource< SnapPointcurrent_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< ModelFunctionm_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, fltp08m_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< UUIDm_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, fltp08m_mouse_scene_original
 Scene-space mouse position at the start of the edit.
Vector< 2, sint02m_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< fltp08m_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< SnapsManagerm_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< UUIDm_guide_line_material
 Materials assigned to each guide line.
Buffer< UUIDm_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< UUIDm_guide_plane_material
 Materials assigned to each guide plane.
Buffer< UUIDm_guide_plane_model
 UUIDs of individual guide plane models.
Buffer< UUIDm_guide_point_material
 Materials assigned to each guide point.
Buffer< UUIDm_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.
Cameram_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).
DesignObjectLookupm_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< SnapPointm_last_snap_points
 The most recently computed set of candidate snap points.
Buffer< UUIDm_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, fltp08m_location
 The current snap location in 3D space.
Vertex< 3, fltp08m_lock_axis
 Per-axis lock values (NaN or invalid means unlocked).
LineSegment< 3, fltp08m_lock_line
 The line segment used for line-lock constraining.
Vertex< 3, fltp08m_lock_location
 The reference location used for lock calculations.
LockMode m_lock_mode
 The active lock mode controlling snap-lock interaction.
Plane< 3, fltp08m_lock_plane
 The plane used for plane-lock constraining.
UUID m_locked_line_material = Constant<UUID>::Invalid
 Material for locked/constrained guide lines.
DesignObjectLookupm_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< UUIDm_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.

Detailed Description

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.

Member Enumeration Documentation

◆ ModelEditMode

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.

Constructor & Destructor Documentation

◆ ModelEditController()

ModelEditController::ModelEditController ( DesignObjectLookup * manager)

Constructs a ModelEditController.

Parameters
[in]managerThe design object lookup used for scene queries.

References ModelEditController().

Referenced by ModelEditController().

Member Function Documentation

◆ activeModel()

Model ModelEditController::activeModel ( ) const
inline

Returns the currently active model being edited.

Returns
The active Model object.

Definition at line 260 of file ModelEditController.h.

References m_current_model.

◆ activeModelFunction()

UUID ModelEditController::activeModelFunction ( ) const

Returns the UUID of the currently active model function, if any.

Returns
The UUID of the active model function.

◆ addEditFunction()

void ModelEditController::addEditFunction ( const DynamicPointer< ModelFunction > & function)

Adds a custom model function to the controller.

Parameters
[in]functionA dynamic pointer to the ModelFunction to add.

◆ addNextFinishedCallback()

virtual void ModelEditController::addNextFinishedCallback ( std::function< void(bool canceled, UUID id)> callback)
inlinevirtual

Registers a callback to be invoked when the next edit operation finishes.

Parameters
[in]callbackA function receiving (canceled, model_id) when the operation completes.

Definition at line 406 of file ModelEditController.h.

References m_next_finished_callback.

◆ addPoint() [1/2]

virtual void ModelEditController::addPoint ( const SnapPoint & point)
overridevirtual

Adds a snap point as input to the current editing operation.

Parameters
[in]pointThe snap point to add.

Reimplemented from SnapController.

◆ addPoint() [2/2]

void ModelEditController::addPoint ( const Vertex< 3, fltp08 > & point)
overridevirtual

Adds a 3D point as input to the current editing operation.

Parameters
[in]pointThe 3D point to add.

Reimplemented from SnapController.

◆ defaultSelectionMode()

SubSelectionMode ModelEditController::defaultSelectionMode ( ) const

Returns the default sub-selection mode for the current edit mode.

Returns
The default SubSelectionMode.

◆ editedModels()

Buffer< UUID > ModelEditController::editedModels ( )
inline

Returns the list of model UUIDs that have been edited during this operation.

Returns
A buffer of edited model UUIDs.

Definition at line 368 of file ModelEditController.h.

References m_edited_models.

◆ editFunctions()

const Dictionary< UUID, DynamicPointer< ModelFunction > > & ModelEditController::editFunctions ( ) const
inline

Returns the dictionary of all registered model edit functions.

Returns
A const reference to the dictionary mapping UUIDs to ModelFunction pointers.

Definition at line 296 of file ModelEditController.h.

References m_edit_functions.

◆ expandedHint()

TranslatedString ModelEditController::expandedHint ( ) const

Returns an expanded hint with detailed description of the current editing operation.

Returns
The translated expanded hint string.

◆ gravityAdjust()

Matrix< fltp08 > ModelEditController::gravityAdjust ( const Matrix< fltp08 > & mat) const

Applies gravity adjustment to a transformation matrix.

Parameters
[in]matThe transformation matrix to adjust.
Returns
The gravity-adjusted transformation matrix.

◆ hasCommandLock()

bool ModelEditController::hasCommandLock ( ) const
inline

Checks whether the controller currently holds a command lock.

Returns
True if a command lock is active, false otherwise.

Definition at line 242 of file ModelEditController.h.

References m_command_lock.

◆ hasFinishedMouseActions()

bool ModelEditController::hasFinishedMouseActions ( ) const

Checks whether all required mouse actions for the current edit have been completed.

Returns
True if mouse actions are finished, false otherwise.

◆ hint()

TranslatedString ModelEditController::hint ( ) const

Returns a short hint describing the current editing operation.

Returns
The translated hint string.

◆ isSelecting()

bool ModelEditController::isSelecting ( ) const

Checks whether the controller is currently in a selection state.

Returns
True if selecting, false otherwise.

◆ material()

const UUID & ModelEditController::material ( ) const
inline

Returns the UUID of the current paint material.

Returns
A const reference to the paint material UUID.

Definition at line 248 of file ModelEditController.h.

References m_paint_material.

◆ onSelect()

void ModelEditController::onSelect ( UUID object)
protected

Called when an object is selected during an editing operation.

Parameters
[in]objectThe UUID of the selected object.

◆ originalTransform()

Matrix< fltp08 > ModelEditController::originalTransform ( ) const
inline

Returns the original transform matrix of the model before editing began.

Returns
The original transformation matrix.

Definition at line 380 of file ModelEditController.h.

References m_original_matrix.

◆ pasteModel()

const UUID & ModelEditController::pasteModel ( ) const
inline

Returns the UUID of the model being pasted (for rubber stamp / paste operations).

Returns
A const reference to the paste model UUID.

Definition at line 254 of file ModelEditController.h.

References m_paste_model.

◆ processKeyEvent()

virtual bool ModelEditController::processKeyEvent ( const KeyEvent & event,
DesignObjectLookup * lookup,
Camera * camera )
overrideprotectedvirtual

Processes a keyboard event during the editing operation.

Parameters
[in]eventThe key event to process.
[in]lookupThe design object lookup for scene queries.
[in]cameraThe active camera.
Returns
True if the event was handled, false otherwise.

Reimplemented from SnapController.

◆ processMouseEvent()

virtual bool ModelEditController::processMouseEvent ( MouseControllerEvent & event,
SelectionInfo & info )
overrideprotectedvirtual

Processes a mouse event during the editing operation.

Parameters
[in]eventThe mouse controller event to process.
[in]infoThe selection info associated with the event.
Returns
True if the event was handled, false otherwise.

Reimplemented from SnapController.

◆ selectionModeAllowed()

bool ModelEditController::selectionModeAllowed ( const SubSelectionMode & mode) const

Checks whether a given sub-selection mode is allowed in the current edit state.

Parameters
[in]modeThe sub-selection mode to check.
Returns
True if the mode is allowed, false otherwise.

◆ setActiveEditFunction()

void ModelEditController::setActiveEditFunction ( const UUID & function)

Sets the currently active custom model function by UUID.

Parameters
[in]functionThe UUID of the model function to activate.

◆ setActiveModel()

void ModelEditController::setActiveModel ( UUID model)

Sets the model that is currently being edited.

Parameters
[in]modelThe UUID of the model to make active.

◆ setActiveVertex()

void ModelEditController::setActiveVertex ( const Matrix< fltp08 > & complete_transform,
UUID geometry,
uint04 vertex_id )

Sets the active vertex for vertex-level editing operations.

Parameters
[in]complete_transformThe full transform matrix of the geometry.
[in]geometryThe UUID of the geometry containing the vertex.
[in]vertex_idThe index of the vertex within the geometry.

◆ setAutoFinish()

void ModelEditController::setAutoFinish ( bool auto_finish)

Enables or disables automatic finishing of the edit when conditions are met.

Parameters
[in]auto_finishTrue to enable auto-finish, false to disable.

◆ setOriginalTransform()

void ModelEditController::setOriginalTransform ( const Matrix< fltp08 > & transform)

Sets the original transform matrix for undo/reference purposes.

Parameters
[in]transformThe original transformation matrix to store.

◆ setPasteModel()

void ModelEditController::setPasteModel ( UUID model)

Sets the model to be used for paste/rubber stamp operations.

Parameters
[in]modelThe UUID of the model to paste.

◆ setupSelectionInfo()

void ModelEditController::setupSelectionInfo ( const MouseEvent & event,
Camera * camera,
SelectionInfo & info )
overridevirtual

Sets up selection info from a mouse event and camera for the editing operation.

Parameters
[in]eventThe mouse event providing input.
[in]cameraThe camera used for ray casting.
[in]infoThe selection info to populate.

Reimplemented from SnapController.

◆ setUseGravity()

void ModelEditController::setUseGravity ( bool use_gravity)

Enables or disables gravity-based placement adjustment.

Parameters
[in]use_gravityTrue to enable gravity adjustment, false to disable.

◆ shouldShowInterface()

bool ModelEditController::shouldShowInterface ( ) const

Checks whether the active function or edit mode has a UI interface to display.

Returns
True if an interface should be shown, false otherwise.

◆ title()

TranslatedString ModelEditController::title ( ) const

Returns the display title for the current editing operation.

Returns
The translated title string.

◆ tryCommandLock()

bool ModelEditController::tryCommandLock ( )

Attempts to acquire a command lock for the current editing operation.

Returns
True if the lock was successfully acquired, false otherwise.

◆ updateLocation()

virtual void ModelEditController::updateLocation ( const Vertex< 3, fltp08 > & location,
bool is_select = false,
Camera * camera = nullptr )
overridevirtual

Updates the current location during an editing operation.

Parameters
[in]locationThe new 3D location.
[in]is_selectWhether this update represents a selection action.
[in]cameraThe camera used for the update, or nullptr.

Reimplemented from SnapController.

◆ usingGravity()

bool ModelEditController::usingGravity ( ) const

Checks whether gravity-based placement is currently enabled.

Returns
True if gravity is in use, false otherwise.

The documentation for this class was generated from the following file: