|
| | SnapController (DesignObjectLookup *manager) |
| | Constructs a SnapController associated with the given DesignObjectLookup.
|
| virtual void | cancel () |
| | Cancels the current snap operation and cleans up any active state or visuals.
|
| 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.
|
| virtual bool | processKeyEvent (const KeyEvent &event, DesignObjectLookup *lookup, Camera *camera) override |
| | Processes an incoming keyboard event for snap-related shortcuts and dimension locking.
|
| virtual bool | processMouseEvent (MouseControllerEvent &event, SelectionInfo &info) override |
| | Processes an incoming mouse event for snapping and selection.
|
| 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.
|
|
| 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.
|
| virtual void | addPoint (const SnapPoint &point) |
| | Adds a snap point (with snap metadata) to the accumulated points buffer.
|
| virtual void | addPoint (const Vertex< 3, fltp08 > &point) |
| | Adds a 3D point to the accumulated points buffer.
|
| virtual void | begin () |
| | Called when a snap operation begins.
|
| 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.
|
| virtual void | finish () |
| | Called when the snap operation is finished.
|
| 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.
|
| virtual void | setupSelectionInfo (const MouseEvent &event, Camera *camera, SelectionInfo &info) |
| | Populates a SelectionInfo from the given mouse event and camera.
|
| virtual void | updateLocation (const Vertex< 3, fltp08 > &location, bool is_click, Camera *camera) |
| | Called when the snap location is updated.
|
| void | updateRecentGeometry (const SnapPoint &point) |
| | Updates the recent geometry cache with the latest snap point for extending/snapping to nearby geometry in future operations.
|
|
|
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.
|
Allows for mouse snaps to certain key points of interest in the software.
Can also create visuals to help with user mouse interaction with DesignObjectLookup.
Definition at line 51 of file SnapController.h.